Skip to contentSkip to conversation

Route lookup in ip_finish_output2

DISCUSSION Prashant Batra 1 participant 1 message Feb 11, 2013

lore
Share & tools
lore
#0 lore raw

Hi Folks,

I am trying to do a small hack into the kernel just for some experimentation wherein I need to do a ipv4 route lookup from ip_finish_output2, after the packet is received from outside and has got forwarded.

The route lookup is done using kernel API "ip_route_output_flow" with the flow having the dst address.
This seems to be working fine with only exception that at very high loads, I see certain CPU hikes and the profiling results show that the same API comes out to be the culprit.

What I understand is that even to take the forwarding decision the kernel ip_rcv should have done the route lookup to decide that the packet needs to be forwarded, then why am I seeing a CPU hike in my case.

The second route lookup is done as the original packet has got encapsulated within a new IP header having a different destination than the original packet.

Thanks,
Prashant
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs