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 E01A91B50A for ; Fri, 30 Nov 2018 00:15:35 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:24 +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 wATNCW8i032075; Fri, 30 Nov 2018 01:15:29 +0200 From: Yongseok Koh To: Subrahmanyam Nilla Cc: Nithin Dabilpuram , Jerin Jacob , dpdk stable Date: Thu, 29 Nov 2018 15:11:38 -0800 Message-Id: <20181129231202.30436-104-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/thunderx: fix Tx desc corruption in scatter-gather mode' has been queued to LTS release 17.11.5 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: Thu, 29 Nov 2018 23:15:36 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. 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. 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 dc72884a15aeef1a473ac22a51db24dd0d59f918 Mon Sep 17 00:00:00 2001 From: Subrahmanyam Nilla Date: Fri, 9 Nov 2018 05:50:55 +0000 Subject: [PATCH] net/thunderx: fix Tx desc corruption in scatter-gather mode [ upstream commit 823ebfc219f3fa53361afc7ce663f72464bfb3ff ] For performance reasons, word1 of send_hdr_s sub descriptor was not cleared assuming it is always having default value of zero since it comes from fixed offsets of SQ buffer. This is causing issues in case of SG mode because, the size of send command might change and hence the word1 of send_hdr_s is not always at fixed offsets of the SQ buffer and hence not having default value of zero. This fixes the issue by clearing the word1 in case of SG mode for every packet. Fixes: 1c421f18e095 ("net/thunderx: add single and multi-segment Tx") Signed-off-by: Subrahmanyam Nilla Signed-off-by: Nithin Dabilpuram Acked-by: Jerin Jacob --- drivers/net/thunderx/nicvf_rxtx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index 06cbc4635..7e8688b42 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -89,6 +89,14 @@ fill_sq_desc_header(union sq_entry_t *entry, struct rte_mbuf *pkt) entry->buff[0] = sqe.buff[0]; } +static inline void __hot +fill_sq_desc_header_zero_w1(union sq_entry_t *entry, + struct rte_mbuf *pkt) +{ + fill_sq_desc_header(entry, pkt); + entry->buff[1] = 0ULL; +} + void __hot nicvf_single_pool_free_xmited_buffers(struct nicvf_txq *sq) { @@ -232,7 +240,7 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts, used_bufs += nb_segs; txbuffs[tail] = NULL; - fill_sq_desc_header(desc_ptr + tail, pkt); + fill_sq_desc_header_zero_w1(desc_ptr + tail, pkt); tail = (tail + 1) & qlen_mask; txbuffs[tail] = pkt; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:49.751133618 -0800 +++ 0104-net-thunderx-fix-Tx-desc-corruption-in-scatter-gathe.patch 2018-11-29 15:01:45.275958000 -0800 @@ -1,8 +1,10 @@ -From 823ebfc219f3fa53361afc7ce663f72464bfb3ff Mon Sep 17 00:00:00 2001 +From dc72884a15aeef1a473ac22a51db24dd0d59f918 Mon Sep 17 00:00:00 2001 From: Subrahmanyam Nilla Date: Fri, 9 Nov 2018 05:50:55 +0000 Subject: [PATCH] net/thunderx: fix Tx desc corruption in scatter-gather mode +[ upstream commit 823ebfc219f3fa53361afc7ce663f72464bfb3ff ] + For performance reasons, word1 of send_hdr_s sub descriptor was not cleared assuming it is always having default value of zero since it comes from fixed @@ -16,7 +18,6 @@ for every packet. Fixes: 1c421f18e095 ("net/thunderx: add single and multi-segment Tx") -Cc: stable@dpdk.org Signed-off-by: Subrahmanyam Nilla Signed-off-by: Nithin Dabilpuram @@ -26,10 +27,10 @@ 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c -index 247c35685..1c4287431 100644 +index 06cbc4635..7e8688b42 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c -@@ -61,6 +61,14 @@ fill_sq_desc_header(union sq_entry_t *entry, struct rte_mbuf *pkt) +@@ -89,6 +89,14 @@ fill_sq_desc_header(union sq_entry_t *entry, struct rte_mbuf *pkt) entry->buff[0] = sqe.buff[0]; } @@ -44,7 +45,7 @@ void __hot nicvf_single_pool_free_xmited_buffers(struct nicvf_txq *sq) { -@@ -204,7 +212,7 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -232,7 +240,7 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts, used_bufs += nb_segs; txbuffs[tail] = NULL;