Bug 2061216 - pciAddress for SR-IOV VF passthrough of Network Device is ignored.
Summary: pciAddress for SR-IOV VF passthrough of Network Device is ignored.
Keywords:
Status: CLOSED DUPLICATE of bug 2070772
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.8.5
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Orel Misan
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-06 23:56 UTC by Germano Veit Michel
Modified: 2022-03-31 21:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-31 21:17:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
VMI object with two SR-IOV NICs with custom PCI and MAC addresses (4.85 KB, text/plain)
2022-03-28 15:28 UTC, Orel Misan
no flags Details
virt-launcher Pod object (10.38 KB, text/plain)
2022-03-28 15:29 UTC, Orel Misan
no flags Details
virt-launcher log file (1.38 MB, text/plain)
2022-03-28 15:30 UTC, Orel Misan
no flags Details
domain.xml (16.23 KB, text/plain)
2022-03-28 15:31 UTC, Orel Misan
no flags Details
ip link command output from the guest OS (746 bytes, text/plain)
2022-03-28 15:32 UTC, Orel Misan
no flags Details
lshw command output from the guest OS (2.14 KB, text/plain)
2022-03-28 15:33 UTC, Orel Misan
no flags Details
ip link command output from the node (3.37 KB, text/plain)
2022-03-28 15:34 UTC, Orel Misan
no flags Details
VF to PCI mapping from the node (1.82 KB, text/plain)
2022-03-28 15:35 UTC, Orel Misan
no flags Details
SR-IOV CNI output 1 (483 bytes, text/plain)
2022-03-28 15:36 UTC, Orel Misan
no flags Details
SR-IOV CNI output 2 (484 bytes, text/plain)
2022-03-28 15:36 UTC, Orel Misan
no flags Details
NetworkAttachmentDefinition 1 (437 bytes, text/plain)
2022-03-28 15:44 UTC, Orel Misan
no flags Details
NetworkAttachmentDefinition 2 (439 bytes, text/plain)
2022-03-28 15:45 UTC, Orel Misan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6814981 0 None None None 2022-03-15 04:29:51 UTC

Description Germano Veit Michel 2022-03-06 23:56:30 UTC
Description of problem:

If the user specifies a sriov network device like the below, with a pciAddress, it passes validation but the specified pciAddress does not end up in the libvirt xml.

      - macAddress: aa:bb:cc:dd:ee:ff
        name: nic-1
        pciAddress: "0000:XY:00.0"
        sriov: {}

When defining the interface, the converter jumps SR-IOV ones here [1], so it does not get to the part where the guest side address of the VF is set, a few lines below, here [2].

This makes it hard for the user to use Scheme 3 of network interface predictable/persistent naming [3] with SR-IOV devices. Note the above works fine for para-virt devices like virtio-net.

[1] https://github.com/kubevirt/kubevirt/blob/main/pkg/virt-launcher/virtwrap/converter/network.go#L53
[2] https://github.com/kubevirt/kubevirt/blob/main/pkg/virt-launcher/virtwrap/converter/network.go#L78
[3] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/consistent-network-interface-device-naming_configuring-and-managing-networking

How reproducible:
- Still looking for HW to confirm on latest, happens with customer on 4.8.5.

Comment 1 Petr Horáček 2022-03-10 14:09:22 UTC
Thanks for reporting this. The team will be looking into this issue in the next sprint.

Comment 12 Orel Misan 2022-03-28 15:28:49 UTC
Created attachment 1868764 [details]
VMI object with two SR-IOV NICs with custom PCI and MAC addresses

Comment 13 Orel Misan 2022-03-28 15:29:45 UTC
Created attachment 1868766 [details]
virt-launcher Pod object

Comment 14 Orel Misan 2022-03-28 15:30:21 UTC
Created attachment 1868767 [details]
virt-launcher log file

Comment 15 Orel Misan 2022-03-28 15:31:06 UTC
Created attachment 1868768 [details]
domain.xml

Comment 16 Orel Misan 2022-03-28 15:32:17 UTC
Created attachment 1868769 [details]
ip link command output from the guest OS

Comment 17 Orel Misan 2022-03-28 15:33:28 UTC
Created attachment 1868770 [details]
lshw command output from the guest OS

Comment 18 Orel Misan 2022-03-28 15:34:21 UTC
Created attachment 1868771 [details]
ip link command output from the node

Comment 19 Orel Misan 2022-03-28 15:35:09 UTC
Created attachment 1868772 [details]
VF to PCI mapping from the node

Comment 20 Orel Misan 2022-03-28 15:36:02 UTC
Created attachment 1868773 [details]
SR-IOV CNI output 1

Comment 21 Orel Misan 2022-03-28 15:36:45 UTC
Created attachment 1868774 [details]
SR-IOV CNI output 2

Comment 22 Orel Misan 2022-03-28 15:44:36 UTC
Created attachment 1868777 [details]
NetworkAttachmentDefinition 1

Comment 23 Orel Misan 2022-03-28 15:45:04 UTC
Created attachment 1868779 [details]
NetworkAttachmentDefinition 2

Comment 26 Orel Misan 2022-03-30 12:26:48 UTC
There is a bug that masked this bug https://bugzilla.redhat.com/show_bug.cgi?id=2070050

A more accurate description of this bug is: Cannot reliably set multiple SR-IOV NICs with different properties (pciAddress, bootOrder, macAddress or setting from the NetworkAttachmentDefinitions).
The attachments are a recreation of this bug on the latest upstream code.

Comment 27 Germano Veit Michel 2022-03-30 22:32:53 UTC
(In reply to Orel Misan from comment #26)
> There is a bug that masked this bug
> https://bugzilla.redhat.com/show_bug.cgi?id=2070050

But only on 4.9 and 4.10 right, 4.8 can start without duplicate pci addresses, its just all scrambled.

> A more accurate description of this bug is: Cannot reliably set multiple
> SR-IOV NICs with different properties (pciAddress, bootOrder, macAddress or
> setting from the NetworkAttachmentDefinitions).
> The attachments are a recreation of this bug on the latest upstream code.

Are you saying the MAC address with randomly float around the multiple NICs too, not just PCI Address and bootOrder?
Seems to be working for the customer, but could be luck (like Petr mentioned).

I'm uploading the data soon.

Comment 29 Orel Misan 2022-03-31 07:22:32 UTC
Thank you for the information.

> Are you saying the MAC address with randomly float around the multiple NICs too, not just PCI Address and bootOrder?
> Seems to be working for the customer, but could be luck (like Petr mentioned).

At the moment there is an issue to distinguish between multiple SR-IOV NICs that have different properties from one another.
for example if you specify a list of multiple SR-IOV NICs, each with a custom PCI address and a MAC address, it is not guaranteed to be reflected correctly in the domain, and thus in the guest OS.

Comment 30 Orel Misan 2022-03-31 07:32:32 UTC
(In reply to Germano Veit Michel from comment #27)

> But only on 4.9 and 4.10 right, 4.8 can start without duplicate pci addresses, its just all scrambled.

This bug https://bugzilla.redhat.com/show_bug.cgi?id=2070050 is only affecting versions 4.9 4.10.

Comment 31 Germano Veit Michel 2022-03-31 07:47:11 UTC
(In reply to Orel Misan from comment #29)
> At the moment there is an issue to distinguish between multiple SR-IOV NICs
> that have different properties from one another.
> for example if you specify a list of multiple SR-IOV NICs, each with a
> custom PCI address and a MAC address, it is not guaranteed to be reflected
> correctly in the domain, and thus in the guest OS.

Yes, this is exactly what this BZ is about, more specific to the pci address.

Thanks for clarifying everything!

Comment 32 Orel Misan 2022-03-31 08:04:55 UTC
No problem.

Can you please update this bug's description with the new information?
I suggest to also remove the references to the code because they are misleading.

Comment 33 Germano Veit Michel 2022-03-31 21:17:17 UTC
Unfortunately this cannot be done, BZ does not allow to edit comments.

My BZ comment #0 was quite bad start, and then there is a lot of back and forth and noise because of that, plus the extra bug on 4.9 and 4.10.
Let's close this one as other people may get lost too, I'll open a new one with a proper problem description and we continue from there.

Will also have to KCS the child BZ from this (4.9/4.10 closure).

*** This bug has been marked as a duplicate of bug 2070772 ***


Note You need to log in before you can comment on or make changes to this bug.