CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2009/07/24 06:30:05
Modified files:
sys/netinet : ip_input.c
Log message:
for every packet we forwarded, we copied the first 68 bytes of it in case
ip_output failed and we had to generate an icmp packet. since ip_output
frees the mbuf we give it, we copied the original into a new mbuf. if
ip_output succeeded, we threw the copy away.
the problem with this is that copying the mbuf is about a third of the cost
of ip_forward.
this diff copies the data we might need onto the stack, and only builds the
mbuf for the icmp error if it actually needs it, ie, if ip_output fails.
this gives a noticable improvement in pps for forwarded traffic.
ok claudio@ markus@ henning@
tested by markus@ and by me in production for several days at work