Commit 025380b2 authored by Or Gerlitz's avatar Or Gerlitz Committed by Saeed Mahameed

net/mlx5e: Use single argument for the esw representor build params helper

This is prep step towards adding dedicated uplink representor.

The patch doesn't change any functionality.
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 915fe1a0
...@@ -1205,17 +1205,19 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = { ...@@ -1205,17 +1205,19 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = {
.ndo_change_mtu = mlx5e_change_rep_mtu, .ndo_change_mtu = mlx5e_change_rep_mtu,
}; };
static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev, static void mlx5e_build_rep_params(struct net_device *netdev)
struct mlx5e_params *params,
struct mlx5e_rss_params *rss_params,
u16 mtu)
{ {
struct mlx5e_priv *priv = netdev_priv(netdev);
struct mlx5_core_dev *mdev = priv->mdev;
struct mlx5e_params *params;
u8 cq_period_mode = MLX5_CAP_GEN(mdev, cq_period_start_from_cqe) ? u8 cq_period_mode = MLX5_CAP_GEN(mdev, cq_period_start_from_cqe) ?
MLX5_CQ_PERIOD_MODE_START_FROM_CQE : MLX5_CQ_PERIOD_MODE_START_FROM_CQE :
MLX5_CQ_PERIOD_MODE_START_FROM_EQE; MLX5_CQ_PERIOD_MODE_START_FROM_EQE;
params = &priv->channels.params;
params->hard_mtu = MLX5E_ETH_HARD_MTU; params->hard_mtu = MLX5E_ETH_HARD_MTU;
params->sw_mtu = mtu; params->sw_mtu = netdev->mtu;
params->log_sq_size = MLX5E_REP_PARAMS_LOG_SQ_SIZE; params->log_sq_size = MLX5E_REP_PARAMS_LOG_SQ_SIZE;
/* RQ */ /* RQ */
...@@ -1230,7 +1232,7 @@ static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev, ...@@ -1230,7 +1232,7 @@ static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev,
mlx5_query_min_inline(mdev, &params->tx_min_inline_mode); mlx5_query_min_inline(mdev, &params->tx_min_inline_mode);
/* RSS */ /* RSS */
mlx5e_build_rss_params(rss_params, params->num_channels); mlx5e_build_rss_params(&priv->rss_params, params->num_channels);
} }
static void mlx5e_build_rep_netdev(struct net_device *netdev) static void mlx5e_build_rep_netdev(struct net_device *netdev)
...@@ -1283,8 +1285,7 @@ static int mlx5e_init_rep(struct mlx5_core_dev *mdev, ...@@ -1283,8 +1285,7 @@ static int mlx5e_init_rep(struct mlx5_core_dev *mdev,
priv->channels.params.num_channels = priv->channels.params.num_channels =
mlx5e_get_netdev_max_channels(netdev); mlx5e_get_netdev_max_channels(netdev);
mlx5e_build_rep_params(mdev, &priv->channels.params, mlx5e_build_rep_params(netdev);
&priv->rss_params, netdev->mtu);
mlx5e_build_rep_netdev(netdev); mlx5e_build_rep_netdev(netdev);
mlx5e_timestamp_init(priv); mlx5e_timestamp_init(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment