From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 431E92B87 for ; Fri, 8 Mar 2019 18:49:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:49:00 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloAv002625; Fri, 8 Mar 2019 19:48:59 +0200 From: Yongseok Koh To: Ivan Malov Cc: Andrew Rybchenko , dpdk stable Date: Fri, 8 Mar 2019 09:47:19 -0800 Message-Id: <20190308174749.30771-41-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/sfc: discard last seen VLAN TCI if Tx packet is dropped' has been queued to LTS release 17.11.6 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: , X-List-Received-Date: Fri, 08 Mar 2019 17:49:03 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 8053aae348e1c7149fd5400cf63a5dc2e6e907b8 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Wed, 9 Jan 2019 11:06:39 +0000 Subject: [PATCH] net/sfc: discard last seen VLAN TCI if Tx packet is dropped [ upstream commit 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 ] Early processing of a packet on transmit may change last seen VLAN TCI in the queue context. If such a packet is eventually dropped, last seen VLAN TCI must be set to its previous value. Fixes: 7fd636815a43 ("net/sfc: support VLAN offload on transmit path") Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c index 9b1e6541e..2f03b8577 100644 --- a/drivers/net/sfc/sfc_tx.c +++ b/drivers/net/sfc/sfc_tx.c @@ -709,6 +709,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) for (pkts_sent = 0, pktp = &tx_pkts[0]; (pkts_sent < nb_pkts) && (fill_level <= soft_max_fill); pkts_sent++, pktp++) { + uint16_t hw_vlan_tci_prev = txq->hw_vlan_tci; struct rte_mbuf *m_seg = *pktp; size_t pkt_len = m_seg->pkt_len; unsigned int pkt_descs = 0; @@ -747,6 +748,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) * mbuf shouldn't be orphaned */ pend -= pkt_descs; + txq->hw_vlan_tci = hw_vlan_tci_prev; rte_pktmbuf_free(*pktp); @@ -816,10 +818,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) fill_level = added - txq->completed; if (fill_level > hard_max_fill) { pend -= pkt_descs; + txq->hw_vlan_tci = hw_vlan_tci_prev; break; } } else { pend -= pkt_descs; + txq->hw_vlan_tci = hw_vlan_tci_prev; break; } } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:42.296819856 -0800 +++ 0041-net-sfc-discard-last-seen-VLAN-TCI-if-Tx-packet-is-d.patch 2019-03-08 09:46:40.191405000 -0800 @@ -1,14 +1,15 @@ -From 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 Mon Sep 17 00:00:00 2001 +From 8053aae348e1c7149fd5400cf63a5dc2e6e907b8 Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Wed, 9 Jan 2019 11:06:39 +0000 Subject: [PATCH] net/sfc: discard last seen VLAN TCI if Tx packet is dropped +[ upstream commit 649885c08e51bcb8680ed2aa522d0f5160dd8fb1 ] + Early processing of a packet on transmit may change last seen VLAN TCI in the queue context. If such a packet is eventually dropped, last seen VLAN TCI must be set to its previous value. Fixes: 7fd636815a43 ("net/sfc: support VLAN offload on transmit path") -Cc: stable@dpdk.org Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko @@ -17,10 +18,10 @@ 1 file changed, 4 insertions(+) diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c -index cce823954..aa73d2642 100644 +index 9b1e6541e..2f03b8577 100644 --- a/drivers/net/sfc/sfc_tx.c +++ b/drivers/net/sfc/sfc_tx.c -@@ -712,6 +712,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -709,6 +709,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) for (pkts_sent = 0, pktp = &tx_pkts[0]; (pkts_sent < nb_pkts) && (fill_level <= soft_max_fill); pkts_sent++, pktp++) { @@ -28,7 +29,7 @@ struct rte_mbuf *m_seg = *pktp; size_t pkt_len = m_seg->pkt_len; unsigned int pkt_descs = 0; -@@ -750,6 +751,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -747,6 +748,7 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) * mbuf shouldn't be orphaned */ pend -= pkt_descs; @@ -36,7 +37,7 @@ rte_pktmbuf_free(*pktp); -@@ -819,10 +821,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) +@@ -816,10 +818,12 @@ sfc_efx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) fill_level = added - txq->completed; if (fill_level > hard_max_fill) { pend -= pkt_descs;