Skip to content

Commit a07e953

Browse files
cjubrankuba-moo
authored andcommitted
net/mlx5e: XPS, Fix oversight of Multi-PF Netdev changes
The offending commit overlooked the Multi-PF Netdev changes. Revert mlx5e_set_default_xps_cpumasks to incorporate Multi-PF Netdev changes. Fixes: bcee093 ("net/mlx5e: Modifying channels number and updating TX queues") Signed-off-by: Carolina Jubran <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 94e5219 commit a07e953

File tree

1 file changed

+8
-5
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+8
-5
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3028,15 +3028,18 @@ int mlx5e_update_tx_netdev_queues(struct mlx5e_priv *priv)
30283028
static void mlx5e_set_default_xps_cpumasks(struct mlx5e_priv *priv,
30293029
struct mlx5e_params *params)
30303030
{
3031-
struct mlx5_core_dev *mdev = priv->mdev;
3032-
int num_comp_vectors, ix, irq;
3033-
3034-
num_comp_vectors = mlx5_comp_vectors_max(mdev);
3031+
int ix;
30353032

30363033
for (ix = 0; ix < params->num_channels; ix++) {
3034+
int num_comp_vectors, irq, vec_ix;
3035+
struct mlx5_core_dev *mdev;
3036+
3037+
mdev = mlx5_sd_ch_ix_get_dev(priv->mdev, ix);
3038+
num_comp_vectors = mlx5_comp_vectors_max(mdev);
30373039
cpumask_clear(priv->scratchpad.cpumask);
3040+
vec_ix = mlx5_sd_ch_ix_get_vec_ix(mdev, ix);
30383041

3039-
for (irq = ix; irq < num_comp_vectors; irq += params->num_channels) {
3042+
for (irq = vec_ix; irq < num_comp_vectors; irq += params->num_channels) {
30403043
int cpu = mlx5_comp_vector_get_cpu(mdev, irq);
30413044

30423045
cpumask_set_cpu(cpu, priv->scratchpad.cpumask);

0 commit comments

Comments
 (0)