git: ip_forward: Optimize out the mbuf allocation for ICMP messages

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Thu Dec 20 21:03:19 PST 2012


commit 564c310c1aaeb9e91022fb228dac12d11cbf0e56
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Fri Dec 21 13:00:12 2012 +0800

    ip_forward: Optimize out the mbuf allocation for ICMP messages
    
    A per-netisr mbuf template is used to save the necessary information
    for later ICMP messages; this avoids unnecessary mbuf allocation
    on forwarding path.  The mbufs for ICMP messages are allocated only
    when ICMP messages do need to be sent.
    
    Inspired-by: OpenBSD ip_forward

Summary of changes:
 sys/netinet/ip_input.c |  128 ++++++++++++++++++++++++++----------------------
 1 files changed, 70 insertions(+), 58 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/564c310c1aaeb9e91022fb228dac12d11cbf0e56


-- 
DragonFly BSD source repository



More information about the Commits mailing list