• Craig Gallek's avatar
    inet: create IPv6-equivalent inet_hash function · 496611d7
    Craig Gallek authored
    In order to support fast lookups for TCP sockets with SO_REUSEPORT,
    the function that adds sockets to the listening hash set needs
    to be able to check receive address equality.  Since this equality
    check is different for IPv4 and IPv6, we will need two different
    socket hashing functions.
    
    This patch adds inet6_hash identical to the existing inet_hash function
    and updates the appropriate references.  A following patch will
    differentiate the two by passing different comparison functions to
    __inet_hash.
    
    Additionally, in order to use the IPv6 address equality function from
    inet6_hashtables (which is compiled as a built-in object when IPv6 is
    enabled) it also needs to be in a built-in object file as well.  This
    moves ipv6_rcv_saddr_equal into inet_hashtables to accomplish this.
    Signed-off-by: default avatarCraig Gallek <kraig@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    496611d7
inet6_hashtables.c 9.13 KB