1. 05 12月, 2018 7 次提交
    • G
      net/mlx5e: Cleanup unused defines · 30543831
      Gal Pressman 提交于
      Remove couple of defines that are no longer used.
      Signed-off-by: NGal Pressman <pressmangal@gmail.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      30543831
    • S
      net/mlx5e: Remove trailing space of tx_pause ethtool counter name · 8742c7eb
      Saeed Mahameed 提交于
      tx_pause_storm_warning_events ethtool counter name has a trailing
      space, remove it.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: NEran Ben Elisha <eranbe@mellanox.com>
      8742c7eb
    • D
      Merge branch 'mlxsw-Add-one-armed-router-support' · 55827458
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Add one-armed router support
      
      Up until now, when a packet was routed by the ASIC through the same
      router interface (RIF) from which it ingressed from, the ASIC passed the
      sole copy of the packet to the kernel. This allowed the kernel to route
      the packet and also potentially generate an ICMP redirect.
      
      There are scenarios (e.g., "one-armed router") where packets are
      intentionally routed this way and are therefore not deemed as
      exceptions. In such scenarios the current method of trapping packets to
      the CPU is problematic, as it results in major packet loss.
      
      This patchset solves the problem by having the ASIC forward the packet,
      but also send a copy to the CPU, which gives the kernel the opportunity
      to generate required exceptions.
      
      To prevent the kernel from forwarding such packets again, the driver
      marks them with 'offload_l3_fwd_mark', which causes the kernel to
      consume them in ip{,6}_forward_finish().
      
      Patch #1 renames 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark'. When
      set, the field indicates that a packet was already forwarded in L3
      (unicast / multicast) by a capable device.
      
      Patch #2 teaches the kernel to consume unicast packets that have
      'offload_l3_fwd_mark' set.
      
      Patch #3 changes mlxsw to mirror loopbacked (iRIF == eRIF) packets,
      instead of trapping them.
      
      Patch #4 adds a test case for above mentioned scenario.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55827458
    • I
      selftests: mlxsw: Add one-armed router test · b6f153d3
      Ido Schimmel 提交于
      Construct a "one-armed router" topology and test that packets are
      forwarded by the ASIC and that a copy of the packet is sent to the
      kernel, which does not forward the packet again.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6f153d3
    • 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
    • I
      net: Do not route unicast IP packets twice · f839a6c9
      Ido Schimmel 提交于
      Packets marked with 'offload_l3_fwd_mark' were already forwarded by a
      capable device and should not be forwarded again by the kernel.
      Therefore, have the kernel consume them.
      
      The check is performed in ip{,6}_forward_finish() in order to allow the
      kernel to process such packets in ip{,6}_forward() and generate required
      exceptions. For example, ICMP redirects.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f839a6c9
    • I
      skbuff: Rename 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark' · 875e8939
      Ido Schimmel 提交于
      Commit abf4bb6b ("skbuff: Add the offload_mr_fwd_mark field") added
      the 'offload_mr_fwd_mark' field to indicate that a packet has already
      undergone L3 multicast routing by a capable device. The field is used to
      prevent the kernel from forwarding a packet through a netdev through
      which the device has already forwarded the packet.
      
      Currently, no unicast packet is routed by both the device and the
      kernel, but this is about to change by subsequent patches and we need to
      be able to mark such packets, so that they will no be forwarded twice.
      
      Instead of adding yet another field to 'struct sk_buff', we can just
      rename 'offload_mr_fwd_mark' to 'offload_l3_fwd_mark', as a packet
      either has a multicast or a unicast destination IP.
      
      While at it, add a comment about both 'offload_fwd_mark' and
      'offload_l3_fwd_mark'.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      875e8939
  2. 04 12月, 2018 33 次提交