net/mlx5e: Move mlx5e_build_rss_params() call to init_rx
RSS params belong to the RX side initialization. Move them from profile->init to profile->init_rx stage to allow the next commit to move rss_params out of priv to a dynamically-allocated struct. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
06e9f13ac5
commit
4ad3184977
@ -4538,7 +4538,6 @@ void mlx5e_build_rss_params(struct mlx5e_rss_params *rss_params,
|
||||
|
||||
void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16 mtu)
|
||||
{
|
||||
struct mlx5e_rss_params *rss_params = &priv->rss_params;
|
||||
struct mlx5e_params *params = &priv->channels.params;
|
||||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
u8 rx_cq_period_mode;
|
||||
@ -4598,10 +4597,7 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
|
||||
/* TX inline */
|
||||
mlx5_query_min_inline(mdev, ¶ms->tx_min_inline_mode);
|
||||
|
||||
/* RSS */
|
||||
mlx5e_build_rss_params(rss_params, params->num_channels);
|
||||
params->tunneled_offload_en =
|
||||
mlx5e_tunnel_inner_ft_supported(mdev);
|
||||
params->tunneled_offload_en = mlx5e_tunnel_inner_ft_supported(mdev);
|
||||
|
||||
/* AF_XDP */
|
||||
params->xsk = xsk;
|
||||
@ -4873,6 +4869,8 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)
|
||||
u16 max_nch = priv->max_nch;
|
||||
int err;
|
||||
|
||||
mlx5e_build_rss_params(&priv->rss_params, priv->channels.params.num_channels);
|
||||
|
||||
mlx5e_create_q_counters(priv);
|
||||
|
||||
err = mlx5e_open_drop_rq(priv, &priv->drop_rq);
|
||||
|
@ -585,9 +585,6 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
|
||||
params->tunneled_offload_en = false;
|
||||
|
||||
mlx5_query_min_inline(mdev, ¶ms->tx_min_inline_mode);
|
||||
|
||||
/* RSS */
|
||||
mlx5e_build_rss_params(&priv->rss_params, params->num_channels);
|
||||
}
|
||||
|
||||
static void mlx5e_build_rep_netdev(struct net_device *netdev,
|
||||
@ -763,6 +760,8 @@ static int mlx5e_init_rep_rx(struct mlx5e_priv *priv)
|
||||
u16 max_nch = priv->max_nch;
|
||||
int err;
|
||||
|
||||
mlx5e_build_rss_params(&priv->rss_params, priv->channels.params.num_channels);
|
||||
|
||||
mlx5e_init_l2_addr(priv);
|
||||
|
||||
err = mlx5e_open_drop_rq(priv, &priv->drop_rq);
|
||||
|
@ -362,6 +362,8 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv)
|
||||
u16 max_nch = priv->max_nch;
|
||||
int err;
|
||||
|
||||
mlx5e_build_rss_params(&priv->rss_params, priv->channels.params.num_channels);
|
||||
|
||||
mlx5e_create_q_counters(priv);
|
||||
|
||||
err = mlx5e_open_drop_rq(priv, &priv->drop_rq);
|
||||
|
Reference in New Issue
Block a user