Stan Wawrinka is convinced his future in tennis is bright after battling back from a major knee problem to reassert himself as a grand slam contender.

At the age of 34, Wawrinka believes his days as a leading player on the ATP Tour can be sustained for some time yet, and he heads to Wimbledon re-energised and full of self-confidence.

There were many who doubted whether Wawrinka would return to the top echelons of the men's game after he struggled through the early months of 2018, looking like a player for whom surgery had taken a major toll.

His improvement has been steady though, to the point where he pushed his fellow Swiss Roger Federer hard over four sets at Roland Garros on Tuesday.

Federer fought his way through two tie-breaks on his way to victory and a place in the French Open semi-finals, where Rafael Nadal awaits, but Wawrinka knew it had been a tight contest that could have gone either way.

Asked whether his run to the second week in Paris showed he was heading back to peak form, Wawrinka said in a media conference: "Yeah, it maybe confirmed to you guys that I can still beat some top guys."

He added: "Today it was a tough match. I lost it against the best player ever to play this sport. I'm more positive than sad or disappointed with the result, because I know everything I have done to come back to that level. I know also how I left here last year when down in the ranking, like, 260 or something. [Next week] I'm going to be back in the top 20.

"I'm happy with that. I think it showed that I have done the right things, and I'm happy to keep working and keep playing some big matches."

Wawrinka can look to 37-year-old Federer as an example of a player who has worked diligently not only on his game but his physicality and health, allowing him to be competitive long after others of his peer group have retired.

"As long as I enjoy doing what I'm doing, as long as I can play well, as long as I can push and see that I can have some shot to beat the top players, I'm probably gonna keep playing," Wawrinka said.

"But how long it's gonna be, I have no idea.

"I'm going to rest a little bit, and then I have to start on grass right away. I plan on playing Stuttgart, Queen's, Wimbledon."