]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
netif-naming-scheme: disable NAMING_BRIDGE_MULTIFUNCTION_SLOT
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Aug 2023 15:01:19 +0000 (00:01 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 20 Oct 2023 09:56:48 +0000 (10:56 +0100)
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

index 9160e457ed9fa8df2720b432364d977f720d590e..3f7be0883056121ff9843ec2c48f64cb2ff21d1f 100644 (file)
@@ -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