teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0478-man-describe-naming-schemes-in-a-new-man-page.patch

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