1. 01 Nov, 2019 1 commit
  2. 09 Aug, 2019 3 commits
    • Vlad Buslov's avatar
      net/mlx5e: Protect encap hash table with mutex · 61086f39
      Vlad Buslov authored
      
      
      To remove dependency on rtnl lock, protect encap hash table from concurrent
      modifications with new "encap_tbl_lock" mutex. Use the mutex to protect
      internal encap entry state from concurrent modification. This is necessary
      because a flow can be attached to multiple encap entries simultaneously,
      which significantly complicates using finer grained per-entry lock.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      61086f39
    • Vlad Buslov's avatar
      net/mlx5e: Protect mod_hdr hash table with mutex · d2faae25
      Vlad Buslov authored
      
      
      To remove dependency on rtnl lock, protect mod_hdr hash table from
      concurrent modifications with new mutex.
      
      Implement helper function to get flow namespace to prevent code
      duplication.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      d2faae25
    • Vlad Buslov's avatar
      net/mlx5e: Extend mod header entry with reference counter · dd58edc3
      Vlad Buslov authored
      
      
      List of flows attached to mod header entry is used as implicit reference
      counter (mod header entry is deallocated when list becomes free) and as a
      mechanism to obtain mod header entry that flow is attached to (through list
      head). This is not safe when concurrent modification of list of flows
      attached to mod header entry is possible. Proper atomic reference counter
      is required to support concurrent access.
      
      As a preparation for extending mod header with reference counting, extract
      code that lookups and deletes mod header entry into standalone put/get
      helpers. In order to remove this dependency on external locking, extend mod
      header entry with reference counter to manage its lifetime and extend flow
      structure with direct pointer to mod header entry that flow is attached to.
      
      To remove code duplication between legacy and switchdev mode
      implementations that both support mod_hdr functionality, store mod_hdr
      table in dedicated structure used by both fdb and kernel namespaces. New
      table structure is extended with table lock by one of the following patches
      in this series. Implement helper function to get correct mod_hdr table
      depending on flow namespace.
      Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Reviewed-by: default avatarJianbo Liu <jianbol@mellanox.com>
      Reviewed-by: default avatarRoi Dayan <roid@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      dd58edc3
  3. 06 Aug, 2019 1 commit
  4. 01 Aug, 2019 7 commits
  5. 29 Jul, 2019 2 commits
  6. 15 Jul, 2019 1 commit
  7. 11 Jul, 2019 1 commit
  8. 03 Jul, 2019 2 commits
    • Parav Pandit's avatar
      net/mlx5: Refactor mlx5_esw_query_functions for modularity · dd28087c
      Parav Pandit authored
      
      
      Functions change event output data size changes when functions other
      than VFs will be enabled in HCA CAP.
      With current API, multiple callers needs to align, calculate accurate
      size of the output data depending on number on non VF functions enabled
      in the device.
      Instead of duplicating such math at multiple places, refactor
      mlx5_esw_query_functions() to return raw output allocated by itself.
      
      Caller must free the allocated memory using kvfree() as described in the
      function comment section.
      This hides calcuation within mlx5_esw_query_functions() and provides
      simpler API.
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      dd28087c
    • Parav Pandit's avatar
      net/mlx5: Introduce and use mlx5_eswitch_get_total_vports() · 2752b823
      Parav Pandit authored
      
      
      Instead MLX5_TOTAL_VPORTS, use mlx5_eswitch_get_total_vports().
      mlx5_eswitch_get_total_vports() in subsequent patch accounts for SF
      vports as well.
      Expanding MLX5_TOTAL_VPORTS macro would require exposing SF internals to
      more generic vport.h header file. Such exposure is not desired.
      Hence a mlx5_eswitch_get_total_vports() is introduced.
      
      Given that mlx5_eswitch_get_total_vports() API wants to work on const
      mlx5_core_dev*, change its helper functions also to accept const *dev.
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2752b823
  9. 01 Jul, 2019 7 commits
  10. 26 Jun, 2019 3 commits
  11. 16 Jun, 2019 1 commit
  12. 13 Jun, 2019 2 commits
  13. 31 May, 2019 1 commit
  14. 17 May, 2019 1 commit
  15. 01 May, 2019 5 commits
  16. 29 Mar, 2019 2 commits