• I
    mlxsw: spectrum: Mirror loopbacked packets instead of trapping them · 2f4f4494
    Ido Schimmel 提交于
    When the ASIC detects that a unicast packet is routed through the same
    router interface (RIF) from which it ingressed (iRIF == eRIF), it raises
    a trap called loopback error (LBERROR).
    
    Thus far, this trap was configured to send a sole copy of the packet to
    the CPU so that ICMP redirect packets could be potentially generated by
    the kernel.
    
    This is problematic as the CPU cannot forward packets at 3.2Tb/s and
    there are scenarios (e.g., "one-armed router") where iRIF == eRIF is not
    an exception.
    
    Solve this by changing the trap to send a copy of the packet to the CPU.
    To prevent the kernel from forwarding the packet again, it is marked
    with 'offload_l3_fwd_mark'.
    
    The trap is configured in a trap group of its own with a dedicated
    policer in order not to prevent packets trapped by other traps from
    reaching the CPU.
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    2f4f4494
reg.h 277.9 KB