[dpdk-stable] patch 'net/sfc: improve TSO header length check in EF10 datapath' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Tue Apr 30 19:01:01 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 05/07/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 can be viewed on a temporary branch at:
	https://github.com/kevintraynor/dpdk-stable-queue.git

Thanks.

Kevin Traynor

---
>From cb14d5f1b47112c80699bef60954c39b8a2e81e0 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov at oktetlabs.ru>
Date: Tue, 2 Apr 2019 10:28:34 +0100
Subject: [PATCH] net/sfc: improve TSO header length check in EF10 datapath

[ upstream commit 3985802ecf7808472bebb3fa2a3809008dae66b9 ]

Move the check inside xmit function to the branch in which
the check is mandatory. It makes case when TSO header is not
fragmented a bit more faster.

Fixes: 6bc985e41155 ("net/sfc: support TSO in EF10 Tx datapath")

Signed-off-by: Igor Romanov <igor.romanov at oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/net/sfc/sfc_ef10_tx.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index ff6d5b486..cf229f8bb 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -341,7 +341,5 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 	bool eop;
 
-	/* Both checks may be done, so use bit OR to have only one branching */
-	if (unlikely((header_len > SFC_TSOH_STD_LEN) |
-		     (tcph_off > txq->tso_tcp_header_offset_limit)))
+	if (unlikely(tcph_off > txq->tso_tcp_header_offset_limit))
 		return EMSGSIZE;
 
@@ -408,4 +406,11 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 				SFC_TSOH_STD_LEN;
 
+		/*
+		 * Discard a packet if header linearization is needed but
+		 * the header is too big.
+		 */
+		if (unlikely(header_len > SFC_TSOH_STD_LEN))
+			return EMSGSIZE;
+
 		hdr_addr = txq->tsoh + hdr_addr_off;
 		hdr_iova = txq->tsoh_iova + hdr_addr_off;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-30 17:58:14.109076612 +0100
+++ 0006-net-sfc-improve-TSO-header-length-check-in-EF10-data.patch	2019-04-30 17:58:13.755140844 +0100
@@ -1 +1 @@
-From 3985802ecf7808472bebb3fa2a3809008dae66b9 Mon Sep 17 00:00:00 2001
+From cb14d5f1b47112c80699bef60954c39b8a2e81e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3985802ecf7808472bebb3fa2a3809008dae66b9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 0711c1136..97b1b6252 100644
+index ff6d5b486..cf229f8bb 100644


More information about the stable mailing list