Roger Federer was satisfied after easing into the third round with a straight-set victory over Chinese Taipei's Yen-Hsun Lu in the second round of the Shanghai Masters.

The world number one defeated the qualifier 6-3, 7-5, to set up a clash with fellow Swiss Stanislas Wawrinka.

"I thought it was a good match for me," Federer said after the match. "Obviously not having been broken is a good thing early on in a tournament.

"You hope it sets a trend for more to come.

"It's just about sort of getting a sense of how to play the points again, even though it's been a couple of weeks. But my last matches have been on clay.

"You always wonder if you have lost something in the meantime. But I'm happy that things worked out well today because Lu I thought played a pretty good match.

"He's got the game to be really dangerous, particularly on a fast court like today. I was able to manage. That was a good thing for me, so I'm really happy."

Federer admitted he hadn't practiced too much coming into the tournament, and was just happy to come out of it unscathed. "I was in Dubai for some time now," he said. "I practiced four times maybe while I was there. Nothing major.

"It was just more about keeping the rhythm, making sure I don't take too long of a break in case I was going to play here. Obviously I had Saturday, Sunday, Monday, Tuesday here. Once it even rained. So I haven't practiced a whole lot. I couldn't really work on my game.

"This was just more sort of a maintaining couple of weeks, making sure that when I do come back again, I don't get injured, all those things.

"I'm happy actually considering the last few weeks that this was a decent first round."

If Federer beats Wawrinka in the third round, the Swiss great will complete 300 weeks as the world number one. "I'm obviously excited," he said. It's a big number, even though 299 or 300 doesn't make a big difference for me.

"It's obviously a big match for me. If you look back, there's many matches there was a lot on the line, so this is just another one.

"Obviously it's not a final, so I'm not going to go in super nervous about it. It's just more, you know, the difficulty also playing a good friend. That adds to the special occasion, I guess."