Skip to content

Commit 99beaa2

Browse files
Shahar KleinSaeed Mahameed
authored andcommitted
net/mlx5e: Fix traffic between VF and representor
After the cited commit, WQE RQ size is calculated based on sw_mtu but it was not set for representors. This commit fixes that. Fixes: 472a1e4 ("net/mlx5e: Save MTU in channels params") Signed-off-by: Shahar Klein <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 9c26f5f commit 99beaa2

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+3
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,13 +877,14 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = {
877877
};
878878

879879
static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev,
880-
struct mlx5e_params *params)
880+
struct mlx5e_params *params, u16 mtu)
881881
{
882882
u8 cq_period_mode = MLX5_CAP_GEN(mdev, cq_period_start_from_cqe) ?
883883
MLX5_CQ_PERIOD_MODE_START_FROM_CQE :
884884
MLX5_CQ_PERIOD_MODE_START_FROM_EQE;
885885

886886
params->hard_mtu = MLX5E_ETH_HARD_MTU;
887+
params->sw_mtu = mtu;
887888
params->log_sq_size = MLX5E_REP_PARAMS_LOG_SQ_SIZE;
888889
params->rq_wq_type = MLX5_WQ_TYPE_LINKED_LIST;
889890
params->log_rq_mtu_frames = MLX5E_REP_PARAMS_LOG_RQ_SIZE;
@@ -931,7 +932,7 @@ static void mlx5e_init_rep(struct mlx5_core_dev *mdev,
931932

932933
priv->channels.params.num_channels = profile->max_nch(mdev);
933934

934-
mlx5e_build_rep_params(mdev, &priv->channels.params);
935+
mlx5e_build_rep_params(mdev, &priv->channels.params, netdev->mtu);
935936
mlx5e_build_rep_netdev(netdev);
936937

937938
mlx5e_timestamp_init(priv);

0 commit comments

Comments
 (0)