World No. 3 Roger Federer will be out of action for up to a month after undergoing non-invasive knee surgery in Switzerland.