Roger Federer will miss the upcoming U.S. Open and be sidelined for many months because he needs more knee surgery, an operation that the Swiss great said on Sunday will give him a "glimmer of hope" that he can resume his glittering career.

The 40-year-old Federer, speaking on a video posted to his Instagram account, said doctors told him that in order to feel better for the medium- to long-term, he would need surgery on the knee that he injured again during the grass court season.

"I'll be on crutches for many weeks and then also out of the game for many months," Federer said.