[systemd-devel] Proposal: Add biosdevname naming scheme to systemd
Jordan Hargrave
jharg93 at gmail.com
Tue Oct 20 20:04:21 PDT 2015
On Tue, Oct 20, 2015 at 3:02 PM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> 20.10.2015 17:30, Jordan Hargrave пишет:
>
>> On Tue, Oct 20, 2015 at 1:15 AM, Andrei Borzenkov <arvidjaar at gmail.com>
>> wrote:
>>>
>>> On Tue, Oct 20, 2015 at 7:46 AM, Jordan Hargrave <jharg93 at gmail.com>
>>> wrote:
>>>>
>>>> On Mon, Mar 2, 2015 at 1:17 PM, Tom Gundersen <teg at jklm.no> wrote:
>>>>>
>>>>> Hi Jordan,
>>>>>
>>>>> On Mon, Mar 2, 2015 at 4:45 PM, Jordan Hargrave <jharg93 at gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> There are currently two competing naming mechanisms for network cards,
>>>>>> biosdevname and systemd. Systemd currently has some limitations on
>>>>>> naming
>>>>>> cards that use network partitioning or support SR-IOV.
>>>>>
>>>>>
>>>>> Could you point to an example so we can fix it? I thought all bug
>>>>> reports had been handled, but maybe I lost track of something.
>>>>>
>>>>
>>>> I have a quad-port NIC:
>>>> 0000:40:00.0 = PCIE bridge (SMBIOS Slot 2)
>>>> 0000:41:00.0 = Ethernet Device (port1)
>>>> 0000:41:00.1 = Ethernet Device (port2)
>>>> 0000:42:00.0 = Ethernet Device (port3)
>>>> 0000:42:00.1 = Ethernet Device (port4)
>>>>
>>>> biosdevname would name these p2p1, p2p2, p2p3, p2p4 respectively.
>>>>
>>>
>>> How does it determine that 41 and 42 are the same device? I.e. how
>>> does it differ from real bridge with two independent two-port cards
>>> behind? Could you explain what information it is using? Is it exported
>>> in sysfs?
>>>
>>> ...
>>
>>
>> It knows they are on the same slot as the parent device has SMBIOS
>> Slot#2 (Type 9). So all child devices of a physical slot are on the
>> same card. I'm currently using a patch to systemd that reads SMBIOS
>> type 9. There isn't a kernel sysfs variable that displays this.
>>
>
> This gives us slot ID, but how do we know which of function 0 on this slot
> ID is port 0 and which is port 2? There is nothing in SMBIOS description of
> Type 9 that answers it.
Dell cards have an encoding in PCI VPD (DCM) that maps a PCI DevFn to
port and instance.
Here's an example system with loaded Qlogic, Broadcom, Intel cards.
Intel supports SR-IOV
==== DCM1001009d7F1402009d7F2101009d7F2502009d7F32010089154301008915
0000:01:00.0 port=1 instance=1
0000:01:00.4 port=1 instance=2
0000:01:00.1 port=2 instance=1
0000:01:00.5 port=2 instance=2
0000:01:00.2 port=3 instance=1
0000:01:00.3 port=4 instance=1
==== DCM100100015F120200015F140300015F160400015F210100015F230200015F250300015F270400015F
0000:41:00.0 port=1 instance=1
0000:41:00.2 port=1 instance=2
0000:41:00.4 port=1 instance=3
0000:41:00.6 port=1 instance=4
0000:41:00.1 port=2 instance=1
0000:41:00.3 port=2 instance=2
0000:41:00.5 port=2 instance=3
0000:41:00.7 port=2 instance=4
==== DCM10010081D521010081D5
0000:43:00.0 port=1 instance=1
0000:43:00.1 port=2 instance=1
LSPCI has the following ethernet devices.
0000:01:00.0 = Broadcom, port 1, instance 1
0000:01:00.1 port 2, instance 1
0000:01:00.2 port 3
0000:01:00.3 port 4
0000:01:00.4 port 1, instance 2
0000:01:00.5 port 2, instance 2
0000:41:00.0 = QLogic (PCIE slot 5), port 1, instance 1
0000:41:00.1 = port 2, instance 1
0000:41:00.2 = port 1, instance 2
0000:41:00.3 = port 2, instance 2
0000:41:00.4 = port 1, instance 3
0000:41:00.5 = port 2, instance 3
0000:41:00.6 = port 1, instance 4
0000:41:00.7 = port 2, instance 4
0000:43:00.0 = Intel (PCIE slot 2), port 1
0000:43:00.1 port 2
0000:43:10.0 vf port 1, instance 0
0000:43:10.1 vf port 2, instance 0
0000:43:10.2 vf port 1, instance 1
0000:43:10.3 vf port 2, instance 1
0000:43:10.4 vf port 1, instance 2
0000:43:10.5 vf port 2, instance 2
0000:43:10.6 vf port 1, instance 3
0000:43:10.7 vf port 2, instance 3
0000:43:11.0 vf port 1, instance 4
0000:43:11.1 etc..
0000:43:11.2
0000:43:11.3
0000:43:11.4
0000:43:11.5
0000:43:11.6
0000:43:11.7
0000:43:12.0
0000:43:12.1
0000:43:12.2
0000:43:12.3
0000:43:12.4
0000:43:12.5
0000:43:12.6
0000:43:12.7
0000:43:13.0
0000:43:13.1
0000:43:13.2
0000:43:13.3
0000:43:13.4
0000:43:13.5
0000:43:13.6
0000:43:13.7
0000:43:14.0
0000:43:14.1
0000:43:14.2
0000:43:14.3
0000:43:14.4
0000:43:14.5
0000:43:14.6
0000:43:14.7
0000:43:15.0
0000:43:15.1
0000:43:15.2
0000:43:15.3
0000:43:15.4
0000:43:15.5
0000:43:15.6
0000:43:15.7
0000:43:16.0
0000:43:16.1
0000:43:16.2
0000:43:16.3
0000:43:16.4
0000:43:16.5
0000:43:16.6
0000:43:16.7
0000:43:17.0
0000:43:17.1
0000:43:17.2
0000:43:17.3
0000:43:17.4
0000:43:17.5
0000:43:17.6
0000:43:17.7
More information about the systemd-devel
mailing list