patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>,
	Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/bnxt: fix TSO' has been queued to LTS release 18.11.3
Date: Fri, 21 Jun 2019 17:45:54 +0100	[thread overview]
Message-ID: <20190621164626.31219-10-ktraynor@redhat.com> (raw)
In-Reply-To: <20190621164626.31219-1-ktraynor@redhat.com>

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@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@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@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@dpdk.org

  parent reply	other threads:[~2019-06-21 16:48 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 16:45 [dpdk-stable] patch 'kni: fix build on RHEL8' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'examples: fix make clean when using pkg-config' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/ixgbe: fix unexpected link handler' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/fm10k: advertise supported RSS hash function' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/i40e: fix Tx threshold setup' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/mlx5: fix missing validation of null pointer' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/mlx5: fix description of return value' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/mlx5: fix memory free on queue create error' " Kevin Traynor
2019-06-21 16:45 ` Kevin Traynor [this message]
2019-06-21 16:45 ` [dpdk-stable] patch 'net/bnxt: check for error conditions in Tx path' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/bnxt: fix Tx batching' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/bnxt: optimize " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'net/vmxnet3: fix uninitialized variable' " Kevin Traynor
2019-06-21 16:45 ` [dpdk-stable] patch 'fix off-by-one errors in snprintf' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'doc: robustify PDF build' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'doc: fix PDF with greek letter' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/cxgbe: do not dereference global config struct' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'examples/multi_process: do not dereference global config' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'examples/qos_sched: do not dereference global config struct' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'test/hash: use existing lcore API' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'config: disable armv8 crypto extension' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'examples/ip_fragmentation: fix Tx queues init' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'mem: ease init in a docker container' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'doc: fix Linux guide for arm64 cross-compilation' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'examples/multi_process: fix FreeBSD build' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'bpf: fix pseudo calls for program loaded from ELF' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'acl: fix build with some arm64 compiler' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/af_packet: fix RxQ errors stat' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/avp: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/bnxt: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/cxgbe: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/kni: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/mlx4: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/mlx5: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/null: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/pcap: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/ring: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/szedata2: " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/tap: " Kevin Traynor
2019-06-27 16:48   ` Kevin Traynor
2019-06-28 10:00     ` David Marchand
2019-06-28 12:11       ` Thomas Monjalon
2019-06-21 16:46 ` [dpdk-stable] patch 'net/mlx5: fix order of items in NEON scatter' " Kevin Traynor
2019-06-21 16:46 ` [dpdk-stable] patch 'net/bnxt: fix RSS RETA indirection table ops' " Kevin Traynor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190621164626.31219-10-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=sriharsha.basavapatna@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).