SHA256
1
0
forked from pool/libvirt

Accepting request 684123 from home:jfehlig:branches:Virtualization

-  util: skip RDMA detection for non-PCI network devices
   f38ef0fa-no-RDMA-check.patch
   bsc#1112182

OBS-URL: https://build.opensuse.org/request/show/684123
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=738
This commit is contained in:
James Fehlig 2019-03-11 23:07:32 +00:00 committed by Git OBS Bridge
parent 94340bed84
commit a0ca4c8c64
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,38 @@
commit f38ef0fac0582ac0cbb749af9d3f8ba515a6084a
Author: Pavel Hrdina <phrdina@redhat.com>
Date: Thu Mar 7 17:52:55 2019 +0100
util: skip RDMA detection for non-PCI network devices
Only PCI devices have '/sys/class/net/<ifname>/device/resource' so we
need to skip this check for all other network devices.
Without this patch and RDMA enabled libvirt will not detect any network
device that doesn't have the path above which includes 'lo', 'virbr',
'tun', etc.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1639258
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Index: libvirt-5.1.0/src/util/virnetdev.c
===================================================================
--- libvirt-5.1.0.orig/src/util/virnetdev.c
+++ libvirt-5.1.0/src/util/virnetdev.c
@@ -2914,8 +2914,14 @@ virNetDevRDMAFeature(const char *ifname,
if (virAsprintf(&eth_devpath, SYSFS_NET_DIR "%s/device/resource", ifname) < 0)
goto cleanup;
- if (!virFileExists(eth_devpath))
+
+ /* If /sys/class/net/<ifname>/device/resource doesn't exist it is not a PCI
+ * device and therefore it will not have RDMA. */
+ if (!virFileExists(eth_devpath)) {
+ ret = 0;
goto cleanup;
+ }
+
if (virFileReadAll(eth_devpath, RESOURCE_FILE_LEN, &eth_res_buf) < 0)
goto cleanup;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 11 22:50:43 UTC 2019 - James Fehlig <jfehlig@suse.com>
- util: skip RDMA detection for non-PCI network devices
f38ef0fa-no-RDMA-check.patch
bsc#1112182
-------------------------------------------------------------------
Wed Mar 6 20:34:53 UTC 2019 - James Fehlig <jfehlig@suse.com>

View File

@ -334,6 +334,7 @@ Source99: baselibs.conf
Source100: %{name}-rpmlintrc
# Upstream patches
Patch0: 4ec3cf9a-apparmor-rules.patch
Patch1: f38ef0fa-no-RDMA-check.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@ -870,6 +871,7 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1