[dpdk-stable] patch 'net/vmxnet3: fix RSS setting on v4' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:53:37 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 05/21/20. 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.

Thanks.

Luca Boccassi

---
>From 5f0378bb2ef876a30bc481762df91e1ea44375dd Mon Sep 17 00:00:00 2001
From: Eduard Serra <eserra at vmware.com>
Date: Wed, 4 Mar 2020 02:35:56 +0000
Subject: [PATCH] net/vmxnet3: fix RSS setting on v4

[ upstream commit 52ec00fd1474e8f99f3da705b7efe95ba994b352 ]

When calling to setup RSS on v4 API, ESX will expect
IPv4/6 TCP RSS to be set/requested mandatory.

This patch will:
- Set IPv4/6 TCP RSS when these have not been set. A warning
message is thrown to make sure we warn the application we are
setting IPv4/6 TCP RSS when not set.
- An additional check has been added to dodge RSS configuration
altogether unless MQ_RSS has been requested, similar to v3.

The alternative (returning error) was considered, the intent
is to ease the task of setting up and running vmxnet3 in situations
where it's supposed to be most straightforward (testpmd, pktgen).

Bugzilla ID: 400
Fixes: 643fba770705 ("net/vmxnet3: add v4 boot and guest UDP RSS config")

Signed-off-by: Eduard Serra <eserra at vmware.com>
Acked-by: Yong Wang <yongwang at vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.h | 4 ++++
 drivers/net/vmxnet3/vmxnet3_rxtx.c   | 8 ++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 6e6efa9603..705e9760f4 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -771,7 +771,8 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 		PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n");
 	}
 
-	if (VMXNET3_VERSION_GE_4(hw)) {
+	if (VMXNET3_VERSION_GE_4(hw) &&
+	    dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS) {
 		/* Check for additional RSS  */
 		ret = vmxnet3_v4_rss_configure(dev);
 		if (ret != VMXNET3_SUCCESS) {
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 8c2b6f8771..dd685b02b7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -38,6 +38,10 @@
 	ETH_RSS_NONFRAG_IPV4_UDP | \
 	ETH_RSS_NONFRAG_IPV6_UDP)
 
+#define VMXNET3_MANDATORY_V4_RSS ( \
+	ETH_RSS_NONFRAG_IPV4_TCP | \
+	ETH_RSS_NONFRAG_IPV6_TCP)
+
 /* RSS configuration structure - shared with device through GPA */
 typedef struct VMXNET3_RSSConf {
 	uint16_t   hashType;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 7794d74214..dd99684bee 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1311,6 +1311,14 @@ vmxnet3_v4_rss_configure(struct rte_eth_dev *dev)
 
 	cmdInfo->setRSSFields = 0;
 	port_rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
+
+	if ((port_rss_conf->rss_hf & VMXNET3_MANDATORY_V4_RSS) !=
+	    VMXNET3_MANDATORY_V4_RSS) {
+		PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxnet3 v4 RSS,"
+			     "automatically setting it");
+		port_rss_conf->rss_hf |= VMXNET3_MANDATORY_V4_RSS;
+	}
+
 	rss_hf = port_rss_conf->rss_hf &
 		(VMXNET3_V4_RSS_MASK | VMXNET3_RSS_OFFLOAD_ALL);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.916151896 +0100
+++ 0027-net-vmxnet3-fix-RSS-setting-on-v4.patch	2020-05-19 13:56:18.211501675 +0100
@@ -1,8 +1,10 @@
-From 52ec00fd1474e8f99f3da705b7efe95ba994b352 Mon Sep 17 00:00:00 2001
+From 5f0378bb2ef876a30bc481762df91e1ea44375dd Mon Sep 17 00:00:00 2001
 From: Eduard Serra <eserra at vmware.com>
 Date: Wed, 4 Mar 2020 02:35:56 +0000
 Subject: [PATCH] net/vmxnet3: fix RSS setting on v4
 
+[ upstream commit 52ec00fd1474e8f99f3da705b7efe95ba994b352 ]
+
 When calling to setup RSS on v4 API, ESX will expect
 IPv4/6 TCP RSS to be set/requested mandatory.
 
@@ -19,7 +21,6 @@
 
 Bugzilla ID: 400
 Fixes: 643fba770705 ("net/vmxnet3: add v4 boot and guest UDP RSS config")
-Cc: stable at dpdk.org
 
 Signed-off-by: Eduard Serra <eserra at vmware.com>
 Acked-by: Yong Wang <yongwang at vmware.com>


More information about the stable mailing list