• Alexander Duyck's avatar
    ipv4: Add sysctl knob to control early socket demux · 6648bd7e
    Alexander Duyck authored
    This change is meant to add a control for disabling early socket demux.
    The main motivation behind this patch is to provide an option to disable
    the feature as it adds an additional cost to routing that reduces overall
    throughput by up to 5%.  For example one of my systems went from 12.1Mpps
    to 11.6 after the early socket demux was added.  It looks like the reason
    for the regression is that we are now having to perform two lookups, first
    the one for an established socket, and then the one for the routing table.
    
    By adding this patch and toggling the value for ip_early_demux to 0 I am
    able to get back to the 12.1Mpps I was previously seeing.
    
    [ Move local variables in ip_rcv_finish() down into the basic
      block in which they are actually used.  -DaveM ]
    Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6648bd7e
ip_input.c 13.3 KB