From af7417ac7b07bc01232982bf46e9d72e69e7f820 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 24 Aug 2023 00:01:19 +0900 Subject: [PATCH] netif-naming-scheme: disable NAMING_BRIDGE_MULTIFUNCTION_SLOT This effectively reverts 66425daf2c68793adf24a48a26d58add8662e83f. The commit assumes that if the network interface has multifunctions, then the function fields of the pci devices under the same PCI bridge device are unique. But it seems not, at least on some setups. See issue #28929. Let's revert the change, and always refuse to set slot base naming if a PCI bridge is detected. Fixes #28929. --- src/shared/netif-naming-scheme.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index 9160e457ed..3f7be08830 100644 --- a/src/shared/netif-naming-scheme.h +++ b/src/shared/netif-naming-scheme.h @@ -36,7 +36,8 @@ typedef enum NamingSchemeFlags { NAMING_16BIT_INDEX = 1 << 11, /* Allow full 16-bit for the onboard index */ NAMING_REPLACE_STRICTLY = 1 << 12, /* Use udev_replace_ifname() for NAME= rule */ NAMING_XEN_VIF = 1 << 13, /* Generate names for Xen netfront devices */ - NAMING_BRIDGE_MULTIFUNCTION_SLOT = 1 << 14, /* Use PCI hotplug slot information associated with bridge, but only if PCI device is multifunction */ + NAMING_BRIDGE_MULTIFUNCTION_SLOT = 1 << 14, /* Use PCI hotplug slot information associated with bridge, but only if PCI device is multifunction. + * This is disabled since v255, as it seems not to work at least for some setups. See issue #28929. */ NAMING_DEVICETREE_ALIASES = 1 << 15, /* Generate names from devicetree aliases */ NAMING_USB_HOST = 1 << 16, /* Generate names for usb host */ NAMING_SR_IOV_R = 1 << 17, /* Use "r" suffix for SR-IOV VF representors */ @@ -58,7 +59,7 @@ typedef enum NamingSchemeFlags { * for systemd version 254. It was added in a follow-up * patch later. NAMING_SR_IOV_R is enabled by default in * systemd version 255, naming scheme "v255". */ - NAMING_V255 = NAMING_V254, + NAMING_V255 = NAMING_V254 & ~NAMING_BRIDGE_MULTIFUNCTION_SLOT, EXTRA_NET_NAMING_SCHEMES -- 2.25.1