1. 26 Aug, 2021 7 commits
  2. 25 Aug, 2021 8 commits
  3. 24 Aug, 2021 3 commits
  4. 23 Aug, 2021 5 commits
  5. 22 Aug, 2021 8 commits
  6. 19 Aug, 2021 5 commits
  7. 05 Aug, 2021 4 commits
    • Mark Bloch's avatar
      net/mlx5: Lag, Create shared FDB when in switchdev mode · 598fe77d
      Mark Bloch authored
      If both eswitches are in switchdev mode and the uplink representors
      are enslaved to the same bond device create a shared FDB configuration.
      
      When moving to shared FDB mode not only the hardware needs be configured
      but the RDMA driver needs to reconfigure itself.
      
      When such change is done, unload the RDMA devices, configure the hardware
      and load the RDMA representors.
      
      When destroying the lag (can happen if a PCI function is unbinded,
      driver is unloaded or by just removing a netdev from the bond) make sure
      to restore the system to the previous state only if possible.
      
      For example, if a PCI function is unbinded there is no need to load the
      representors as the device is going away.
      Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      598fe77d
    • Mark Bloch's avatar
      net/mlx5: E-Switch, add logic to enable shared FDB · db202995
      Mark Bloch authored
      Shared FDB allows to direct traffic from all the vports in the HCA to a
      single eswitch. In order to do that three things are needed.
      
      1) Point the ingress ACL of the slave uplink to that of the master.
         With this, wire traffic from both uplinks will reach the same eswitch
         with the same metadata where a single steering rule can catch traffic
         from both ports.
      
      2) Set the FDB root flow table of the slave's eswitch to that of the
         master. As this flow table can change dynamically make sure to
         sync it on any set root flow table FDB command.
         This will make sure traffic from SFs, VFs, ECPFs and PFs reach the
         master eswitch.
      
      3) Split wire traffic at the eswitch manager egress ACL so that it's
         directed to the native eswitch manager. We only treat wire traffic
         from both ports the same at the eswitch level. If such traffic wasn't
         handled in the eswitch it needs to reach the right representor to be
         processed by software. For example LACP packets should *always*
         reach the right uplink representor for correct operation.
      Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
      Reviewed-by: default avatarMark Zhang <markzhang@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      db202995
    • Mark Bloch's avatar
      net/mlx5: Lag, move lag destruction to a workqueue · 63d4a9af
      Mark Bloch authored
      If a netdev is removed from the lag the lag should be destroyed.
      With downstream patches this might trigger a reconfiguration of
      representors on a different eswitch and such we don't have the proper
      locking to so from this path. Move the destruction to be done by the
      workqueue.
      
      As the destruction won't affect the netdev side it okay to do so.
      The RDMA side will be reconfigured and it already coded to handle such
      reconfiguration.
      Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
      Reviewed-by: default avatarMark Zhang <markzhang@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      63d4a9af
    • Mark Bloch's avatar
      net/mlx5: Lag, properly lock eswitch if needed · cac1eb2c
      Mark Bloch authored
      Currently when doing hardware lag we check the eswitch mode
      but as this isn't done under a lock the check isn't valid.
      
      As the code needs to sync between two different devices an extra
      care is needed.
      
      - When going to change eswitch mode, if hardware lag is active destroy it.
      - While changing eswitch modes block any hardware bond creation.
      - Delay handling bonding events until there are no mode changes in
        progress.
      - When attaching a new mdev to lag, block until there is no mode change
        in progress. In order for the mode change to finish the interface lock
        will have to be taken. Release the lock and sleep for 100ms to
        allow forward progress. As this is a very rare condition (can happen if
        the user unbinds and binds a PCI function while also changing eswitch
        mode of the other PCI function) it has no real world impact.
      
      As taking multiple eswitch mode locks is now required lockdep will
      complain about a possible deadlock. Register a key per eswitch to make
      lockdep happy.
      Signed-off-by: default avatarMark Bloch <mbloch@nvidia.com>
      Reviewed-by: default avatarMark Zhang <markzhang@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      cac1eb2c