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 78173A0471 for ; Fri, 21 Jun 2019 18:48:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7058C1D548; Fri, 21 Jun 2019 18:48:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5A96E1D548 for ; Fri, 21 Jun 2019 18:48:56 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FE7E30C5840; Fri, 21 Jun 2019 16:48:51 +0000 (UTC) Received: from rh.redhat.com (ovpn-117-77.ams2.redhat.com [10.36.117.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6712760BE0; Fri, 21 Jun 2019 16:48:34 +0000 (UTC) From: Kevin Traynor To: Ajit Khaparde Cc: Somnath Kotur , Sriharsha Basavapatna , dpdk stable Date: Fri, 21 Jun 2019 17:45:54 +0100 Message-Id: <20190621164626.31219-10-ktraynor@redhat.com> In-Reply-To: <20190621164626.31219-1-ktraynor@redhat.com> References: <20190621164626.31219-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 21 Jun 2019 16:48:55 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnxt: fix TSO' has been queued to LTS release 18.11.3 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.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 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 Reviewed-by: Somnath Kotur Signed-off-by: Sriharsha Basavapatna --- 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