From: Yu Watanabe Date: Wed, 23 Aug 2023 15:01:19 +0000 (+0900) Subject: netif-naming-scheme: disable NAMING_BRIDGE_MULTIFUNCTION_SLOT X-Git-Tag: v255-rc1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af7417ac7b07bc01232982bf46e9d72e69e7f820;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index 9160e457ed9..3f7be088305 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