• Amit Cohen's avatar
    mlxsw: reg: Add support for rtdp_ipip6_pack() · a917bb27
    Amit Cohen authored
    The RTDP register is used for configuring the tunnel decapsulation
    properties of NVE and IP-in-IP.
    
    Linux tunnels verify packets before decapsulation based on the packet's
    source IP, which must match tunnel remote IP.
    RTDP is used to configure decapsulation so that it filters out packets that
    are not IPv6 or have the wrong source IP or wrong GRE key.
    
    For IP-in-IP entry, source IPv4 is saved as part of this register and
    source IPv6 is saved by RIPS register and RTDP saves pointer to it.
    
    Create common function for configuring both IPv4 and IPv6 and add
    dedicated functions for each protocol.
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a917bb27
reg.h 358 KB