udev/net_id: don't generate slot based names if multiple devices might claim the same slot

This commit is contained in:
Michal Sekletár
2020-10-19 17:55:44 +02:00
parent 3e545ae5ab
commit 2c8ec0095e
4 changed files with 45 additions and 1 deletions
+14
View File
@@ -192,6 +192,9 @@
<para>SR-IOV virtual devices are named based on the name of the parent interface, with a suffix of
<constant>v</constant> and the virtual device number, with any leading zeros removed. The bus
number is ignored.</para>
<para>In some configurations a parent PCI bridge of a given network controller may be associated
with a slot. In such case we don't generate this device property to avoid possible naming conflicts.</para>
</listitem>
</varlistentry>
@@ -354,6 +357,17 @@
multiple similarly named containers (who only differ in container name suffix) should be less
likely (but still possible, since the 24bit hash value is very small).</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>v246</constant></term>
<listitem><para>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 <varname>ID_NET_NAME_SLOT</varname>
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 <varname>ID_NET_NAME_SLOT</varname> property to
avoid possible naming conflict.</para></listitem>
</varlistentry>
</variablelist>
<para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this