1. 01 Jul, 2019 4 commits
  2. 26 Jun, 2019 6 commits
  3. 16 Jun, 2019 1 commit
  4. 13 Jun, 2019 2 commits
  5. 31 May, 2019 3 commits
  6. 01 May, 2019 3 commits
    • Bodong Wang's avatar
      net/mlx5: E-Switch, Use atomic rep state to serialize state change · 6f4e0219
      Bodong Wang authored
      When the state of rep was introduced, it was also designed to prevent
      duplicate unloading of the same rep. Considering the following two
      flows when an eswitch manager is at switchdev mode with n VF reps loaded.
      
      +--------------------------------------+--------------------------------+
      | cpu-0                                | cpu-1                          |
      | --------                             | --------                       |
      | mlx5_ib_remove                       | mlx5_eswitch_disable_sriov     |
      |  mlx5_ib_unregister_vport_reps       |  esw_offloads_cleanup          |
      |   mlx5_eswitch_unregister_vport_reps |   esw_offloads_unload_all_reps |
      |    __unload_reps_all_vport           |    __unload_reps_all_vport     |
      +--------------------------------------+--------------------------------+
      
      These two flows will try to unload the same rep. Per original design,
      once one flow unloads the rep, the state moves to REGISTERED. The 2nd
      flow will no longer needs to do the unload and bails out. However, as
      read and write of the state is not atomic, when 1st flow is doing the
      unload, the state is still LOADED, 2nd flow is able to do the same
      unload action. Kernel crash will happen.
      
      To solve this, driver should do atomic test-and-set for the state. So
      that only one flow can change the rep state from LOADED to REGISTERED,
      and proceed to do the actual unloading.
      
      Since the state is changing to atomic type, all other read/write should
      be atomic action as well.
      
      Fixes: f121e0ea
      
       (net/mlx5: E-Switch, Add state to eswitch vport representors)
      Signed-off-by: default avatarBodong Wang <bodong@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarVu Pham <vuhuong@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      6f4e0219
    • Parav Pandit's avatar
      net/mlx5: Reuse mlx5_esw_for_each_vf_vport macro in two files · 786ef904
      Parav Pandit authored
      
      
      Currently mlx5_esw_for_each_vf_vport iterates over mlx5_vport entries in
      eswitch.c
      Same macro in eswitch_offloads.c iterates over vport number in
      eswitch_offloads.c
      
      Instead of duplicate macro names, to avoid confusion and to reuse the
      same macro in both files, move it to eswitch.h.
      
      To iterate over vport numbers where there is no need to iterate over
      mlx5_vport, but only a vport number is needed, rename those macros in
      eswitch_offloads.c to mlx5_esw_for_each_vf_num_vport*.
      
      While at it, keep all vport and vport rep iterators together.
      
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      786ef904
    • Eli Britstein's avatar
      net/mlx5e: ACLs for priority tag mode · 18486737
      Eli Britstein authored
      
      
      Current ConnectX HW is unable to perform VLAN pop in TX path and VLAN
      push on RX path. As a workaround, untagged packets are tagged with
      VID 0x000 allowing pop/push actions to be exchanged with VLAN rewrite
      actions.
      Use the ingress ACL table, preceding the FDB, to push VLAN 0x000 ID tag
      for untagged packets and the egress ACL table, succeeding the FDB, to
      pop VLAN 0x000 ID tag.
      
      Signed-off-by: default avatarEli Britstein <elibr@mellanox.com>
      Reviewed-by: default avatarOz Shlomo <ozsh@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      18486737
  7. 29 Apr, 2019 1 commit
  8. 10 Apr, 2019 1 commit
  9. 05 Apr, 2019 1 commit
  10. 29 Mar, 2019 1 commit
  11. 22 Mar, 2019 2 commits
  12. 16 Feb, 2019 11 commits
  13. 14 Feb, 2019 2 commits
  14. 05 Feb, 2019 1 commit
    • Or Gerlitz's avatar
      net/mlx5e: Properly set steering match levels for offloaded TC decap rules · 6363651d
      Or Gerlitz authored
      The match level computed by the driver gets to be wrong for decap
      rules with wildcarded inner packet match such as:
      
      tc filter add dev vxlan_sys_4789 protocol all parent ffff: prio 2 flower
             enc_dst_ip 192.168.0.9 enc_key_id 100 enc_dst_port 4789
             action tunnel_key unset
             action mirred egress redirect dev eth1
      
      The FW errs for a missing matching meta-data indicator for the outer
      headers (where we do have a match), and a wrong matching meta-data
      indicator for the inner headers (where we don't have a match).
      
      Fix that by taking into account the matching on the tunnel info and
      relating the match level of the encapsulated packet to the firmware
      inner headers indicator in case of decap.
      
      As for vxlan we mandate a match on the tunnel udp dst port, and in general
      we practically madndate a match on the source or dest ip for any IP tunnel,
      the fix was done in a minimal manner around the tunnel match parsing code.
      
      Fixes: d708f902
      
       ('net/mlx5e: Get the required HW match level while parsing TC flow matches')
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Reported-by: default avatarSlava Ovsiienko <viacheslavo@mellanox.com>
      Reviewed-by: default avatarJianbo Liu <jianbol@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      6363651d
  15. 17 Dec, 2018 1 commit