Compare commits
No commits in common. 'i8c' and 'c9' have entirely different histories.
@ -1,27 +0,0 @@
|
|||||||
From 4257dbad671fd1080231483c1891f46ed9ea7107 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.14.3
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From db1371e4d22465c27b5ed8d851cea6e72f0176f7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Wed, 21 Mar 2018 18:10:08 +0100
|
||||||
|
Subject: [PATCH 1/2] Disable biosdevname by default
|
||||||
|
|
||||||
|
---
|
||||||
|
biosdevname.rules.in | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/biosdevname.rules.in b/biosdevname.rules.in
|
||||||
|
index 0a32aa5..1dcca74 100644
|
||||||
|
--- a/biosdevname.rules.in
|
||||||
|
+++ b/biosdevname.rules.in
|
||||||
|
@@ -12,13 +12,13 @@ ENV{biosdevname}=="?*", ENV{UDEV_BIOSDEVNAME}="$env{biosdevname}"
|
||||||
|
ENV{UDEV_BIOSDEVNAME}=="0", GOTO="netdevicename_end"
|
||||||
|
ENV{UDEV_BIOSDEVNAME}=="1", GOTO="netdevicename_start"
|
||||||
|
|
||||||
|
-# uncomment the next line for biosdevname to be off by default
|
||||||
|
-# GOTO="netdevicename_end"
|
||||||
|
+# off by default
|
||||||
|
+GOTO="netdevicename_end"
|
||||||
|
|
||||||
|
LABEL="netdevicename_start"
|
||||||
|
|
||||||
|
# using NAME= instead of setting INTERFACE_NAME, so that persistent
|
||||||
|
# names aren't generated for these devices, they are "named" on each boot.
|
||||||
|
-SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
|
||||||
|
+SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i %k", NAME="%c" OPTIONS+="string_escape=replace"
|
||||||
|
|
||||||
|
LABEL="netdevicename_end"
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From d6fa84f8a80d5e1c526fe675c345f709a700e33e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Josef=20M=C3=B6llers?= <josef.moellers@suse.com>
|
|
||||||
Date: Fri, 20 Jul 2018 08:56:48 +0200
|
|
||||||
Subject: [PATCH] Prevent infinite recursion in dmidecode.c::smbios_setslot by
|
|
||||||
(#7)
|
|
||||||
|
|
||||||
Checking that subordinate bus has a number greater than the
|
|
||||||
current bus.
|
|
||||||
Fixes SUSE bug#1093625
|
|
||||||
---
|
|
||||||
src/dmidecode/dmidecode.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/dmidecode/dmidecode.c b/src/dmidecode/dmidecode.c
|
|
||||||
index 1d805bb..a01a6ce 100644
|
|
||||||
--- a/src/dmidecode/dmidecode.c
|
|
||||||
+++ b/src/dmidecode/dmidecode.c
|
|
||||||
@@ -153,7 +153,7 @@ void smbios_setslot(const struct libbiosdevname_state *state,
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Found a PDEV, now is it a bridge? */
|
|
||||||
- if (pdev->sbus != -1) {
|
|
||||||
+ if (pdev->sbus != -1 && pdev->sbus > bus) {
|
|
||||||
smbios_setslot(state, domain, pdev->sbus, -1, -1, type, slot, index, label);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
@ -1,187 +0,0 @@
|
|||||||
From 8f2d9991d50e09ba9af842fb592b37d0c2021a06 Mon Sep 17 00:00:00 2001
|
|
||||||
From: dirkjacobus <dirkjacobus@gmail.com>
|
|
||||||
Date: Sun, 11 Nov 2018 23:29:24 -0800
|
|
||||||
Subject: [PATCH] Netronome biosdevname support (#8)
|
|
||||||
|
|
||||||
* Add support for Netronome netdevices
|
|
||||||
|
|
||||||
Netronome netdevices also provide multiple ports through the same
|
|
||||||
function.
|
|
||||||
|
|
||||||
* Set devID with phys_port_name index for nfp devices
|
|
||||||
|
|
||||||
Netronome netdevices should rather use the index from the phys_port_name
|
|
||||||
attribute instead of the dev_port/dev_id
|
|
||||||
attributes.
|
|
||||||
|
|
||||||
* Exclude naming Netronome logical devices
|
|
||||||
|
|
||||||
Some drivers, like the Netronome nfp driver, expose logical devices such
|
|
||||||
as representors and switchdev uplink devices.
|
|
||||||
|
|
||||||
There isn't currently a naming scheme for such devices, so exclude them
|
|
||||||
from the biosdevname naming policy.
|
|
||||||
|
|
||||||
Split ports also don't have a naming scheme defined for biosdevname, so
|
|
||||||
its better to exclude them from naming.
|
|
||||||
|
|
||||||
Identification of such devices will always be driver dependent.
|
|
||||||
At the moment, only 'nfp' driver devices are considered for exclusion.
|
|
||||||
---
|
|
||||||
src/bios_device.c | 6 ++++-
|
|
||||||
src/eths.c | 65 ++++++++++++++++++++++++++++++++++++++++-------
|
|
||||||
src/eths.h | 6 +++++
|
|
||||||
3 files changed, 67 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/bios_device.c b/src/bios_device.c
|
|
||||||
index 3cc528b..4882513 100644
|
|
||||||
--- a/src/bios_device.c
|
|
||||||
+++ b/src/bios_device.c
|
|
||||||
@@ -214,7 +214,7 @@ static void sort_device_list(struct libbiosdevname_state *state)
|
|
||||||
list_splice(&sorted_devices, &state->bios_devices);
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Check for Mellanox/Chelsio drivers */
|
|
||||||
+/* Check for multiport drivers */
|
|
||||||
int ismultiport(const char *driver)
|
|
||||||
{
|
|
||||||
if (!strncmp(driver, "mlx4", 4))
|
|
||||||
@@ -223,6 +223,8 @@ int ismultiport(const char *driver)
|
|
||||||
return 1;
|
|
||||||
if (!strncmp(driver, "exanic", 6))
|
|
||||||
return 1;
|
|
||||||
+ if (!strncmp(driver, "nfp", 3))
|
|
||||||
+ return 1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -248,6 +250,8 @@ static void match_pci_and_eth_devs(struct libbiosdevname_state *state)
|
|
||||||
/* Ignore if devtype is fcoe */
|
|
||||||
if (netdev_devtype_is_fcoe(n))
|
|
||||||
continue;
|
|
||||||
+ if (!netdev_is_eligible(n))
|
|
||||||
+ continue;
|
|
||||||
b = malloc(sizeof(*b));
|
|
||||||
if (!b)
|
|
||||||
continue;
|
|
||||||
diff --git a/src/eths.c b/src/eths.c
|
|
||||||
index d2c4d36..688c3af 100644
|
|
||||||
--- a/src/eths.c
|
|
||||||
+++ b/src/eths.c
|
|
||||||
@@ -35,21 +35,67 @@ char *pr_ether(char *buf, const int size, const unsigned char *s)
|
|
||||||
return (buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void eths_get_devid(const char *devname, int *devid)
|
|
||||||
+static int eths_get_phys_port_name_id(const char *devname)
|
|
||||||
+{
|
|
||||||
+ char *portstr = NULL;
|
|
||||||
+ char path[PATH_MAX];
|
|
||||||
+ int index = -1;
|
|
||||||
+
|
|
||||||
+ /* Only devices that have a phys_port_name of 'pX' are considered here,
|
|
||||||
+ * with the index 'X' extracted.
|
|
||||||
+ */
|
|
||||||
+ snprintf(path, sizeof(path), "/sys/class/net/%s/phys_port_name", devname);
|
|
||||||
+ if (sysfs_read_file(path, &portstr) == 0) {
|
|
||||||
+ char *res = NULL;
|
|
||||||
+
|
|
||||||
+ if (portstr[0] == 'p') {
|
|
||||||
+ index = strtol(&portstr[1], &res, 10);
|
|
||||||
+ /* Reset to invalid if the format is unexpected. */
|
|
||||||
+ if (*res)
|
|
||||||
+ index = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ free(portstr);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return index;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void eths_get_dev_eligible(struct network_device *dev)
|
|
||||||
+{
|
|
||||||
+ /* By default, all network devices are eligible for naming. Some may
|
|
||||||
+ * opt-out explicitly below.
|
|
||||||
+ */
|
|
||||||
+ dev->is_eligible = 1;
|
|
||||||
+
|
|
||||||
+ if (dev->drvinfo_valid && strcmp(dev->drvinfo.driver, "nfp") == 0) {
|
|
||||||
+ dev->is_eligible = (eths_get_phys_port_name_id(dev->kernel_name) >= 0 ? 1 : 0);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void eths_get_devid(struct network_device *dev)
|
|
||||||
{
|
|
||||||
char path[PATH_MAX];
|
|
||||||
char *devidstr = NULL;
|
|
||||||
|
|
||||||
- *devid = -1;
|
|
||||||
- snprintf(path, sizeof(path), "/sys/class/net/%s/dev_port", devname);
|
|
||||||
- if (sysfs_read_file(path, &devidstr) == 0) {
|
|
||||||
- sscanf(devidstr, "%i", devid);
|
|
||||||
- free(devidstr);
|
|
||||||
+ dev->devid = -1;
|
|
||||||
+
|
|
||||||
+ /* For some drivers, the phys_port_name index, e.g. pX, is the correct
|
|
||||||
+ * dev ID to use instead of the dev_port attribute.
|
|
||||||
+ */
|
|
||||||
+ if (dev->drvinfo_valid && strcmp(dev->drvinfo.driver, "nfp") == 0) {
|
|
||||||
+ dev->devid = eths_get_phys_port_name_id(dev->kernel_name);
|
|
||||||
} else {
|
|
||||||
- snprintf(path, sizeof(path), "/sys/class/net/%s/dev_id", devname);
|
|
||||||
+ snprintf(path, sizeof(path), "/sys/class/net/%s/dev_port", dev->kernel_name);
|
|
||||||
if (sysfs_read_file(path, &devidstr) == 0) {
|
|
||||||
- sscanf(devidstr, "%i", devid);
|
|
||||||
+ sscanf(devidstr, "%i", &dev->devid);
|
|
||||||
free(devidstr);
|
|
||||||
+ } else {
|
|
||||||
+ snprintf(path, sizeof(path), "/sys/class/net/%s/dev_id", dev->kernel_name);
|
|
||||||
+ if (sysfs_read_file(path, &devidstr) == 0) {
|
|
||||||
+ sscanf(devidstr, "%i", &dev->devid);
|
|
||||||
+ free(devidstr);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -224,13 +270,14 @@ static void fill_eth_dev(struct network_device *dev)
|
|
||||||
eths_get_ifindex(dev->kernel_name, &dev->ifindex);
|
|
||||||
eths_get_hwaddr(dev->kernel_name, dev->dev_addr, sizeof(dev->dev_addr), &dev->arphrd_type);
|
|
||||||
eths_get_permaddr(dev->kernel_name, dev->perm_addr, sizeof(dev->perm_addr));
|
|
||||||
- eths_get_devid(dev->kernel_name, &dev->devid);
|
|
||||||
devtype = eths_get_devtype(dev);
|
|
||||||
if (devtype > 0)
|
|
||||||
dev->devtype_is_fcoe = 1;
|
|
||||||
rc = eths_get_info(dev->kernel_name, &dev->drvinfo);
|
|
||||||
if (rc == 0)
|
|
||||||
dev->drvinfo_valid = 1;
|
|
||||||
+ eths_get_devid(dev);
|
|
||||||
+ eths_get_dev_eligible(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
void free_eths(struct libbiosdevname_state *state)
|
|
||||||
diff --git a/src/eths.h b/src/eths.h
|
|
||||||
index b695d3d..49e399d 100644
|
|
||||||
--- a/src/eths.h
|
|
||||||
+++ b/src/eths.h
|
|
||||||
@@ -30,6 +30,7 @@ struct network_device {
|
|
||||||
int devid;
|
|
||||||
int devtype_is_fcoe;
|
|
||||||
char *devtype;
|
|
||||||
+ int is_eligible:1; /* not eligible for naming when 0 */
|
|
||||||
};
|
|
||||||
|
|
||||||
extern void get_eths(struct libbiosdevname_state *state);
|
|
||||||
@@ -68,4 +69,9 @@ static inline int netdev_arphrd_type_is_eth(const struct network_device *dev)
|
|
||||||
return (dev->arphrd_type == ARPHRD_ETHER);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static inline int netdev_is_eligible(const struct network_device *dev)
|
|
||||||
+{
|
|
||||||
+ return (!!dev->is_eligible);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#endif /* __ETHS_H_INCLUDED */
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From e63b3589e0ded7078b2f02546fc0b0a2a10223be Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Mon, 17 Dec 2018 10:52:51 +0100
|
|
||||||
Subject: [PATCH] rules: disable pirq and force minimal smbios version
|
|
||||||
|
|
||||||
Related: #1623621
|
|
||||||
---
|
|
||||||
biosdevname.rules.in | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/biosdevname.rules.in b/biosdevname.rules.in
|
|
||||||
index 0a32aa5..105ef5a 100644
|
|
||||||
--- a/biosdevname.rules.in
|
|
||||||
+++ b/biosdevname.rules.in
|
|
||||||
@@ -19,6 +19,6 @@ LABEL="netdevicename_start"
|
|
||||||
|
|
||||||
# using NAME= instead of setting INTERFACE_NAME, so that persistent
|
|
||||||
# names aren't generated for these devices, they are "named" on each boot.
|
|
||||||
-SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --policy physical -i %k", NAME="%c", OPTIONS+="string_escape=replace"
|
|
||||||
+SUBSYSTEMS=="pci", PROGRAM="/sbin/biosdevname --smbios 2.6 --nopirq --policy physical -i %k", NAME="%c" OPTIONS+="string_escape=replace"
|
|
||||||
|
|
||||||
LABEL="netdevicename_end"
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From c4771922d64cb1540968ab4b5a9bfbe1148cb211 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Tue, 18 Dec 2018 11:34:56 +0100
|
|
||||||
Subject: [PATCH] rules: disable biosdevname by default
|
|
||||||
|
|
||||||
---
|
|
||||||
biosdevname.rules.in | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/biosdevname.rules.in b/biosdevname.rules.in
|
|
||||||
index 31b003c..1dcca74 100644
|
|
||||||
--- a/biosdevname.rules.in
|
|
||||||
+++ b/biosdevname.rules.in
|
|
||||||
@@ -12,8 +12,8 @@ ENV{biosdevname}=="?*", ENV{UDEV_BIOSDEVNAME}="$env{biosdevname}"
|
|
||||||
ENV{UDEV_BIOSDEVNAME}=="0", GOTO="netdevicename_end"
|
|
||||||
ENV{UDEV_BIOSDEVNAME}=="1", GOTO="netdevicename_start"
|
|
||||||
|
|
||||||
-# uncomment the next line for biosdevname to be off by default
|
|
||||||
-# GOTO="netdevicename_end"
|
|
||||||
+# off by default
|
|
||||||
+GOTO="netdevicename_end"
|
|
||||||
|
|
||||||
LABEL="netdevicename_start"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
Loading…
Reference in new issue