Confusion about desire

Recently, I read the Bhagavad Gita and Dhammapada. While I thought that the teachings were wonderful, there was one particular thing I could not quite understand. Both the books exhort us to “free ourselves from desire” and taught that “desire is the root cause of all suffering”.

(I guess this is not the same concept as that of “effortless effort” that the Tao Te Ching teaches) . A blanket statement that “desire is not good” seemed strange. For example, one of my role models is Roger Federer. I marvel at his desire to keep improving and come back slam after slam and emerge victorious. I`ve always thought that desire is a very positive emotion and the first step to any achievement. I guess that I’ve misinterpreted or misunderstood this teaching of Buddha/Gita. I would be really thankful if you could clarify my doubt. It would be a big step forward in my spiritual path.