From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 4E8822B92 for ; Mon, 19 Nov 2018 13:25:53 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id f1-v6so5959536wmg.1 for ; Mon, 19 Nov 2018 04:25:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MUC30VUSvNZueMPMGBs8flMXn1RqPUX8UFcFiJtNUn0=; b=b6KKh6/+Z14LQABddpRFfflnfcoBLFVKNx9nk2KobdhpBdXr8Yvq9RTQgDm/Gg05Xi F3qyM8+gpD6PFU/KGrD8DRo34Bb1aP85onFfrhuW+O1gOS802iy7Byqx88mOS+oJL5K6 sqA3kuz+P5Igj+HtQUG6k8zNN6Ej7t7jYx6hVxrfTmSdM3vN78ySy9OAzZwQqVsQBtOQ znfryNNsjGxQQf1OPzgelXxkZCnH3F256FciALtbkt4wE7qE6JyLzkiwd5haH0IPVFDf rksEXyTc5uVBIBfkKl5ZFMhiQRlJk0sQn+8fRpTmUAXRpfBSdKaf/1a74jW1drtCS4f3 Dq1g== X-Gm-Message-State: AGRZ1gKNaD3J1BieptImJfBIoZcdh9twpl687x8vW0Ok0/FecIJ/RfCZ ecL840aNM6kxqRNFzmu08J8= X-Google-Smtp-Source: AFSGD/XhHzq+AS3KCjEqNTHA5rwt7tB7Xiq6et7oBvMrHnhAG7KtNFfzRJYPevqGYYsCxMj9fCVgxQ== X-Received: by 2002:a1c:f112:: with SMTP id p18mr6558789wmh.83.1542630352885; Mon, 19 Nov 2018 04:25:52 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id z15sm4194802wru.42.2018.11.19.04.25.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 04:25:52 -0800 (PST) From: Luca Boccassi To: Subrahmanyam Nilla Cc: Nithin Dabilpuram , Jerin Jacob , dpdk stable Date: Mon, 19 Nov 2018 12:25:23 +0000 Message-Id: <20181119122538.14207-6-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119122538.14207-1-bluca@debian.org> References: <20181108180111.25873-1-bluca@debian.org> <20181119122538.14207-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/thunderx: fix Tx desc corruption in scatter-gather mode' has been queued to LTS release 16.11.9 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: Mon, 19 Nov 2018 12:25:53 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/21/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. Luca Boccassi --- >>From 83fa62cad33d18bef3ba62af0892e5a5aa015295 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 4b9b2932c..ac30552b3 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.19.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-19 12:15:18.240623528 +0000 +++ 0006-net-thunderx-fix-Tx-desc-corruption-in-scatter-gathe.patch 2018-11-19 12:15:18.075611433 +0000 @@ -1,8 +1,10 @@ -From 823ebfc219f3fa53361afc7ce663f72464bfb3ff Mon Sep 17 00:00:00 2001 +From 83fa62cad33d18bef3ba62af0892e5a5aa015295 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 4b9b2932c..ac30552b3 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;