From b91be007c4172b50e5ca570c3c3cd64fecbf377b Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 25 Jun 2024 14:00:45 +0200 Subject: [PATCH] net-naming-scheme: start rhel10 naming and include rhel8 and rhel9 ones Also add RHEL8,9,10 versions to version-info.xml file rhel-only: feature Resolves: RHEL-22621 --- man/systemd.net-naming-scheme.xml | 186 ++++++++++++++++++++++++++++++ man/version-info.xml | 33 ++++++ src/shared/netif-naming-scheme.c | 17 +++ src/shared/netif-naming-scheme.h | 20 ++++ 4 files changed, 256 insertions(+) diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml index ff811c2bd7..690e3d2c27 100644 --- a/man/systemd.net-naming-scheme.xml +++ b/man/systemd.net-naming-scheme.xml @@ -525,7 +525,193 @@ + + rhel-10.0 + + Same as naming scheme v255. + + + + + + By default rhel-10.0 is used. + + + RHEL-9 schemes + It is also possible to pick a scheme from RHEL-9 + + + rhel-9.0 + + Since version v247 we no longer set + ID_NET_NAME_SLOT if we detect that a PCI device associated with a slot is a PCI + bridge as that would create naming conflict when there are more child devices on that bridge. Now, + this is relaxed and we will use slot information to generate the name based on it but only if + the PCI device has multiple functions. This is safe because distinct function number is a part of + the device name for multifunction devices. + + + + + + + rhel-9.1 + + Same as naming scheme rhel-9.0. + + + + + + + rhel-9.2 + + Same as naming scheme rhel-9.0. + + + + + + + rhel-9.3 + + Naming was changed for SR-IOV virtual device representors. + + The rslot suffix was added to differentiate SR-IOV + virtual device representors attached to a single physical device interface. + + + + + + + rhel-9.4 + + Same as naming scheme rhel-9.3. + + + + + + + + + RHEL-8 schemes + It is also possible to pick a scheme from RHEL-8 + + + rhel-8.0 + + Same as naming scheme v239. + + + + + + + rhel-8.1 + + Same as naming scheme rhel-8.0. + + + + + + + rhel-8.2 + + Same as naming scheme rhel-8.0. + + + + + + + rhel-8.3 + + Same as naming scheme rhel-8.0. + + + + + + + rhel-8.4 + + If the PCI slot is assocated with PCI bridge and that has multiple child network + controllers then all of them might derive the same value of ID_NET_NAME_SLOT + property. That could cause naming conflict if the property is selected as a device name. Now, we detect the + situation, slot - bridge relation, and we don't produce the ID_NET_NAME_SLOT property to + avoid possible naming conflict. + + + + + + + rhel-8.5 + + Same as naming scheme rhel-8.4. + + + + + + + rhel-8.6 + + Same as naming scheme rhel-8.4. + + + + + + + rhel-8.7 + + PCI hotplug slot names for the s390 PCI driver are a hexadecimal representation + of the function_id device attribute. This attribute is now used to build the + ID_NET_NAME_SLOT. Before that, all slot names were parsed as decimal + numbers, which could either result in an incorrect value of the ID_NET_NAME_SLOT + property or none at all. + + Some firmware and hypervisor implementations report unreasonable high numbers for the onboard + index. To prevent the generation of bogus onbard interface names, index numbers greater than 16381 + (2^14-1) were ignored. For s390 PCI devices index values up to 65535 (2^16-1) are valid. To account + for that, the limit is increased to now 65535. + + + + + + + rhel-8.8 + + Same as naming scheme rhel-8.7. + + + + + + + rhel-8.9 + + Same as naming scheme rhel-8.7. + + + + + + + rhel-8.10 + + Same as naming scheme rhel-8.7. + + + + + Note that latest may be used to denote the latest scheme known (to this particular version of systemd). diff --git a/man/version-info.xml b/man/version-info.xml index bd210b20d3..274450d408 100644 --- a/man/version-info.xml +++ b/man/version-info.xml @@ -81,4 +81,37 @@ Added in version 255. Added in version 256. Added in version 257. + Added in rhel-8.0. + Added in rhel-8.1. + Added in rhel-8.2. + Added in rhel-8.3. + Added in rhel-8.4. + Added in rhel-8.5. + Added in rhel-8.6. + Added in rhel-8.7. + Added in rhel-8.8. + Added in rhel-8.9. + Added in rhel-8.10. + Added in rhel-9.0. + Added in rhel-9.1. + Added in rhel-9.2. + Added in rhel-9.3. + Added in rhel-9.4. + Added in rhel-9.5. + Added in rhel-9.6. + Added in rhel-9.7. + Added in rhel-9.8. + Added in rhel-9.9. + Added in rhel-9.10. + Added in rhel-10.0. + Added in rhel-10.1. + Added in rhel-10.2. + Added in rhel-10.3. + Added in rhel-10.4. + Added in rhel-10.5. + Added in rhel-10.6. + Added in rhel-10.7. + Added in rhel-10.8. + Added in rhel-10.9. + Added in rhel-10.10. diff --git a/src/shared/netif-naming-scheme.c b/src/shared/netif-naming-scheme.c index 2955b6e8d5..e4d4c0ba88 100644 --- a/src/shared/netif-naming-scheme.c +++ b/src/shared/netif-naming-scheme.c @@ -24,6 +24,23 @@ static const NamingScheme naming_schemes[] = { { "v253", NAMING_V253 }, { "v254", NAMING_V254 }, { "v255", NAMING_V255 }, + { "rhel-8.0", NAMING_RHEL_8_0 }, + { "rhel-8.1", NAMING_RHEL_8_1 }, + { "rhel-8.2", NAMING_RHEL_8_2 }, + { "rhel-8.3", NAMING_RHEL_8_3 }, + { "rhel-8.4", NAMING_RHEL_8_4 }, + { "rhel-8.5", NAMING_RHEL_8_5 }, + { "rhel-8.6", NAMING_RHEL_8_6 }, + { "rhel-8.7", NAMING_RHEL_8_7 }, + { "rhel-8.8", NAMING_RHEL_8_8 }, + { "rhel-8.9", NAMING_RHEL_8_9 }, + { "rhel-8.10", NAMING_RHEL_8_10 }, + { "rhel-9.0", NAMING_RHEL_9_0 }, + { "rhel-9.1", NAMING_RHEL_9_1 }, + { "rhel-9.2", NAMING_RHEL_9_2 }, + { "rhel-9.3", NAMING_RHEL_9_3 }, + { "rhel-9.4", NAMING_RHEL_9_4 }, + { "rhel-10.0", NAMING_RHEL_10_0 }, /* … add more schemes here, as the logic to name devices is updated … */ EXTRA_NET_NAMING_MAP diff --git a/src/shared/netif-naming-scheme.h b/src/shared/netif-naming-scheme.h index 62afdc514a..b0697c141e 100644 --- a/src/shared/netif-naming-scheme.h +++ b/src/shared/netif-naming-scheme.h @@ -63,6 +63,26 @@ typedef enum NamingSchemeFlags { * systemd version 255, naming scheme "v255". */ NAMING_V255 = NAMING_V254 & ~NAMING_BRIDGE_MULTIFUNCTION_SLOT, + NAMING_RHEL_8_0 = NAMING_V239, + NAMING_RHEL_8_1 = NAMING_V239, + NAMING_RHEL_8_2 = NAMING_V239, + NAMING_RHEL_8_3 = NAMING_V239, + NAMING_RHEL_8_4 = NAMING_V239 | NAMING_BRIDGE_NO_SLOT, + NAMING_RHEL_8_5 = NAMING_RHEL_8_4, + NAMING_RHEL_8_6 = NAMING_RHEL_8_4, + NAMING_RHEL_8_7 = NAMING_RHEL_8_4 | NAMING_SLOT_FUNCTION_ID | NAMING_16BIT_INDEX, + NAMING_RHEL_8_8 = NAMING_RHEL_8_7, + NAMING_RHEL_8_9 = NAMING_RHEL_8_7, + NAMING_RHEL_8_10 = NAMING_RHEL_8_7, + + NAMING_RHEL_9_0 = NAMING_V250 | NAMING_BRIDGE_MULTIFUNCTION_SLOT, + NAMING_RHEL_9_1 = NAMING_RHEL_9_0, + NAMING_RHEL_9_2 = NAMING_RHEL_9_0, + NAMING_RHEL_9_3 = NAMING_RHEL_9_0 | NAMING_SR_IOV_R, + NAMING_RHEL_9_4 = NAMING_RHEL_9_3, + + NAMING_RHEL_10_0 = NAMING_V255, + EXTRA_NET_NAMING_SCHEMES _NAMING_SCHEME_FLAGS_INVALID = -EINVAL,