patch 'net/netvsc: use ethdev API to set VF MTU' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Mon Aug 12 14:50:09 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=fbd7ac3b83d6fa7c0edc88008985d021b6014a35
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From fbd7ac3b83d6fa7c0edc88008985d021b6014a35 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 18 Jul 2024 12:35:16 -0700
Subject: [PATCH] net/netvsc: use ethdev API to set VF MTU
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit e57f8c38dc99b32a747b0aa4a0442a167e52d085 ]
The current code uses unnecessary locking to set VF MTU, resulting in
deadlock on hot add/remove path. Fix this by using rte_eth_dev_set_mtu()
to set VF MTU.
Fixes: 45c83603087e ("net/netvsc: support MTU set")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Signed-off-by: Long Li <longli at microsoft.com>
Reviewed-by: Wei Hu <weh at microsoft.com>
---
drivers/net/netvsc/hn_vf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 90cb6f6923..a4e958419d 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -264,7 +264,7 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
goto exit;
}
- ret = hn_vf_mtu_set(dev, dev->data->mtu);
+ ret = rte_eth_dev_set_mtu(port, dev->data->mtu);
if (ret) {
PMD_DRV_LOG(ERR, "Failed to set VF MTU");
goto exit;
@@ -794,7 +794,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
rte_rwlock_read_lock(&hv->vf_lock);
vf_dev = hn_get_vf_dev(hv);
if (hv->vf_ctx.vf_vsc_switched && vf_dev)
- ret = vf_dev->dev_ops->mtu_set(vf_dev, mtu);
+ ret = rte_eth_dev_set_mtu(vf_dev->data->port_id, mtu);
rte_rwlock_read_unlock(&hv->vf_lock);
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-08-12 20:44:06.707220366 +0800
+++ 0132-net-netvsc-use-ethdev-API-to-set-VF-MTU.patch 2024-08-12 20:44:02.535069381 +0800
@@ -1 +1 @@
-From e57f8c38dc99b32a747b0aa4a0442a167e52d085 Mon Sep 17 00:00:00 2001
+From fbd7ac3b83d6fa7c0edc88008985d021b6014a35 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e57f8c38dc99b32a747b0aa4a0442a167e52d085 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 6b3d0eb0c8..b664beaa5d 100644
+index 90cb6f6923..a4e958419d 100644
@@ -33 +35 @@
-@@ -796,7 +796,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -794,7 +794,7 @@ int hn_vf_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
More information about the stable
mailing list