• Paolo Abeni's avatar
    ipv4: use dst hint for ipv4 list receive · 02b24941
    Paolo Abeni authored
    This is alike the previous change, with some additional ipv4 specific
    quirk. Even when using the route hint we still have to do perform
    additional per packet checks about source address validity: a new
    helper is added to wrap them.
    
    Hints are explicitly disabled if the destination is a local broadcast,
    that keeps the code simple and local broadcast are a slower path anyway.
    
    UDP flood performances vs recvmmsg() receiver:
    
    vanilla		patched		delta
    Kpps		Kpps		%
    1683		1871		+11
    
    In the worst case scenario - each packet has a different
    destination address - the performance delta is within noise
    range.
    
    v3 -> v4:
     - re-enable hints for forward
    
    v2 -> v3:
     - really fix build (sic) and hint usage check
     - use fib4_has_custom_rules() helpers (David A.)
     - add ip_extract_route_hint() helper (Edward C.)
     - use prev skb as hint instead of copying data (Willem)
    
    v1 -> v2:
     - fix build issue with !CONFIG_IP_MULTIPLE_TABLES
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    02b24941
route.h 11 KB