summaryrefslogtreecommitdiff
path: root/src/shared/netif-naming-scheme.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@amazon.com>2021-10-20 15:18:59 +1100
committerLennart Poettering <lennart@poettering.net>2021-10-28 13:09:00 +0200
commitd6eda677b32a0063a77cb639f37c9a454b180da9 (patch)
tree571bcc36591a7385246b1f471dd55f853410cd09 /src/shared/netif-naming-scheme.h
parentac33cf9282a1d10c13de5c462f16e351ecb01f36 (diff)
downloadsystemd-d6eda677b32a0063a77cb639f37c9a454b180da9.tar.gz
udev: net_id: introduce predictable names for xen-netfront
Those devices show up as /sys/devices/vif-N, let's use that number to name them enXN. Without this, all schemes fail and they keep the kernel names, which can be racy. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'src/shared/netif-naming-scheme.h')
-rw-r--r--src/shared/netif-naming-scheme.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h
index 0141a4fb90..11ce6e62ee 100644
--- a/src/shared/netif-naming-scheme.h
+++ b/src/shared/netif-naming-scheme.h
@@ -35,6 +35,7 @@ typedef enum NamingSchemeFlags {
NAMING_SLOT_FUNCTION_ID = 1 << 10, /* Use function_id if present to identify PCI hotplug slots */
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 */
/* And now the masks that combine the features above */
NAMING_V238 = 0,
@@ -45,6 +46,7 @@ typedef enum NamingSchemeFlags {
NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH,
NAMING_V247 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT,
NAMING_V249 = NAMING_V247 | NAMING_SLOT_FUNCTION_ID | NAMING_16BIT_INDEX | NAMING_REPLACE_STRICTLY,
+ NAMING_V250 = NAMING_V249 | NAMING_XEN_VIF,
EXTRA_NET_NAMING_SCHEMES