Skip to content

Commit 27b3360

Browse files
Gavi Teitzroidayan
authored andcommitted
net/mlx5e: Change VF representor's RQ size and type
Set the representor's rq params using the same method the standard nic netdev uses to set its rq params. This allowed the representor to use a striding rq if it is supported, and allowed for increasing the size of the representor's rq if it is not. This increases the representor's receive performance, as can be seen in the following measruements: Baseline VF/VM: TCP Throughput [Gb/s] UDP Received PPS (Drop %) VF to VM 29.1 571K (0%) VM to VF 16.4 623K (27%) Representor/VM before current changes: TCP Throughput [Gb/s] UDP Received PPS (Drop %) Representor to VM 40.8 462K (0%) VM to Representor 0.6 248K (74%) Representor/VM after current changes: TCP Throughput [Gb/s] UDP Received PPS (Drop %) Representor to VM 40.6 476K (0%) VM to Representor 20.2 620K (74%) Issue: 1155559 Change-Id: I6cd96f24d1c93da4dd2b8d80ce0ae4ab19028d2a Signed-off-by: Gavi Teitz <[email protected]>
1 parent b46a1c3 commit 27b3360

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,8 @@ void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params,
932932
u8 cq_period_mode);
933933
void mlx5e_set_rq_type_params(struct mlx5_core_dev *mdev,
934934
struct mlx5e_params *params, u8 rq_type);
935+
void mlx5e_set_rq_params(struct mlx5_core_dev *mdev,
936+
struct mlx5e_params *params);
935937

936938
static inline
937939
struct mlx5e_tx_wqe *mlx5e_post_nop(struct mlx5_wq_cyc *wq, u32 sqn, u16 *pc)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void mlx5e_set_rq_type_params(struct mlx5_core_dev *mdev,
115115
MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS));
116116
}
117117

118-
static void mlx5e_set_rq_params(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
118+
void mlx5e_set_rq_params(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
119119
{
120120
u8 rq_type = mlx5e_check_fragmented_striding_rq_cap(mdev) &&
121121
!params->xdp_prog && !MLX5_IPSEC_DEV(mdev) ?

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,15 +787,14 @@ static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev,
787787
MLX5_CQ_PERIOD_MODE_START_FROM_EQE;
788788

789789
params->log_sq_size = MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE;
790-
params->rq_wq_type = MLX5_WQ_TYPE_LINKED_LIST;
791-
params->log_rq_size = MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE;
790+
791+
mlx5e_set_rq_params(mdev, params);
792792

793793
params->rx_am_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
794794
mlx5e_set_rx_cq_mode_params(params, cq_period_mode);
795795

796796
params->tx_max_inline = mlx5e_get_max_inline_cap(mdev);
797797
params->num_tc = 1;
798-
params->lro_wqe_sz = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ;
799798

800799
mlx5_query_min_inline(mdev, &params->tx_min_inline_mode);
801800
}
@@ -933,7 +932,7 @@ static struct mlx5e_profile mlx5e_rep_profile = {
933932
.max_nch = mlx5e_get_rep_max_num_channels,
934933
.update_carrier = NULL,
935934
.rx_handlers.handle_rx_cqe = mlx5e_handle_rx_cqe_rep,
936-
.rx_handlers.handle_rx_cqe_mpwqe = NULL /* Not supported */,
935+
.rx_handlers.handle_rx_cqe_mpwqe = mlx5e_handle_rx_cqe_mpwrq,
937936
.max_tc = 1,
938937
};
939938

0 commit comments

Comments
 (0)