[dpdk-stable] patch 'net/enetc: fix BD ring alignment' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:47 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ad6f6c69be6e487d254dcd4cf495841115e913cc

Thanks.

Kevin.

---
>From ad6f6c69be6e487d254dcd4cf495841115e913cc Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh at nxp.com>
Date: Wed, 23 Oct 2019 11:35:59 +0530
Subject: [PATCH] net/enetc: fix BD ring alignment

[ upstream commit 896d9372062e2f63033a607cc5893111e057cd98 ]

enetc BD rings should be aligned to 128
instead of RTE_CACHE_LINE_SIZE.

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")

Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
---
 drivers/net/enetc/base/enetc_hw.h | 3 +++
 drivers/net/enetc/enetc_ethdev.c  | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h
index f36fa11e0..478731d8d 100644
--- a/drivers/net/enetc/base/enetc_hw.h
+++ b/drivers/net/enetc/base/enetc_hw.h
@@ -13,4 +13,7 @@
 #define ENETC_DEV_ID		0xe100
 
+/* BD RING ALIGNMENT */
+#define ENETC_BD_RING_ALIGN	128
+
 /* ENETC register block BAR */
 #define ENETC_BAR_REGS			0x0
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index a21205af0..2cc851751 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -303,10 +303,10 @@ enetc_alloc_txbdr(struct enetc_bdr *txr, uint16_t nb_desc)
 
 	size = nb_desc * sizeof(struct enetc_swbd);
-	txr->q_swbd = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+	txr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
 	if (txr->q_swbd == NULL)
 		return -ENOMEM;
 
 	size = nb_desc * sizeof(struct enetc_tx_bd);
-	txr->bd_base = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+	txr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
 	if (txr->bd_base == NULL) {
 		rte_free(txr->q_swbd);
@@ -454,10 +454,10 @@ enetc_alloc_rxbdr(struct enetc_bdr *rxr,
 
 	size = nb_rx_desc * sizeof(struct enetc_swbd);
-	rxr->q_swbd = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+	rxr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
 	if (rxr->q_swbd == NULL)
 		return -ENOMEM;
 
 	size = nb_rx_desc * sizeof(union enetc_rx_bd);
-	rxr->bd_base = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+	rxr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
 	if (rxr->bd_base == NULL) {
 		rte_free(rxr->q_swbd);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:39.970929350 +0000
+++ 0013-net-enetc-fix-BD-ring-alignment.patch	2019-12-10 14:49:38.999458756 +0000
@@ -1 +1 @@
-From 896d9372062e2f63033a607cc5893111e057cd98 Mon Sep 17 00:00:00 2001
+From ad6f6c69be6e487d254dcd4cf495841115e913cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 896d9372062e2f63033a607cc5893111e057cd98 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index fd71155ee..2fe7ccb5b 100644
+index f36fa11e0..478731d8d 100644
@@ -31 +32 @@
-index dc05c00ff..4e978348c 100644
+index a21205af0..2cc851751 100644
@@ -34 +35 @@
-@@ -179,10 +179,10 @@ enetc_alloc_txbdr(struct enetc_bdr *txr, uint16_t nb_desc)
+@@ -303,10 +303,10 @@ enetc_alloc_txbdr(struct enetc_bdr *txr, uint16_t nb_desc)
@@ -47 +48 @@
-@@ -326,10 +326,10 @@ enetc_alloc_rxbdr(struct enetc_bdr *rxr,
+@@ -454,10 +454,10 @@ enetc_alloc_rxbdr(struct enetc_bdr *rxr,



More information about the stable mailing list