[dpdk-stable] patch 'net/bnxt: fix TSO' has been queued to LTS release 18.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Jun 21 18:45:54 CEST 2019
Hi,
FYI, your patch has been queued to LTS release 18.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 06/26/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/2835ed89df01ecad1ecd039581282b2a39e8cfae
Thanks.
Kevin Traynor
---
>From 2835ed89df01ecad1ecd039581282b2a39e8cfae Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Wed, 15 May 2019 11:08:12 -0700
Subject: [PATCH] net/bnxt: fix TSO
[ upstream commit c750eae57fe8908163e6debb64e1106b9b554710 ]
We wrongly update lflags in the Tx descriptor; avoid it.
Also, instead of calculating the last producer index to see if mbuf
segments are chained, check if the pointer is NULL to iterate through
the segment list.
Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna at broadcom.com>
---
drivers/net/bnxt/bnxt_txr.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 39be7bdfa..6f55f3c53 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -124,5 +124,4 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
uint32_t vlan_tag_flags, cfa_action;
bool long_bd = false;
- uint16_t last_prod = 0;
struct rte_mbuf *m_seg;
struct bnxt_sw_tx_bd *tx_buf;
@@ -144,6 +143,4 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
tx_buf->mbuf = tx_pkt;
tx_buf->nr_bds = long_bd + tx_pkt->nb_segs;
- last_prod = (txr->tx_prod + tx_buf->nr_bds - 1) &
- txr->tx_ring_struct->ring_mask;
if (unlikely(bnxt_tx_avail(txr) < tx_buf->nr_bds))
@@ -194,9 +191,15 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
if (tx_pkt->ol_flags & PKT_TX_TCP_SEG) {
+ uint16_t hdr_size;
+
/* TSO */
txbd1->lflags |= TX_BD_LONG_LFLAGS_LSO;
- txbd1->hdr_size = tx_pkt->l2_len + tx_pkt->l3_len +
+ hdr_size = tx_pkt->l2_len + tx_pkt->l3_len +
tx_pkt->l4_len + tx_pkt->outer_l2_len +
tx_pkt->outer_l3_len;
+ /* The hdr_size is multiple of 16bit units not 8bit.
+ * Hence divide by 2.
+ */
+ txbd1->hdr_size = hdr_size >> 1;
txbd1->mss = tx_pkt->tso_segsz;
@@ -283,5 +286,5 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
m_seg = tx_pkt->next;
/* i is set at the end of the if(long_bd) block */
- while (txr->tx_prod != last_prod) {
+ while (m_seg) {
txr->tx_prod = RING_NEXT(txr->tx_ring_struct, txr->tx_prod);
tx_buf = &txr->tx_buf_ring[txr->tx_prod];
@@ -296,6 +299,4 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
txbd->flags_type |= TX_BD_LONG_FLAGS_PACKET_END;
- if (txbd1)
- txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags);
txr->tx_prod = RING_NEXT(txr->tx_ring_struct, txr->tx_prod);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-06-21 17:22:12.271296463 +0100
+++ 0010-net-bnxt-fix-TSO.patch 2019-06-21 17:22:11.719519217 +0100
@@ -1 +1 @@
-From c750eae57fe8908163e6debb64e1106b9b554710 Mon Sep 17 00:00:00 2001
+From 2835ed89df01ecad1ecd039581282b2a39e8cfae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c750eae57fe8908163e6debb64e1106b9b554710 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list