[dpdk-stable] patch 'bus/vmbus: skip non-network devices' has been queued to LTS release 18.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Aug 23 11:43:00 CEST 2019
Hi,
FYI, your patch has been queued to LTS release 18.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 08/28/19. 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://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f8ecc54396ca33b15909908b6797f82a532ff616
Thanks.
Kevin Traynor
---
>From f8ecc54396ca33b15909908b6797f82a532ff616 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <sthemmin at microsoft.com>
Date: Wed, 5 Jun 2019 17:37:46 -0700
Subject: [PATCH] bus/vmbus: skip non-network devices
[ upstream commit b11b76c22c55c06cabd113a04d7c92bdc3f18aa7 ]
The vmbus scan code can just skip non-network devices.
More importantly, this fixes the bug where some vmbus devices
don't have all the attributes (like monitor_id) and a single
failure would cause the scan to break the loop.
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
---
drivers/bus/vmbus/linux/vmbus_bus.c | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/vmbus/linux/vmbus_bus.c b/drivers/bus/vmbus/linux/vmbus_bus.c
index a4755a387..3c924eee1 100644
--- a/drivers/bus/vmbus/linux/vmbus_bus.c
+++ b/drivers/bus/vmbus/linux/vmbus_bus.c
@@ -26,4 +26,16 @@
#define SYSFS_VMBUS_DEVICES "/sys/bus/vmbus/devices"
+/*
+ * GUID associated with network devices
+ * {f8615163-df3e-46c5-913f-f2d2f965ed0e}
+ */
+static const rte_uuid_t vmbus_nic_uuid = {
+ 0xf8, 0x61, 0x51, 0x63,
+ 0xdf, 0x3e,
+ 0x46, 0xc5,
+ 0x91, 0x3f,
+ 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0xe
+};
+
extern struct rte_vmbus_bus rte_vmbus_bus;
@@ -243,9 +255,4 @@ vmbus_scan_one(const char *name)
SYSFS_VMBUS_DEVICES, name);
- /* get device id */
- snprintf(filename, sizeof(filename), "%s/device_id", dirname);
- if (parse_sysfs_uuid(filename, dev->device_id) < 0)
- goto error;
-
/* get device class */
snprintf(filename, sizeof(filename), "%s/class_id", dirname);
@@ -253,4 +260,15 @@ vmbus_scan_one(const char *name)
goto error;
+ /* skip non-network devices */
+ if (rte_uuid_compare(dev->class_id, vmbus_nic_uuid) != 0) {
+ free(dev);
+ return 0;
+ }
+
+ /* get device id */
+ snprintf(filename, sizeof(filename), "%s/device_id", dirname);
+ if (parse_sysfs_uuid(filename, dev->device_id) < 0)
+ goto error;
+
/* get relid */
snprintf(filename, sizeof(filename), "%s/id", dirname);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-08-22 19:38:21.127196199 +0100
+++ 0010-bus-vmbus-skip-non-network-devices.patch 2019-08-22 19:38:20.402027714 +0100
@@ -1 +1 @@
-From b11b76c22c55c06cabd113a04d7c92bdc3f18aa7 Mon Sep 17 00:00:00 2001
+From f8ecc54396ca33b15909908b6797f82a532ff616 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b11b76c22c55c06cabd113a04d7c92bdc3f18aa7 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list