1. 01 12月, 2018 1 次提交
  2. 28 11月, 2018 1 次提交
  3. 19 11月, 2018 1 次提交
  4. 04 11月, 2018 1 次提交
  5. 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
  6. 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
  7. 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
  8. 05 10月, 2018 1 次提交
  9. 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
  10. 20 9月, 2018 2 次提交
  11. 22 8月, 2018 1 次提交
  12. 10 8月, 2018 5 次提交
  13. 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
  14. 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
  15. 19 7月, 2018 1 次提交
  16. 17 7月, 2018 1 次提交
  17. 15 7月, 2018 3 次提交
  18. 10 7月, 2018 5 次提交
  19. 08 7月, 2018 1 次提交
  20. 26 6月, 2018 2 次提交
  21. 06 6月, 2018 1 次提交
  22. 29 5月, 2018 1 次提交
    • P
      mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG · 47bf9df2
      Petr Machata 提交于
      VLAN 1 is internally used for untagged traffic. Prevent creation of
      explicit netdevice for that VLAN, because that currently isn't supported
      and leads to the NULL pointer dereference cited below.
      
      Fix by preventing creation of VLAN devices with VID of 1 over mlxsw
      devices or LAG devices that involve mlxsw devices.
      
      [  327.175816] ================================================================================
      [  327.184544] UBSAN: Undefined behaviour in drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c:200:12
      [  327.193667] member access within null pointer of type 'const struct mlxsw_sp_fid'
      [  327.201226] CPU: 0 PID: 8983 Comm: ip Not tainted 4.17.0-rc4-petrm_net_ip6gre_headroom-custom-140 #11
      [  327.210496] Hardware name: Mellanox Technologies Ltd. "MSN2410-CB2F"/"SA000874", BIOS 4.6.5 03/08/2016
      [  327.219872] Call Trace:
      [  327.222384]  dump_stack+0xc3/0x12b
      [  327.234007]  ubsan_epilogue+0x9/0x49
      [  327.237638]  ubsan_type_mismatch_common+0x1f9/0x2d0
      [  327.255769]  __ubsan_handle_type_mismatch+0x90/0xa7
      [  327.264716]  mlxsw_sp_fid_type+0x35/0x50 [mlxsw_spectrum]
      [  327.270255]  mlxsw_sp_port_vlan_router_leave+0x46/0xc0 [mlxsw_spectrum]
      [  327.277019]  mlxsw_sp_inetaddr_port_vlan_event+0xe1/0x340 [mlxsw_spectrum]
      [  327.315031]  mlxsw_sp_netdevice_vrf_event+0xa8/0x100 [mlxsw_spectrum]
      [  327.321626]  mlxsw_sp_netdevice_event+0x276/0x430 [mlxsw_spectrum]
      [  327.367863]  notifier_call_chain+0x4c/0x150
      [  327.372128]  __netdev_upper_dev_link+0x1b3/0x260
      [  327.399450]  vrf_add_slave+0xce/0x170 [vrf]
      [  327.403703]  do_setlink+0x658/0x1d70
      [  327.508998]  rtnl_newlink+0x908/0xf20
      [  327.559128]  rtnetlink_rcv_msg+0x50c/0x720
      [  327.571720]  netlink_rcv_skb+0x16a/0x1f0
      [  327.583450]  netlink_unicast+0x2ca/0x3e0
      [  327.599305]  netlink_sendmsg+0x3e2/0x7f0
      [  327.616655]  sock_sendmsg+0x76/0xc0
      [  327.620207]  ___sys_sendmsg+0x494/0x5d0
      [  327.666117]  __sys_sendmsg+0xc2/0x130
      [  327.690953]  do_syscall_64+0x66/0x370
      [  327.694677]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      [  327.699782] RIP: 0033:0x7f4c2f3f8037
      [  327.703393] RSP: 002b:00007ffe8c389708 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      [  327.711035] RAX: ffffffffffffffda RBX: 000000005b03f53e RCX: 00007f4c2f3f8037
      [  327.718229] RDX: 0000000000000000 RSI: 00007ffe8c389760 RDI: 0000000000000003
      [  327.725431] RBP: 00007ffe8c389760 R08: 0000000000000000 R09: 00007f4c2f443630
      [  327.732632] R10: 00000000000005eb R11: 0000000000000246 R12: 0000000000000000
      [  327.739833] R13: 00000000006774e0 R14: 00007ffe8c3897e8 R15: 0000000000000000
      [  327.747096] ================================================================================
      
      Fixes: 9589a7b5 ("mlxsw: spectrum: Handle VLAN devices linking / unlinking")
      Suggested-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47bf9df2
  23. 20 5月, 2018 2 次提交
  24. 01 5月, 2018 1 次提交