From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 640BCA046B for ; Fri, 23 Aug 2019 11:44:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59D5E1BFA6; Fri, 23 Aug 2019 11:44:18 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D3DD71BF9F for ; Fri, 23 Aug 2019 11:44:16 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52E617F745; Fri, 23 Aug 2019 09:44:16 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-48.ams2.redhat.com [10.36.116.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 779096313B; Fri, 23 Aug 2019 09:44:15 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: dpdk stable Date: Fri, 23 Aug 2019 10:43:00 +0100 Message-Id: <20190823094336.12078-10-ktraynor@redhat.com> In-Reply-To: <20190823094336.12078-1-ktraynor@redhat.com> References: <20190823094336.12078-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Fri, 23 Aug 2019 09:44:16 +0000 (UTC) Subject: [dpdk-stable] patch 'bus/vmbus: skip non-network devices' has been queued to LTS release 18.11.3 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 --- 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@dpdk.org