1. 18 Aug, 2021 8 commits
  2. 17 Aug, 2021 27 commits
  3. 16 Aug, 2021 5 commits
    • Vlad Buslov's avatar
      net/mlx5: Bridge, support LAG · ff9b7521
      Vlad Buslov authored
      Allow adding bond net devices to mlx5 bridge with following changes:
      
      - Modify bridge representor code to obtain uplink represetor that belongs
      to eswitch that is registered for notification. Require representor to be
      in shared FDB mode. If representor is the lag master, then consider its
      port as local, otherwise treat it as peer.
      
      - Use devcom to match on paired eswitch metadata in peer FDB entries. This
      is necessary for shared FDB LAG to function since packets are always
      received on active eswitch instance as opposed to parent eswitch of port.
      
      - Support for deleting peer flows when receiving
      SWITCHDEV_FDB_DEL_TO_BRIDGE notification was implemented in one of previous
      patches in series. Now also implement support for handling
      SWITCHDEV_FDB_ADD_TO_BRIDGE which can be generated on peer by bridge update
      workqueue task in LAG configuration. Refresh the flow 'lastuse' timestamp
      to current jiffies when receiving such notification on eswitch that manages
      the local FDB entry. This allows peer entries to prevent ageing of the FDB.
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      ff9b7521
    • Vlad Buslov's avatar
      net/mlx5: Bridge, allow merged eswitch connectivity · c358ea17
      Vlad Buslov authored
      Allow connectivity between representors of different eswitch instances that
      are attached to same bridge when merged_eswitch capability is enabled. Add
      ports of peer eswitch to bridge instance and mark them with
      MLX5_ESW_BRIDGE_PORT_FLAG_PEER. Mark FDBs offloaded on peer ports with
      MLX5_ESW_BRIDGE_FLAG_PEER flag. Such FDBs can only be aged out on their
      local eswitch instance, which then sends SWITCHDEV_FDB_DEL_TO_BRIDGE event.
      Listen to the event on mlx5 bridge implementation and delete peer FDBs in
      event handler.
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      c358ea17
    • Vlad Buslov's avatar
      net/mlx5: Bridge, extract FDB delete notification to function · bf3d56d8
      Vlad Buslov authored
      SWITCHDEV_FDB_DEL_TO_BRIDGE notification is generated in multiple places in
      bridge code. Following patch in series changes the condition for the
      notification. Extract the notification into dedicated helper function
      mlx5_esw_bridge_fdb_del_notify() to only modify it in single place in the
      future changes.
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      bf3d56d8
    • Vlad Buslov's avatar
      net/mlx5: Bridge, identify port by vport_num+esw_owner_vhca_id pair · 3ee6233e
      Vlad Buslov authored
      Following patches in series allow traffic between vports of different
      eswitch instances, which requires addressing bridge port by
      vport_num+esw_owner_vhca_id pair since vport_num is only unique
      per-eswitch. As a preparation, extend struct mlx5_esw_bridge_port with
      'esw_owner_vhca_id' field and use it as part of key for
      mlx5_esw_bridge->vports xarray.
      
      With this change we can't rely on switchdev_handle_port_obj_add() helper to
      get mlx5 representor from stacked device because we need specifically
      representor from parent eswitch that registered the callback to obtain
      correct esw_owner_vhca_id. The helper doesn't allow passing additional
      parameters to predicate function and doesn't provide access to the notifier
      block to obtain eswitch through br_offloads. Implement custom helpers to
      obtain mlx5 representor and use them in
      mlx5_esw_bridge_port_obj_{add|del|attr_set}() implementations.
      
      Remove direct pointer to parent bridge from struct mlx5_vport as it is no
      longer needed.
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      3ee6233e
    • Vlad Buslov's avatar
      net/mlx5: Bridge, obtain core device from eswitch instead of priv · a514d173
      Vlad Buslov authored
      Following patches in series will pass bond device to bridge, which means
      the code can't assume the device is mlx5 representor. Moreover, the core
      device can be easily obtained from eswitch instance, so there is no reason
      for more complex code that obtains struct mlx5_priv from net_device in
      order to use its mdev. Refactor the code to use esw->dev instead of
      priv->mdev.
      Signed-off-by: default avatarVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      a514d173