1. 12 12月, 2018 1 次提交
  2. 05 12月, 2018 2 次提交
    • 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
      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
  3. 04 12月, 2018 1 次提交
  4. 01 12月, 2018 3 次提交
  5. 28 11月, 2018 1 次提交
  6. 19 11月, 2018 1 次提交
  7. 04 11月, 2018 1 次提交
  8. 01 11月, 2018 1 次提交
    • P
      mlxsw: spectrum: Set minimum shaper on MC TCs · 0fe64023
      Petr Machata 提交于
      An MC-aware mode was introduced in commit 7b819530 ("mlxsw:
      spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode,
      BUM traffic gets a special treatment by being assigned to a separate set
      of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then
      configured to strictly prioritize the lower-numbered ones. The intention
      is to prevent BUM traffic from flooding the switch and push out all UC
      traffic, which would otherwise happen, and instead give UC traffic
      precedence.
      
      However strictly prioritizing UC traffic has the effect that UC overload
      pushes out all BUM traffic, such as legitimate ARP queries. These
      packets are kept in queues for a while, but under sustained UC overload,
      their lifetime eventually expires and these packets are dropped. That is
      detrimental to network performance as well.
      
      Therefore configure the MC TCs (8..15) with minimum shaper of 200Mbps (a
      minimum permitted value) to allow a trickle of necessary control traffic
      to get through.
      
      Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fe64023
  9. 18 10月, 2018 2 次提交
    • I
      mlxsw: spectrum: Enable VxLAN enslavement to bridges · 1c30d183
      Ido Schimmel 提交于
      Enslavement of VxLAN devices to offloaded bridges was never forbidden by
      mlxsw, but this patch makes sure the required configuration is performed
      in order to allow VxLAN encapsulation and decapsulation to take place in
      the device.
      
      The patch handles both the case where a VxLAN device is enslaved to an
      already offloaded bridge and the case where the first mlxsw port is
      enslaved to a bridge that already has VxLAN device configured.
      
      Invalid configurations are sanitized and an error string is returned via
      extack.
      
      Since encapsulation and decapsulation do not occur when the VxLAN device
      is down, the driver makes sure to enable / disable these functionalities
      based on NETDEV_PRE_UP and NETDEV_DOWN events.
      
      Note that NETDEV_PRE_UP is used in favor of NETDEV_UP, as the former
      allows to veto the operation, if necessary.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1c30d183
    • I
      mlxsw: spectrum_nve: Implement common NVE core · 6e6030bd
      Ido Schimmel 提交于
      The Spectrum ASIC supports different types of NVE encapsulations (e.g.,
      VxLAN, NVGRE) with more types to be supported by future ASICs.
      
      Despite being different, all these encapsulations share some common
      functionality such as the enablement of NVE encapsulation on a given
      filtering identifier (FID) and the addition of remote VTEPs to the
      linked-list of VTEPs that traffic should be flooded to.
      
      Implement this common core and allow different ASICs to register
      different operations for different encapsulation types.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e6030bd
  10. 12 10月, 2018 2 次提交
    • I
      mlxsw: spectrum: Add NVE packet traps · b02597d5
      Ido Schimmel 提交于
      The DECAP_ECN0 trap will be used to trap packets where the overlay
      packet is marked with Non-ECT, but the underlay packet is marked with
      either ECT(0), ECT(1) or CE. When trapped, such packets will be counted
      as errors by the VxLAN driver and thus provide better visibility.
      
      The NVE_ENCAP_ARP trap will be used to trap ARP packets undergoing NVE
      encapsulation. This is needed in order to support E-VPN ARP suppression,
      where the Linux bridge does not flood ARP packets through tunnel ports
      in case it can answer the ARP request itself.
      
      Note that all the packets trapped via these traps are marked with
      'offload_fwd_mark', so as to not be re-flooded by the Linux bridge
      through the ASIC ports.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b02597d5
    • I
      mlxsw: spectrum: Seed LAG hash function · beda7f72
      Ido Schimmel 提交于
      Currently, the seed of the LAG hash function is always set to 0, which
      means it is identical across all switches. Instead, use a random number.
      
      This is especially important now that VxLAN is supported, as the LAG
      hash function is used to calculate the UDP source port of the
      encapsulated packet.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      beda7f72
  11. 05 10月, 2018 1 次提交
  12. 24 9月, 2018 1 次提交
    • P
      mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement · 12ba7e10
      Petr Machata 提交于
      Up until now, mlxsw tolerated firmware versions that weren't exactly
      matching the required version, if the branch number matched. That
      allowed the users to test various firmware versions as long as they were
      on the right branch.
      
      On the other hand, it made it impossible for mlxsw to put a hard lower
      bound on a version that fixes all problems known to date. If a user had
      a somewhat older FW version installed, mlxsw would start up just fine,
      possibly performing non-optimally as it would use features that trigger
      problematic behavior.
      
      Therefore tweak the check to accept any FW version that is:
      
      - on the same branch as the preferred version, and
      - the same as or newer than the preferred version.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12ba7e10
  13. 20 9月, 2018 2 次提交
  14. 22 8月, 2018 1 次提交
  15. 10 8月, 2018 5 次提交
  16. 06 8月, 2018 2 次提交
    • P
      mlxsw: spectrum: Configure MC-aware mode on mlxsw ports · 7b819530
      Petr Machata 提交于
      In order to give unicast traffic precedence over BUM traffic, configure
      multicast-aware mode on all ports.
      
      Under multicast-aware regime, when assigning traffic class to a packet,
      the switch doesn't merely take the value prescribed by the QTCT
      register. For BUM traffic, it instead assigns that value plus 8.
      
      ETS elements for TCs 8..15 thus need to be configured as well. Extend
      mlxsw_sp_port_ets_init() so that it maps each of them to the same
      subgroup as their corresponding TC from the range 0..7, such that TCs X
      and X+8 map to the same subgroup.
      
      The existing code configures TCs with strict priority. So far this was
      immaterial, because each TC had its own subgroup. Now that two TCs share
      a subgroup it becomes important. TCs are prioritized in order of 7, 6,
      ..., 0, 15, 14, ..., 8: the higher TCs used for BUM traffic end up being
      deprioritized. Since that's what's needed, keep that configuration as it
      is, and configure the new TCs likewise.
      
      Finally in mlxsw_sp_port_create(), invoke configuration of QTCTM to
      enable MC-aware mode on each port.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b819530
    • P
      mlxsw: spectrum: Fix a typo · d0a07d6a
      Petr Machata 提交于
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0a07d6a
  17. 24 7月, 2018 1 次提交
    • J
      mlxsw: spectrum: Implement chain template hinting · e2f2a1fd
      Jiri Pirko 提交于
      Since cld_flower provides information about the filter template for
      specific chain, use this information in order to prepare a region.
      Use the template to find out what elements are going to be used
      and pass that down to mlxsw_sp_acl_tcam_group_add(). Later on, when the
      first filter is inserted, the mlxsw_sp_acl_tcam_group_use_patterns()
      function would use this element usage information instead of looking
      up a pattern.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2f2a1fd
  18. 19 7月, 2018 1 次提交
  19. 17 7月, 2018 1 次提交
  20. 15 7月, 2018 3 次提交
  21. 10 7月, 2018 5 次提交
  22. 08 7月, 2018 1 次提交
  23. 26 6月, 2018 1 次提交