daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
21255d
From af528dcffaab1efea760395cc6676fe4b01e89b5 Mon Sep 17 00:00:00 2001
21255d
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
21255d
Date: Thu, 9 May 2019 12:34:30 +0200
21255d
Subject: [PATCH] man: describe naming schemes in a new man page
21255d
21255d
I decided to make this a separate man page because it is freakin' long.
21255d
This content could equally well go in systemd-udevd.service(8), systemd.link(5),
21255d
or a new man page for the net_id builtin.
21255d
21255d
v2:
21255d
- rename to systemd.net-naming-scheme
21255d
- add udevadm test-builtin net_id example
21255d
21255d
(cherry picked from commit 0b1e5b6ed8c6b9a2bc53709eb75e381d360f05bf)
21255d
21255d
Related: #1827462
21255d
21255d
[msekleta: I've removed parts that describe features which are not
21255d
available in RHEL-8]
21255d
---
21255d
 man/rules/meson.build             |   1 +
21255d
 man/systemd-udevd.service.xml     |  19 +-
21255d
 man/systemd.link.xml              |  10 +-
21255d
 man/systemd.net-naming-scheme.xml | 385 ++++++++++++++++++++++++++++++
21255d
 src/udev/udev-builtin-net_id.c    |   1 +
21255d
 5 files changed, 402 insertions(+), 14 deletions(-)
21255d
 create mode 100644 man/systemd.net-naming-scheme.xml
21255d
21255d
diff --git a/man/rules/meson.build b/man/rules/meson.build
21255d
index 7ae94ea265..e6c0a99bbd 100644
21255d
--- a/man/rules/meson.build
21255d
+++ b/man/rules/meson.build
21255d
@@ -714,6 +714,7 @@ manpages = [
21255d
  ['systemd.kill', '5', [], ''],
21255d
  ['systemd.link', '5', [], ''],
21255d
  ['systemd.mount', '5', [], ''],
21255d
+ ['systemd.net-naming-scheme', '7', [], ''],
21255d
  ['systemd.netdev', '5', [], 'ENABLE_NETWORKD'],
21255d
  ['systemd.network', '5', [], 'ENABLE_NETWORKD'],
21255d
  ['systemd.nspawn', '5', [], ''],
21255d
diff --git a/man/systemd-udevd.service.xml b/man/systemd-udevd.service.xml
21255d
index b738591c93..f4cdb2f1e7 100644
21255d
--- a/man/systemd-udevd.service.xml
21255d
+++ b/man/systemd-udevd.service.xml
21255d
@@ -174,15 +174,11 @@
21255d
         <term><varname>net.naming-scheme=</varname></term>
21255d
         <listitem>
21255d
           <para>Network interfaces are renamed to give them predictable names when possible (unless
21255d
-          <varname>net.ifnames=0</varname> is specified, see above). The names are derived from various
21255d
-          device metadata fields. Newer versions of <filename>systemd-udevd.service</filename> take more of
21255d
-          these fields into account, improving (and thus possibly changing) the names used for the same
21255d
-          devices. With this kernel command line option it is possible to pick a specific version of this
21255d
-          algorithm. It expects a naming scheme identifier as argument. Currently the following identifiers
21255d
-          are known: <literal>rhel-8.0</literal>, <literal>rhel-8.1</literal>, <literal>rhel-8.2</literal>,
21255d
-          <literal>rhel-8.3</literal> which each implement the naming scheme that was the default in the
21255d
-          indicated Red Hat Enterprise Linux minor version. In addition, <literal>latest</literal> may be
21255d
-          used to designate the latest scheme known (to this particular version of
21255d
+          <varname>net.ifnames=0</varname> is specified, see above). With this kernel command line option it
21255d
+          is possible to pick a specific version of this algorithm and override the default chosen at
21255d
+          compilation time. Expects one of the naming scheme identifiers listed in
21255d
+          <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
21255d
+          or <literal>latest</literal> to select the latest scheme known (to this particular version of
21255d
           <filename>systemd-udevd.service</filename>).</para>
21255d
           <para>Note that selecting a specific scheme is not sufficient to fully stabilize interface naming:
21255d
           the naming is generally derived from driver attributes exposed by the kernel. As the kernel is
21255d
@@ -191,9 +187,8 @@
21255d
         </listitem>
21255d
       </varlistentry>
21255d
     </variablelist>
21255d
-    
21255d
-         in kernel-command-line.xml -->
21255d
- </refsect1>
21255d
+    
21255d
+  </refsect1>
21255d
 
21255d
   <refsect1>
21255d
     <title>See Also</title>
21255d
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
21255d
index 6708753e82..32657308d0 100644
21255d
--- a/man/systemd.link.xml
21255d
+++ b/man/systemd.link.xml
21255d
@@ -286,6 +286,7 @@
21255d
                 <para>The name is set based on information given by
21255d
                 the firmware for on-board devices, as exported by the
21255d
                 udev property <literal>ID_NET_NAME_ONBOARD</literal>.
21255d
+                See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
21255d
                 </para>
21255d
               </listitem>
21255d
             </varlistentry>
21255d
@@ -295,6 +296,7 @@
21255d
                 <para>The name is set based on information given by
21255d
                 the firmware for hot-plug devices, as exported by the
21255d
                 udev property <literal>ID_NET_NAME_SLOT</literal>.
21255d
+                See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
21255d
                 </para>
21255d
               </listitem>
21255d
             </varlistentry>
21255d
@@ -303,7 +305,9 @@
21255d
               <listitem>
21255d
                 <para>The name is set based on the device's physical
21255d
                 location, as exported by the udev property
21255d
-                <literal>ID_NET_NAME_PATH</literal>.</para>
21255d
+                <literal>ID_NET_NAME_PATH</literal>.
21255d
+                See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
21255d
+                </para>
21255d
               </listitem>
21255d
             </varlistentry>
21255d
             <varlistentry>
21255d
@@ -311,7 +315,9 @@
21255d
               <listitem>
21255d
                 <para>The name is set based on the device's persistent
21255d
                 MAC address, as exported by the udev property
21255d
-                <literal>ID_NET_NAME_MAC</literal>.</para>
21255d
+                <literal>ID_NET_NAME_MAC</literal>.
21255d
+                See <citerefentry><refentrytitle>systemd.net-naming-scheme</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
21255d
+                </para>
21255d
               </listitem>
21255d
             </varlistentry>
21255d
           </variablelist>
21255d
diff --git a/man/systemd.net-naming-scheme.xml b/man/systemd.net-naming-scheme.xml
21255d
new file mode 100644
21255d
index 0000000000..a12cc3c460
21255d
--- /dev/null
21255d
+++ b/man/systemd.net-naming-scheme.xml
21255d
@@ -0,0 +1,385 @@
21255d
+
21255d
+
21255d
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
21255d
+
21255d
+
21255d
+<refentry id="systemd.net-naming-scheme">
21255d
+  <refentryinfo>
21255d
+    <title>systemd.net-naming-scheme</title>
21255d
+    <productname>systemd</productname>
21255d
+  </refentryinfo>
21255d
+
21255d
+  <refmeta>
21255d
+    <refentrytitle>systemd.net-naming-scheme</refentrytitle>
21255d
+    <manvolnum>7</manvolnum>
21255d
+  </refmeta>
21255d
+
21255d
+  <refnamediv>
21255d
+    <refname>systemd.net-naming-scheme</refname>
21255d
+    <refpurpose>Network device naming schemes</refpurpose>
21255d
+  </refnamediv>
21255d
+
21255d
+  <refsect1>
21255d
+    <title>Description</title>
21255d
+
21255d
+    <para>Network interfaces may be renamed to give them predictable names when there's enough information to
21255d
+    generate appropriate names and the use of certain types of names is configured. This page describes the
21255d
+    first part, i.e. what possible names may be generated. Those names are generated by the
21255d
+    <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
21255d
+    builtin <command>net_id</command> and exported as udev properties
21255d
+    (<varname>ID_NET_NAME_ONBOARD=</varname>, <varname>ID_NET_LABEL_ONBOARD=</varname>,
21255d
+    <varname>ID_NET_NAME_PATH=</varname>, <varname>ID_NET_NAME_SLOT=</varname>).</para>
21255d
+
21255d
+    <para>Names are derived from various device metadata attributes. Newer versions of udev take more of
21255d
+    these attributes into account, improving (and thus possibly changing) the names used for the same
21255d
+    devices. Differents version of the naming rules are called "naming schemes". The default naming scheme is
21255d
+    chosen at compilation time. Usually this will be the latest implemented version, but it is also possible
21255d
+    to set one of the older versions to preserve compatibility. This may be useful for example for
21255d
+    distributions, which may introduce new versions of systemd in stable releases without changing the naming
21255d
+    scheme. The naming scheme may also be overriden using the <varname>net.naming-scheme=</varname> kernel
21255d
+    command line switch, see
21255d
+    <citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
21255d
+    Available naming schemes are described below.</para>
21255d
+
21255d
+    <para>After the udev proprties have been generated, appropriate udev rules may be used to actually rename
21255d
+    devices based on those properties. See the description of <varname>NamePolicy=</varname> in
21255d
+    <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
21255d
+    </para>
21255d
+  </refsect1>
21255d
+
21255d
+  <refsect1>
21255d
+    <title>Naming</title>
21255d
+
21255d
+    <para>All names start with a two-character prefix that signifies the interface type.</para>
21255d
+
21255d
+    
21255d
+      <title>Two character prefixes based on the type of interface</title>
21255d
+
21255d
+      <tgroup cols='2'>
21255d
+        
21255d
+          <row>
21255d
+            <entry>Prefix</entry>
21255d
+            <entry>Description</entry>
21255d
+          </row>
21255d
+        
21255d
+        
21255d
+          <row>
21255d
+            <entry><constant>en</constant></entry>
21255d
+            <entry>Ethernet</entry>
21255d
+          </row>
21255d
+          <row>
21255d
+            <entry><constant>sl</constant></entry>
21255d
+            <entry>serial line IP (slip)</entry>
21255d
+          </row>
21255d
+          <row>
21255d
+            <entry><constant>wl</constant></entry>
21255d
+            <entry>Wireless local area network (WLAN)</entry>
21255d
+          </row>
21255d
+          <row>
21255d
+            <entry><constant>ww</constant></entry>
21255d
+            <entry>Wireless wide area network (WWAN)</entry>
21255d
+          </row>
21255d
+        
21255d
+      </tgroup>
21255d
+    
21255d
+
21255d
+    <para>The udev <command>net_id</command> builtin exports the following udev device properties:</para>
21255d
+
21255d
+    <variablelist>
21255d
+        <varlistentry>
21255d
+          <term><varname>ID_NET_NAME_ONBOARD=<replaceable>prefix</replaceable><constant>o</constant><replaceable>number</replaceable></varname></term>
21255d
+
21255d
+          <listitem><para>This name is set based on the ordering information given by the firmware for
21255d
+          on-board devices. The name consists of the prefix, letter <constant>o</constant>, and a number
21255d
+          specified by the firmware. This is only available for PCI devices.</para>
21255d
+          </listitem>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><varname>ID_NET_LABEL_ONBOARD=<replaceable>prefix</replaceable> <replaceable>label</replaceable></varname></term>
21255d
+
21255d
+          <listitem><para>This property is set based on label given by the firmware for on-board devices. The
21255d
+          name consists of the prefix concatenated with the label. This is only available for PCI devices.
21255d
+          </para>
21255d
+          </listitem>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><varname>ID_NET_NAME_MAC=<replaceable>prefix</replaceable><constant>x</constant><replaceable>AABBCCDDEEFF</replaceable></varname></term>
21255d
+
21255d
+          <listitem><para>This name consists of the prefix, letter <constant>x</constant>, and 12 hexadecimal
21255d
+          digits of the MAC address. It is available if the device has a fixed MAC address. Because this name
21255d
+          is based on an attribute of the card itself, it remains "stable" when the device is moved (even
21255d
+          between machines), but will change when the hardware is replaced.</para>
21255d
+          </listitem>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><varname>ID_NET_NAME_SLOT=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]</varname></term>
21255d
+          <term><varname>ID_NET_NAME_SLOT=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]<constant>b</constant><replaceable>number</replaceable></varname></term>
21255d
+          <term><varname>ID_NET_NAME_SLOT=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]<constant>u</constant><replaceable>port</replaceable>…[<constant>c</constant><replaceable>config</replaceable>][<constant>i</constant><replaceable>interface</replaceable>]</varname></term>
21255d
+          <term><varname>ID_NET_NAME_SLOT=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]<constant>v</constant><replaceable>slot</replaceable></varname></term>
21255d
+
21255d
+          <listitem><para>This property describes the slot position. Different schemes are used depending on
21255d
+          the bus type, as described in the table below. In all cases, PCI slot information must be known. In
21255d
+          case of USB, BCMA, and SR-VIO devices, the full name consists of the prefix, PCI slot identifier,
21255d
+          and USB or BCMA or SR-VIO slot identifier. The first two parts are denoted as "…" in the table
21255d
+          below.</para>
21255d
+
21255d
+          
21255d
+            <title>Slot naming schemes</title>
21255d
+
21255d
+            <tgroup cols='2'>
21255d
+              
21255d
+                <row>
21255d
+                  <entry>Format</entry>
21255d
+                  <entry>Description</entry>
21255d
+                </row>
21255d
+              
21255d
+
21255d
+              
21255d
+                <row>
21255d
+                  <entry><replaceable>prefix</replaceable> [<constant>P</constant><replaceable>domain</replaceable>] <constant>s</constant><replaceable>slot</replaceable> [<constant>f</constant><replaceable>function</replaceable>] [<constant>n</constant><replaceable>port_name</replaceable> | <constant>d</constant><replaceable>dev_port</replaceable>]</entry>
21255d
+                  <entry>PCI slot number</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry>… <constant>b</constant><replaceable>number</replaceable></entry>
21255d
+                  <entry>Broadcom bus (BCMA) core number</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry>… <constant>u</constant><replaceable>port</replaceable>… [<constant>c</constant><replaceable>config</replaceable>] [<constant>i</constant><replaceable>interface</replaceable>]</entry>
21255d
+                  <entry>USB port number chain</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry>… <constant>v</constant><replaceable>slot</replaceable></entry>
21255d
+                  <entry>SR-VIO slot number</entry>
21255d
+                </row>
21255d
+              
21255d
+            </tgroup>
21255d
+          
21255d
+
21255d
+          <para>The PCI domain is only prepended when it is not 0. All multi-function PCI devices will carry
21255d
+          the <constant>f<replaceable>function</replaceable></constant> number in the device name, including
21255d
+          the function 0 device. For non-multi-function devices, the number is suppressed if 0. The port name
21255d
+          <replaceable>port_name</replaceable> is used, or the port number
21255d
+          <constant>d</constant><replaceable>dev_port</replaceable> if the name is not known.</para>
21255d
+
21255d
+          <para>For BCMA devices, the core number is suppressed when 0.</para>
21255d
+
21255d
+          <para>For USB devices the full chain of port numbers of hubs is composed. If the name gets longer
21255d
+          than the maximum number of 15 characters, the name is not exported. The usual USB configuration
21255d
+          number 1 and interface number 0 values are suppressed.</para>
21255d
+          </listitem>
21255d
+
21255d
+          <para>SR-IOV virtual devices are named based on the name of the parent interface, with a suffix of
21255d
+          <constant>v</constant> and the virtual device number, with any leading zeros removed. The bus
21255d
+          number is ignored. This device type is found in IBM PowerVMs.</para>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable><constant>c</constant><replaceable>bus_id</replaceable></varname></term>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable><constant>a</constant><replaceable>vendor</replaceable><replaceable>model</replaceable><constant>i</constant><replaceable>instance</replaceable></varname></term>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable><constant>i</constant><replaceable>address</replaceable><constant>n</constant><replaceable>port_name</replaceable></varname></term>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>p</constant><replaceable>bus</replaceable><constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>phys_port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]</varname></term>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>p</constant><replaceable>bus</replaceable><constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>phys_port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]<constant>b</constant><replaceable>number</replaceable></varname></term>
21255d
+          <term><varname>ID_NET_NAME_PATH=<replaceable>prefix</replaceable>[<constant>P</constant><replaceable>domain</replaceable>]<constant>p</constant><replaceable>bus</replaceable><constant>s</constant><replaceable>slot</replaceable>[<constant>f</constant><replaceable>function</replaceable>][<constant>n</constant><replaceable>phys_port_name</replaceable>|<constant>d</constant><replaceable>dev_port</replaceable>]<constant>u</constant><replaceable>port</replaceable>…[<constant>c</constant><replaceable>config</replaceable>][<constant>i</constant><replaceable>interface</replaceable>]</varname></term>
21255d
+
21255d
+          <listitem><para>This property describes the device installation location. Different schemes are
21255d
+          used depending on the bus type, as described in the table below. For BCMA and USB devices, PCI path
21255d
+          information must known, and the full name consists of the prefix, PCI slot identifier, and USB or
21255d
+          BCMA location. The first two parts are denoted as "…" in the table below.</para>
21255d
+
21255d
+          
21255d
+            <title>Path naming schemes</title>
21255d
+
21255d
+            <tgroup cols='2'>
21255d
+              
21255d
+                <row>
21255d
+                  <entry>Format</entry>
21255d
+                  <entry>Description</entry>
21255d
+                </row>
21255d
+              
21255d
+
21255d
+              
21255d
+                <row>
21255d
+                  <entry><replaceable>prefix</replaceable> <constant>c</constant><replaceable>bus_id</replaceable></entry>
21255d
+                  <entry>CCW or grouped CCW device identifier</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry><replaceable>prefix</replaceable> <constant>a</constant><replaceable>vendor</replaceable> <replaceable>model</replaceable> <constant>i</constant><replaceable>instance</replaceable></entry>
21255d
+                  <entry>ACPI path names for ARM64 platform devices</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry><replaceable>prefix</replaceable> [<constant>P</constant><replaceable>domain</replaceable>] <constant>p</constant><replaceable>bus</replaceable> <constant>s</constant><replaceable>slot</replaceable> [<constant>f</constant><replaceable>function</replaceable>] [<constant>n</constant><replaceable>phys_port_name</replaceable> | <constant>d</constant><replaceable>dev_port</replaceable>]</entry>
21255d
+                  <entry>PCI geographical location</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry>… <constant>b</constant><replaceable>number</replaceable></entry>
21255d
+                  <entry>Broadcom bus (BCMA) core number</entry>
21255d
+                </row>
21255d
+
21255d
+                <row>
21255d
+                  <entry>… <constant>u</constant><replaceable>port</replaceable>… [<constant>c</constant><replaceable>config</replaceable>] [<constant>i</constant><replaceable>interface</replaceable>]</entry>
21255d
+                  <entry>USB port number chain</entry>
21255d
+                </row>
21255d
+
21255d
+              
21255d
+            </tgroup>
21255d
+          
21255d
+
21255d
+          <para>CCW and grouped CCW devices are found in IBM System Z mainframes. Any leading zeros and
21255d
+          dots are suppressed.</para>
21255d
+
21255d
+          <para>For PCI, BCMA, and USB devices, the same rules as described above for slot naming are
21255d
+          used.</para>
21255d
+          </listitem>
21255d
+        </varlistentry>
21255d
+    </variablelist>
21255d
+  </refsect1>
21255d
+
21255d
+  <refsect1>
21255d
+    <title>History</title>
21255d
+
21255d
+    <para>The following "naming schemes" have been defined:</para>
21255d
+
21255d
+    <variablelist>
21255d
+        <varlistentry>
21255d
+          <term><constant>rhel-8.0</constant></term>
21255d
+
21255d
+          <listitem><para>Naming was changed for virtual network interfaces created with SR-IOV and NPAR and
21255d
+          for devices where the PCI network controller device does not have a slot number associated.</para>
21255d
+
21255d
+          <para>SR-IOV virtual devices are named based on the name of the parent interface, with a suffix of
21255d
+          <literal>v<replaceable>port</replaceable></literal>, where <replaceable>port</replaceable> is the
21255d
+          virtual device number. Previously those virtual devices were named as if completely independent.
21255d
+          </para>
21255d
+
21255d
+          <para>The ninth and later NPAR virtual devices are named following the scheme used for the first
21255d
+          eight NPAR partitions. Previously those devices were not renamed and the kernel default
21255d
+          ("eth<replaceable>N</replaceable>") was used.</para>
21255d
+
21255d
+          <para>Names are also generated for PCI devices where the PCI network controller device does not
21255d
+          have an associated slot number itself, but one of its parents does. Previously those devices were
21255d
+          not renamed and the kernel default was used.</para>
21255d
+          </listitem>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><constant>rhel-8.1</constant></term>
21255d
+
21255d
+          <para>Same as naming scheme <constant>rhel-8.0</constant>.</para>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><constant>rhel-8.2</constant></term>
21255d
+
21255d
+          <para>Same as naming scheme <constant>rhel-8.0</constant>.</para>
21255d
+        </varlistentry>
21255d
+
21255d
+        <varlistentry>
21255d
+          <term><constant>rhel-8.3</constant></term>
21255d
+
21255d
+          <para>Same as naming scheme <constant>rhel-8.0</constant>.</para>
21255d
+        </varlistentry>
21255d
+
21255d
+        <para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this
21255d
+        particular version of systemd.</para>
21255d
+    </variablelist>
21255d
+  </refsect1>
21255d
+
21255d
+  <refsect1>
21255d
+    <title>Examples</title>
21255d
+
21255d
+    <example>
21255d
+      <title>Using <command>udevadm test-builtin</command> to display device properties</title>
21255d
+
21255d
+      <programlisting>$ udevadm test-builtin net_id /sys/class/net/enp0s31f6
21255d
+...
21255d
+Using default interface naming scheme 'rhel-8.3'.
21255d
+ID_NET_NAMING_SCHEME=rhel-8.3
21255d
+ID_NET_NAME_MAC=enx54ee75cb1dc0
21255d
+ID_OUI_FROM_DATABASE=Wistron InfoComm(Kunshan)Co.,Ltd.
21255d
+ID_NET_NAME_PATH=enp0s31f6
21255d
+...</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>PCI Ethernet card with firmware index "1"</title>
21255d
+
21255d
+      <programlisting>ID_NET_NAME_ONBOARD=eno1
21255d
+ID_NET_NAME_ONBOARD_LABEL=enEthernet Port 1
21255d
+      </programlisting>
21255d
+      
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>PCI Ethernet card in hotplug slot with firmware index number</title>
21255d
+
21255d
+      <programlisting># /sys/devices/pci0000:00/0000:00:1c.3/0000:05:00.0/net/ens1
21255d
+ID_NET_NAME_MAC=enx000000000466
21255d
+ID_NET_NAME_PATH=enp5s0
21255d
+ID_NET_NAME_SLOT=ens1</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>PCI Ethernet multi-function card with 2 ports</title>
21255d
+
21255d
+      <programlisting># /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/enp2s0f0
21255d
+ID_NET_NAME_MAC=enx78e7d1ea46da
21255d
+ID_NET_NAME_PATH=enp2s0f0
21255d
+
21255d
+# /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.1/net/enp2s0f1
21255d
+ID_NET_NAME_MAC=enx78e7d1ea46dc
21255d
+ID_NET_NAME_PATH=enp2s0f1</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>PCI WLAN card</title>
21255d
+
21255d
+      <programlisting># /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlp3s0
21255d
+ID_NET_NAME_MAC=wlx0024d7e31130
21255d
+ID_NET_NAME_PATH=wlp3s0</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>USB built-in 3G modem</title>
21255d
+
21255d
+      <programlisting># /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.6/net/wwp0s29u1u4i6
21255d
+ID_NET_NAME_MAC=wwx028037ec0200
21255d
+ID_NET_NAME_PATH=wwp0s29u1u4i6</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>USB Android phone</title>
21255d
+
21255d
+      <programlisting># /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/net/enp0s29u1u2
21255d
+ID_NET_NAME_MAC=enxd626b3450fb5
21255d
+ID_NET_NAME_PATH=enp0s29u1u2</programlisting>
21255d
+    </example>
21255d
+
21255d
+    <example>
21255d
+      <title>s390 grouped CCW interface</title>
21255d
+
21255d
+      <programlisting># /sys/devices/css0/0.0.0007/0.0.f5f0/group_device/net/encf5f0
21255d
+ID_NET_NAME_MAC=enx026d3c00000a
21255d
+ID_NET_NAME_PATH=encf5f0</programlisting>
21255d
+    </example>
21255d
+  </refsect1>
21255d
+
21255d
+  <refsect1>
21255d
+    <title>See Also</title>
21255d
+    <para>
21255d
+      <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
21255d
+      <citerefentry><refentrytitle>udevadm</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
21255d
+      <ulink url="https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames">the
21255d
+      original page describing stable interface names</ulink>
21255d
+    </para>
21255d
+  </refsect1>
21255d
+
21255d
+</refentry>
21255d
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
21255d
index d85dc2848b..aa553d5ade 100644
21255d
--- a/src/udev/udev-builtin-net_id.c
21255d
+++ b/src/udev/udev-builtin-net_id.c
21255d
@@ -78,6 +78,7 @@
21255d
  *  /sys/devices/css0/0.0.0007/0.0.f5f0/group_device/net/encf5f0
21255d
  *  ID_NET_NAME_MAC=enx026d3c00000a
21255d
  *  ID_NET_NAME_PATH=encf5f0
21255d
+ * When the code here is changed, man/systemd.net-naming-scheme.xml must be updated too.
21255d
  */
21255d
 
21255d
 #include <errno.h>