patch 'net/netvsc: fix MTU set' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:49:24 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=2a50559bfd461ed25ff5507626a5d0b5cf956232

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 2a50559bfd461ed25ff5507626a5d0b5cf956232 Mon Sep 17 00:00:00 2001
From: Alexander Skorichenko <askorichenko at netgate.com>
Date: Fri, 28 Jun 2024 18:35:03 +0200
Subject: [PATCH] net/netvsc: fix MTU set
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 107c9ef336c24fce06047b29475ad97b2d5dc74f ]

Prevent segfault in hn_reinit() caused by changing the MTU for
an incompletely initialized device.

Fixes: 45c83603087e ("net/netvsc: support MTU set")

Signed-off-by: Alexander Skorichenko <askorichenko at netgate.com>
Acked-by: Long Li <longli at microsoft.com>
Reviewed-by: Sam Andrew <samandrew at microsoft.com>
---
 .mailmap                       |  1 +
 drivers/net/netvsc/hn_ethdev.c | 16 ++++++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 12ed3d1e74..24c450efaa 100644
--- a/.mailmap
+++ b/.mailmap
@@ -51,6 +51,7 @@ Alexander Chernavin <achernavin at netgate.com>
 Alexander Guy <alexander at andern.org>
 Alexander Kozyrev <akozyrev at nvidia.com> <akozyrev at mellanox.com>
 Alexander Matushevsky <matua at amazon.com>
+Alexander Skorichenko <askorichenko at netgate.com>
 Alexander Solganik <solganik at gmail.com>
 Alexander V Gutkin <alexander.v.gutkin at intel.com>
 Alexandre Ferrieux <alexandre.ferrieux at orange.com>
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index b8a32832d7..f8cb05a118 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1127,8 +1127,10 @@ hn_reinit(struct rte_eth_dev *dev, uint16_t mtu)
 	int i, ret = 0;
 
 	/* Point primary queues at new primary channel */
-	rxqs[0]->chan = hv->channels[0];
-	txqs[0]->chan = hv->channels[0];
+	if (rxqs[0]) {
+		rxqs[0]->chan = hv->channels[0];
+		txqs[0]->chan = hv->channels[0];
+	}
 
 	ret = hn_attach(hv, mtu);
 	if (ret)
@@ -1140,10 +1142,12 @@ hn_reinit(struct rte_eth_dev *dev, uint16_t mtu)
 		return ret;
 
 	/* Point any additional queues at new subchannels */
-	for (i = 1; i < dev->data->nb_rx_queues; i++)
-		rxqs[i]->chan = hv->channels[i];
-	for (i = 1; i < dev->data->nb_tx_queues; i++)
-		txqs[i]->chan = hv->channels[i];
+	if (rxqs[0]) {
+		for (i = 1; i < dev->data->nb_rx_queues; i++)
+			rxqs[i]->chan = hv->channels[i];
+		for (i = 1; i < dev->data->nb_tx_queues; i++)
+			txqs[i]->chan = hv->channels[i];
+	}
 
 	return ret;
 }
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:05.371991372 +0800
+++ 0087-net-netvsc-fix-MTU-set.patch	2024-08-12 20:44:02.335069342 +0800
@@ -1 +1 @@
-From 107c9ef336c24fce06047b29475ad97b2d5dc74f Mon Sep 17 00:00:00 2001
+From 2a50559bfd461ed25ff5507626a5d0b5cf956232 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 107c9ef336c24fce06047b29475ad97b2d5dc74f ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 256506fba4..874df4d162 100644
+index 12ed3d1e74..24c450efaa 100644
@@ -24 +26 @@
-@@ -52,6 +52,7 @@ Alexander Chernavin <achernavin at netgate.com>
+@@ -51,6 +51,7 @@ Alexander Chernavin <achernavin at netgate.com>


More information about the stable mailing list