Skip to content

Commit

Permalink
net/mlx5e: XPS, Fix oversight of Multi-PF Netdev changes
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cjubran authored and kuba-moo committed Aug 16, 2024
1 parent 94e5219 commit a07e953
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,15 +3028,18 @@ int mlx5e_update_tx_netdev_queues(struct mlx5e_priv *priv)
static void mlx5e_set_default_xps_cpumasks(struct mlx5e_priv *priv,
struct mlx5e_params *params)
{
struct mlx5_core_dev *mdev = priv->mdev;
int num_comp_vectors, ix, irq;

num_comp_vectors = mlx5_comp_vectors_max(mdev);
int ix;

for (ix = 0; ix < params->num_channels; ix++) {
int num_comp_vectors, irq, vec_ix;
struct mlx5_core_dev *mdev;

mdev = mlx5_sd_ch_ix_get_dev(priv->mdev, ix);
num_comp_vectors = mlx5_comp_vectors_max(mdev);
cpumask_clear(priv->scratchpad.cpumask);
vec_ix = mlx5_sd_ch_ix_get_vec_ix(mdev, ix);

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

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

0 comments on commit a07e953

Please sign in to comment.