]> Git Repo - linux.git/blobdiff - drivers/infiniband/hw/mlx5/mlx5_ib.h
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[linux.git] / drivers / infiniband / hw / mlx5 / mlx5_ib.h
index e66bf72f1f04d27b9c1c0db3f5774b672a1d6046..62338f44a30e785c535fbf266fb885a7fa88b093 100644 (file)
@@ -1541,6 +1541,18 @@ int mlx5_ib_test_wc(struct mlx5_ib_dev *dev);
 
 static inline bool mlx5_ib_lag_should_assign_affinity(struct mlx5_ib_dev *dev)
 {
+       /*
+        * If the driver is in hash mode and the port_select_flow_table_bypass cap
+        * is supported, it means that the driver no longer needs to assign the port
+        * affinity by default. If a user wants to set the port affinity explicitly,
+        * the user has a dedicated API to do that, so there is no need to assign
+        * the port affinity by default.
+        */
+       if (dev->lag_active &&
+           mlx5_lag_mode_is_hash(dev->mdev) &&
+           MLX5_CAP_PORT_SELECTION(dev->mdev, port_select_flow_table_bypass))
+               return 0;
+
        return dev->lag_active ||
                (MLX5_CAP_GEN(dev->mdev, num_lag_ports) > 1 &&
                 MLX5_CAP_GEN(dev->mdev, lag_tx_port_affinity));
This page took 0.032456 seconds and 4 git commands to generate.