The procedure, performed last week to repair a torn lateral meniscus, leaves the nose guard questionable for the Ravens' season opener against the New York Jets on Sept. 13.
Ravens coach John Harbaugh says there's a chance Cody could be back for the opener, but says "for the bigger guys, sometimes it takes a little longer."
Harbaugh says the good news is the Ravens "have a lot of depth on the defensive line right now."
Cody had said last week that he didn't think he would need surgery to address swelling in his knee. The 6-foot-4, 349-pounder from Alabama says that he doesn't have a history of knee issues.