[dpdk-stable] patch 'net/thunderx: fix Tx desc corruption in scatter-gather mode' has been queued to LTS release 17.11.5

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:38 CET 2018


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 <snilla at caviumnetworks.com>
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 <snilla at caviumnetworks.com>
Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram at caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---
 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 <snilla at caviumnetworks.com>
 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 at dpdk.org
 
 Signed-off-by: Subrahmanyam Nilla <snilla at caviumnetworks.com>
 Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram at caviumnetworks.com>
@@ -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;


More information about the stable mailing list