• Amit Cohen's avatar
    mlxsw: Trap ARP packets at layer 3 instead of layer 2 · 4b1cc357
    Amit Cohen authored
    Currently, the traps 'ARP_REQUEST' and 'ARP_RESPONSE' occur at layer 2.
    To allow the packets to be flooded, they are configured with the action
    'MIRROR_TO_CPU' which means that the CPU receives a replica of the packet.
    
    Today, Spectrum ASICs also support trapping ARP packets at layer 3. This
    behavior is better, then the packets can just be trapped and there is no
    need to mirror them. An additional motivation is that using the traps at
    layer 2, the ARP packets are dropped in the router as they do not have an
    IP header, then they are counted as error packets, which might confuse
    users.
    
    Add the relevant traps for layer 3 and use them instead of the existing
    traps. There is no visible change to user space.
    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>
    4b1cc357
spectrum_trap.c 51.9 KB