patch 'net/nfp: fix max DMA length' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:16 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=6c9834cd2add682187ee948a485cd0e70158815a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6c9834cd2add682187ee948a485cd0e70158815a Mon Sep 17 00:00:00 2001
From: Richard Donkin <richard.donkin at corigine.com>
Date: Fri, 3 Feb 2023 10:23:28 +0800
Subject: [PATCH] net/nfp: fix max DMA length
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 4a44ca26db4f8492be4bda462adfd5d1b70e06c2 ]

The DMA transfer length is allowed to be as large as
NFDK_TX_MAX_DATA_PER_HEAD. The existing check would not allow a simple-
type descriptor to be created for a packet of size
NFDK_TX_MAX_DATA_PER_HEAD, but it would also not enable gather-type
descriptors to be created correctly later.

Change the limit of simple-type descriptors to include packets of size
NFDK_TX_MAX_DATA_PER_HEAD.

In practice this fixes traffic with packets of size 4096. Previously
such packets would not be transmitted correctly.

Fixes: c73dced48c8c ("net/nfp: add NFDk Tx")

Signed-off-by: Richard Donkin <richard.donkin at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 drivers/net/nfp/nfp_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index e2cdb9e27e..9e20917b5e 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -1215,7 +1215,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pk
 		if ((hw->cap & NFP_NET_CFG_CTRL_LSO_ANY) &&
 				(pkt->ol_flags & RTE_MBUF_F_TX_TCP_SEG)) {
 			type = NFDK_DESC_TX_TYPE_TSO;
-		} else if (!pkt->next && dma_len < NFDK_TX_MAX_DATA_PER_HEAD) {
+		} else if (pkt->next == NULL && dma_len <= NFDK_TX_MAX_DATA_PER_HEAD) {
 			type = NFDK_DESC_TX_TYPE_SIMPLE;
 		} else {
 			type = NFDK_DESC_TX_TYPE_GATHER;
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:44.365147900 +0800
+++ 0109-net-nfp-fix-max-DMA-length.patch	2023-02-27 14:08:40.859237000 +0800
@@ -1 +1 @@
-From 4a44ca26db4f8492be4bda462adfd5d1b70e06c2 Mon Sep 17 00:00:00 2001
+From 6c9834cd2add682187ee948a485cd0e70158815a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4a44ca26db4f8492be4bda462adfd5d1b70e06c2 ]
@@ -19 +21,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index 79a66b6e44..b3beb33109 100644
+index e2cdb9e27e..9e20917b5e 100644
@@ -31 +33 @@
-@@ -1476,7 +1476,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pk
+@@ -1215,7 +1215,7 @@ nfp_net_nfdk_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pk
@@ -35 +37 @@
--		} else if (pkt->next == NULL && dma_len < NFDK_TX_MAX_DATA_PER_HEAD) {
+-		} else if (!pkt->next && dma_len < NFDK_TX_MAX_DATA_PER_HEAD) {


More information about the stable mailing list