[dpdk-stable] patch 'net/octeontx2: fix buffer size assignment' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 27 11:24:10 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From c4d7293707e802467de597fe4f828fbd1d03444d Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi at marvell.com>
Date: Wed, 20 May 2020 17:50:10 +0530
Subject: [PATCH] net/octeontx2: fix buffer size assignment

[ upstream commit 357439ad0927ce817ad9d4138b71554c683406a8 ]

The elt_size field in mempool holds the size of one packet buffer.
It can be used to set the lpm_sizem1 field in rq context.

The lpb_sizem1 field in rq context is 12 bit, direct assignment
to it was causing overflow of value. Because of this errors
were observed while trying inline inbound with large packets.
This patch resolves the errors.

Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")

Signed-off-by: Ankur Dwivedi <adwivedi at marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
Reviewed-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index f3281df9c4..102d06b39b 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -350,10 +350,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
 	aq->rq.first_skip = first_skip;
 	aq->rq.later_skip = (sizeof(struct rte_mbuf) / 8);
 	aq->rq.flow_tagw = 32; /* 32-bits */
-	aq->rq.lpb_sizem1 = rte_pktmbuf_data_room_size(mp);
-	aq->rq.lpb_sizem1 += rte_pktmbuf_priv_size(mp);
-	aq->rq.lpb_sizem1 += sizeof(struct rte_mbuf);
-	aq->rq.lpb_sizem1 /= 8;
+	aq->rq.lpb_sizem1 = mp->elt_size / 8;
 	aq->rq.lpb_sizem1 -= 1; /* Expressed in size minus one */
 	aq->rq.ena = 1;
 	aq->rq.pb_caching = 0x2; /* First cache aligned block to LLC */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.888853091 +0100
+++ 0007-net-octeontx2-fix-buffer-size-assignment.patch	2020-05-27 10:23:31.631933757 +0100
@@ -1,8 +1,10 @@
-From 357439ad0927ce817ad9d4138b71554c683406a8 Mon Sep 17 00:00:00 2001
+From c4d7293707e802467de597fe4f828fbd1d03444d Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi at marvell.com>
 Date: Wed, 20 May 2020 17:50:10 +0530
 Subject: [PATCH] net/octeontx2: fix buffer size assignment
 
+[ upstream commit 357439ad0927ce817ad9d4138b71554c683406a8 ]
+
 The elt_size field in mempool holds the size of one packet buffer.
 It can be used to set the lpm_sizem1 field in rq context.
 
@@ -12,7 +14,6 @@
 This patch resolves the errors.
 
 Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi at marvell.com>
 Reviewed-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
@@ -22,10 +23,10 @@
  1 file changed, 1 insertion(+), 4 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index 3116e5ca68..3f3f0a693f 100644
+index f3281df9c4..102d06b39b 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -373,10 +373,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
+@@ -350,10 +350,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
  	aq->rq.first_skip = first_skip;
  	aq->rq.later_skip = (sizeof(struct rte_mbuf) / 8);
  	aq->rq.flow_tagw = 32; /* 32-bits */


More information about the stable mailing list