]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: fix Tx queue doorbell record field offset
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Wed, 28 Apr 2021 09:18:19 +0000 (12:18 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Sun, 9 May 2021 09:37:15 +0000 (11:37 +0200)
If the Send Queue (backing one for PMD Tx queue) the was
created with DevX API the doorbell record offset for the
producer index field was incorrect. If hardware missed the
doorbell register write event the wrong content of doorbell
record might cause queue malfunction. For the Send Queues
created with Verbs API the doorbell record offset was
configured correctly.

Fixes: 86d259cec852 ("net/mlx5: separate Tx queue object creations")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_devx.c

index 76d31f553949e321a073e6515286214542e991a4..531a81d7fa578875421571ec4413303c755056ab 100644 (file)
@@ -1113,7 +1113,7 @@ mlx5_txq_devx_obj_new(struct rte_eth_dev *dev, uint16_t idx)
        txq_data->wqe_pi = 0;
        txq_data->wqe_comp = 0;
        txq_data->wqe_thres = txq_data->wqe_s / MLX5_TX_COMP_THRESH_INLINE_DIV;
-       txq_data->qp_db = txq_obj->sq_obj.db_rec;
+       txq_data->qp_db = &txq_obj->sq_obj.db_rec[MLX5_SND_DBR];
        *txq_data->qp_db = 0;
        txq_data->qp_num_8s = txq_obj->sq_obj.sq->id << 8;
        /* Change Send Queue state to Ready-to-Send. */