From: Saeed Mahameed Date: Tue, 7 Feb 2017 14:30:52 +0000 (+0200) Subject: net/mlx5e: Set netdev->rx_cpu_rmap on netdev creation X-Git-Tag: v4.12-rc1~64^3~326^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be4891af77226d5909be11ab4297434cfd8c391d;p=platform%2Fkernel%2Flinux-exynos.git net/mlx5e: Set netdev->rx_cpu_rmap on netdev creation 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 Reviewed-by: Tariq Toukan --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 469d6c1..f0eff5e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -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);