net/mlx5: fix packet padding config for RxQ via DevX
PATCH 1/1 net/mlx5: fix packet padding config for RxQ via DevX
Received packets can be aligned to the size of the cache line on PCI transactions. This could improve performance by avoiding partial cache line writes in exchange for increased PCI bandwidth.
This feature is supposed to be controlled by the rxq_pkt_pad_en devarg and it is true for an RxQ created via the Verbs API. But in the DevX API case, it is erroneously controlled by the rxq_cqe_pad_en devarg instead, which is in charge of the CQE padding instead and should not control the RxQ creation.
Fix DevX RxQ creation by using the proper configuration flag for Rx packet padding that is being set by the rxq_pkt_pad_en devarg.
--- drivers/net/mlx5/mlx5_devx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_devx.c +1 -1
@@ -294,7 +294,7 @@ static void mlx5_devx_wq_attr_fill(struct mlx5_priv *priv, struct mlx5_rxq_ctrl *rxq_ctrl, struct mlx5_devx_wq_attr *wq_attr) { - wq_attr->end_padding_mode = priv->config.cqe_pad ? + wq_attr->end_padding_mode = priv->config.hw_padding ?MLX5_WQ_END_PAD_MODE_ALIGN :MLX5_WQ_END_PAD_MODE_NONE ; wq_attr->pd = priv->sh->pdn;
Signature · 1 line
2.24.1
Hi,
Quoted 18 lines
-----Original Message-----
From: Alexander Kozyrev <[email protected]>
Sent: Sunday, November 15, 2020 4:26 PM
To: [email protected]
Cc: [email protected]; Raslan Darawsheh <[email protected]>; Dekel Peled <[email protected]>; Matan Azrad <[email protected]>
Subject: [PATCH] net/mlx5: fix packet padding config for RxQ via DevXReceived packets can be aligned to the size of the cache line on PCI transactions. This could improve performance by avoiding partial cache line writes in exchange for increased PCI bandwidth.
This feature is supposed to be controlled by the
rxq_pkt_pad_endevarg and it is true for an RxQ created via the Verbs API. But in the DevX API case, it is erroneously controlled by therxq_cqe_pad_endevarg instead, which is in charge of the CQE padding instead and should not control the RxQ creation.
Quoted 8 lines
Fix DevX RxQ creation by using the proper configuration flag for Rx packet padding that is being set by the
rxq_pkt_pad_endevarg.Fixes dc9ceff73c ("net/mlx5: create advanced RxQ via DevX")Signed-off-by Alexander Kozyrev <[email protected]>Acked-by Matan Azrad <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh