Skip to content

Commit

Permalink
net/mlx5e: Set netdev->rx_cpu_rmap on netdev creation
Browse files Browse the repository at this point in the history
To simplify mlx5e_open_locked flow we set netdev->rx_cpu_rmap on netdev
creation rather on netdev open, it is redundant to set it every time on
mlx5e_open_locked.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
  • Loading branch information
Saeed Mahameed committed Mar 27, 2017
1 parent 7f859ec commit be4891a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/en_main.c
Original file line number Diff line number Diff line change
@@ -2478,9 +2478,7 @@ int mlx5e_open_locked(struct net_device *netdev)
mlx5e_redirect_rqts(priv);
mlx5e_update_carrier(priv);
mlx5e_timestamp_init(priv);
#ifdef CONFIG_RFS_ACCEL
priv->netdev->rx_cpu_rmap = priv->mdev->rmap;
#endif

if (priv->profile->update_stats)
queue_delayed_work(priv->wq, &priv->update_stats_work, 0);

@@ -4022,6 +4020,10 @@ struct net_device *mlx5e_create_netdev(struct mlx5_core_dev *mdev,
return NULL;
}

#ifdef CONFIG_RFS_ACCEL
netdev->rx_cpu_rmap = mdev->rmap;
#endif

profile->init(mdev, netdev, profile, ppriv);

netif_carrier_off(netdev);

0 comments on commit be4891a

Please sign in to comment.