From 8572c55f72758b39f6683c7f4457e2fff2bbb5bc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:43:36 +0000 Subject: import biosdevname-0.7.3-1.el7 --- diff --git a/.biosdevname.metadata b/.biosdevname.metadata index 55e1186..5682bb2 100644 --- a/.biosdevname.metadata +++ b/.biosdevname.metadata @@ -1 +1 @@ -5d3b758317b79f28003ca8ffb8a4614ca6b4fe2a SOURCES/biosdevname-0.7.2.tar.gz +a31985f5cc19bd0a2bed7a32567d06f5ec72c0af SOURCES/v0.7.3.tar.gz diff --git a/.gitignore b/.gitignore index c3c8c49..600a64e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/biosdevname-0.7.2.tar.gz +SOURCES/v0.7.3.tar.gz diff --git a/SOURCES/0001-Add-support-for-ExaNIC-network-cards-5.patch b/SOURCES/0001-Add-support-for-ExaNIC-network-cards-5.patch new file mode 100644 index 0000000..5c2c071 --- /dev/null +++ b/SOURCES/0001-Add-support-for-ExaNIC-network-cards-5.patch @@ -0,0 +1,27 @@ +From 7460046a5430e92cd6a4ef0c938f80e95669b5bc Mon Sep 17 00:00:00 2001 +From: Ka-Shu Wong <31426385+kashuwong@users.noreply.github.com> +Date: Fri, 1 Sep 2017 15:33:56 +1000 +Subject: [PATCH] Add support for ExaNIC network cards (#5) + +ExaNIC cards have multiple physical ports on the same PCI function and +need to be numbered using the dev_port attribute. +--- + src/bios_device.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/bios_device.c b/src/bios_device.c +index e9d5177..3cc528b 100644 +--- a/src/bios_device.c ++++ b/src/bios_device.c +@@ -221,6 +221,8 @@ int ismultiport(const char *driver) + return 1; + if (!strncmp(driver, "cxgb", 4)) + return 1; ++ if (!strncmp(driver, "exanic", 6)) ++ return 1; + return 0; + } + +-- +2.13.6 + diff --git a/SOURCES/0001-Fix-use-after-free-of-fd.patch b/SOURCES/0001-Fix-use-after-free-of-fd.patch deleted file mode 100644 index 17129b5..0000000 --- a/SOURCES/0001-Fix-use-after-free-of-fd.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8ab1d293643201abb1dc58bcdc2f86c3ea56d49d Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Tue, 22 Dec 2015 10:34:16 +0100 -Subject: [PATCH] Fix use-after-free of fd - -This bug got introduced in 51219cac581b5eaced5b172dbbb4586889cb27e1. I -overlooked that we are already properly closing fd on non-error code -path and I added redundant call to close. - -Closing already closed fd is harmless though. Function returns EBADF and -fails silently. - -(cherry picked from commit d1d62966032784f292e6875ba4373b18149a5754) ---- - src/dmidecode/util.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/dmidecode/util.c b/src/dmidecode/util.c -index 3340e1f..ea06663 100644 ---- a/src/dmidecode/util.c -+++ b/src/dmidecode/util.c -@@ -162,6 +162,5 @@ void *mem_chunk(size_t base, size_t len, const char *devmem) - if(close(fd)==-1) - perror(devmem); - -- close(fd); - return p; - } --- -2.9.3 - diff --git a/SOURCES/0002-Ignore-naming-of-non-Ethernet-network-interfaces.patch b/SOURCES/0002-Ignore-naming-of-non-Ethernet-network-interfaces.patch deleted file mode 100644 index 78a47e7..0000000 --- a/SOURCES/0002-Ignore-naming-of-non-Ethernet-network-interfaces.patch +++ /dev/null @@ -1,46 +0,0 @@ -From eb7cb935f585d41163bb9bf0e64f267cb0597bdd Mon Sep 17 00:00:00 2001 -From: Sujith Pandel -Date: Tue, 14 Mar 2017 11:44:23 +0530 -Subject: [PATCH] Ignore naming of non-Ethernet network interfaces - -Support of biosdevname is to name Ethernet interfaces only, as per biosdevname spec. -Currently, manual call of biosdevname on other types of network interfaces will return interface names. -This code change is to ignore naming of Infiniband and other types of network interfaces. - -(cherry picked from commit 609f20c26f40ae4883f5e8c9b241470260722b3f) ---- - src/bios_device.c | 3 +++ - src/eths.h | 5 +++++ - 2 files changed, 8 insertions(+) - -diff --git a/src/bios_device.c b/src/bios_device.c -index 6636e67..e9d5177 100644 ---- a/src/bios_device.c -+++ b/src/bios_device.c -@@ -238,6 +238,9 @@ static void match_pci_and_eth_devs(struct libbiosdevname_state *state) - /* Loop through all ether devices to find match */ - unparse_pci_name(pci_name, sizeof(pci_name), p->pci_dev); - list_for_each_entry(n, &state->network_devices, node) { -+ //Accept only Ethernet devices, otherwise ignore. -+ if(!netdev_arphrd_type_is_eth(n)) -+ continue; - if (strncmp(n->drvinfo.bus_info, pci_name, sizeof(n->drvinfo.bus_info))) - continue; - /* Ignore if devtype is fcoe */ -diff --git a/src/eths.h b/src/eths.h -index a145b4f..b695d3d 100644 ---- a/src/eths.h -+++ b/src/eths.h -@@ -63,4 +63,9 @@ static inline int netdev_devtype_is_fcoe(const struct network_device *dev) - return (dev->devtype_is_fcoe == 1); - } - -+static inline int netdev_arphrd_type_is_eth(const struct network_device *dev) -+{ -+ return (dev->arphrd_type == ARPHRD_ETHER); -+} -+ - #endif /* __ETHS_H_INCLUDED */ --- -2.9.3 - diff --git a/SOURCES/0003-Prevent-reading-of-VPD-DCM-strings-for-SRIOV-vfs.patch b/SOURCES/0003-Prevent-reading-of-VPD-DCM-strings-for-SRIOV-vfs.patch deleted file mode 100644 index 11ef7d8..0000000 --- a/SOURCES/0003-Prevent-reading-of-VPD-DCM-strings-for-SRIOV-vfs.patch +++ /dev/null @@ -1,65 +0,0 @@ -From dd33892e7e955ae036481a02c73803646286db95 Mon Sep 17 00:00:00 2001 -From: sujithpshankar -Date: Tue, 14 Mar 2017 12:55:24 +0530 -Subject: [PATCH] Prevent reading of VPD-DCM strings for SRIOV-vfs. - -Reading DCM strings of SRIOV-vfs results in a confusion that leads to interface being assumed as a NIC partition rather than a SRIOV-vf. -This patch prevents the reading and setting of VPD data to SRIOV-vf interfaces. -(cherry picked from commit 02811d5165c2eeecf8797fe9b5088d6e78bd25db) ---- - src/pci.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/src/pci.c b/src/pci.c -index 1724394..74ed9e6 100644 ---- a/src/pci.c -+++ b/src/pci.c -@@ -119,6 +119,10 @@ static void parse_dcm(struct libbiosdevname_state *state, struct pci_device *pde - struct vpd_tag *dcm; - const char *fmt; - -+ if (pdev->is_sriov_virtual_function) { -+ return ; -+ } -+ - fmt = "%1x%1x%2x"; - step = 10; - dcm = pci_vpd_findtag(vpd, len, "DCM"); -@@ -139,7 +143,7 @@ static void parse_dcm(struct libbiosdevname_state *state, struct pci_device *pde - vf = find_pci_dev_by_pci_addr(state, pdev->pci_dev->domain, - pdev->pci_dev->bus, - devfn >> 3, devfn & 7); -- if (vf != NULL) { -+ if (vf != NULL && !vf->is_sriov_virtual_function) { - add_port(vf, port, pfi); - if (vf->vpd_port == INT_MAX) { - vf->vpd_port = port; -@@ -157,7 +161,7 @@ static int read_pci_vpd(struct libbiosdevname_state *state, struct pci_device *p - int fd, len; - unsigned char *vpd; - -- if (!is_pci_network(pdev)) -+ if (!is_pci_network(pdev) || pdev->is_sriov_virtual_function) - return 1; - unparse_pci_name(pci_name, sizeof(pci_name), pdev->pci_dev); - snprintf(path, sizeof(path), "/sys/bus/pci/devices/%s/physfn/vpd", pci_name); -@@ -214,12 +218,15 @@ static void set_pci_vpd_instance(struct libbiosdevname_state *state) - /* Ignore already parsed devices */ - continue; - } -+ if (dev->is_sriov_virtual_function) { -+ continue; -+ } - read_pci_vpd(state, dev); - } - - /* Now match VPD master device */ - list_for_each_entry(dev, &state->pci_devices, node) { -- if (dev->vpd_port == INT_MAX) -+ if (dev->vpd_port == INT_MAX || dev->is_sriov_virtual_function) - continue; - list_for_each_entry(dev2, &state->pci_devices, node) { - if (dev2->pci_dev->domain == dev->pci_dev->domain && --- -2.9.3 - diff --git a/SPECS/biosdevname.spec b/SPECS/biosdevname.spec index 0950182..9735cee 100644 --- a/SPECS/biosdevname.spec +++ b/SPECS/biosdevname.spec @@ -1,16 +1,16 @@ Name: biosdevname -Version: 0.7.2 -Release: 2%{?dist} +Version: 0.7.3 +Release: 1%{?dist} Summary: Udev helper for naming devices per BIOS names Group: System Environment/Base License: GPLv2 -URL: http://linux.dell.com/files/%{name} +URL: https://github.com/dell/biosdevname # SMBIOS only exists on these arches. It's also likely that other # arches don't expect the PCI bus to be sorted breadth-first, or of # so, there haven't been any comments about that on LKML. ExclusiveArch: %{ix86} x86_64 ia64 -Source0: http://linux.dell.com/files/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/dell/%{name}/archive/v%{version}.tar.gz BuildRequires: pciutils-devel, zlib-devel # to figure out how to name the rules file @@ -23,9 +23,7 @@ Requires: udev Patch0: biosdevname-0.6.1-rules.patch Patch1: 0001-Place-udev-rules-to-usr-lib.patch -Patch2: 0001-Fix-use-after-free-of-fd.patch -Patch3: 0002-Ignore-naming-of-non-Ethernet-network-interfaces.patch -Patch4: 0003-Prevent-reading-of-VPD-DCM-strings-for-SRIOV-vfs.patch +Patch2: 0001-Add-support-for-ExaNIC-network-cards-5.patch %description biosdevname in its simplest form takes a kernel device name as an @@ -39,8 +37,6 @@ name (e.g. eth0). %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build autoreconf -iv @@ -64,6 +60,9 @@ make install install-data DESTDIR=%{buildroot} %changelog +* Wed Oct 25 2017 Michal Sekletar - 0.7.3-1 +- rebase to 0.7.3 (#1467144) + * Fri Mar 31 2017 Michal Sekletar - 0.7.2-2 - backport fixes from upstream (#1385889)