From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 06CBDA0679 for ; Tue, 30 Apr 2019 19:01:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F025558CB; Tue, 30 Apr 2019 19:01:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 1342558CB for ; Tue, 30 Apr 2019 19:01:56 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50EE230832E3; Tue, 30 Apr 2019 17:01:54 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-211.ams2.redhat.com [10.36.117.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42C1D6D09C; Tue, 30 Apr 2019 17:01:53 +0000 (UTC) From: Kevin Traynor To: Igor Romanov Cc: Andrew Rybchenko , dpdk stable Date: Tue, 30 Apr 2019 18:01:01 +0100 Message-Id: <20190430170133.2331-6-ktraynor@redhat.com> In-Reply-To: <20190430170133.2331-1-ktraynor@redhat.com> References: <20190430170133.2331-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 30 Apr 2019 17:01:55 +0000 (UTC) Subject: [dpdk-stable] patch 'net/sfc: improve TSO header length check in EF10 datapath' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Signed-off-by: Andrew Rybchenko --- 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@dpdk.org @@ -20 +21 @@ -index 0711c1136..97b1b6252 100644 +index ff6d5b486..cf229f8bb 100644