udev/net_id: don't generate slot based names if multiple devices might claim the same slot
This commit is contained in:
@@ -12,6 +12,7 @@ static const NamingScheme naming_schemes[] = {
|
||||
{ "v241", NAMING_V241 },
|
||||
{ "v243", NAMING_V243 },
|
||||
{ "v245", NAMING_V245 },
|
||||
{ "v246", NAMING_V246 },
|
||||
/* … add more schemes here, as the logic to name devices is updated … */
|
||||
};
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ typedef enum NamingSchemeFlags {
|
||||
NAMING_NETDEVSIM = 1 << 6, /* Generate names for netdevsim devices, see eaa9d507d855 */
|
||||
NAMING_LABEL_NOPREFIX = 1 << 7, /* Don't prepend ID_NET_LABEL_ONBOARD with interface type prefix */
|
||||
NAMING_NSPAWN_LONG_HASH = 1 << 8, /* Shorten nspawn interfaces by including 24bit hash, instead of simple truncation */
|
||||
NAMING_BRIDGE_NO_SLOT = 1 << 9, /* Don't use PCI hotplug slot information if the corresponding device is a PCI bridge */
|
||||
|
||||
/* And now the masks that combine the features above */
|
||||
NAMING_V238 = 0,
|
||||
@@ -39,6 +40,7 @@ typedef enum NamingSchemeFlags {
|
||||
NAMING_V241 = NAMING_V240 | NAMING_STABLE_VIRTUAL_MACS,
|
||||
NAMING_V243 = NAMING_V241 | NAMING_NETDEVSIM | NAMING_LABEL_NOPREFIX,
|
||||
NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH,
|
||||
NAMING_V246 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT,
|
||||
|
||||
_NAMING_SCHEME_FLAGS_INVALID = -1,
|
||||
} NamingSchemeFlags;
|
||||
|
||||
Reference in New Issue
Block a user