commit 1fe2aca0230e2702dab362fc3bec8e848f8baa20
Author: Antonio Augusto Vilas Boas Teixeira <email address hidden>
Date: Thu May 19 17:30:11 2022 -0400
Fix mellanox device detection on vf interfaces
The is_a_mellanox_device() method would not correctly identify a VF type
interface as a Mellanox as it only checked the primary interface,
without checking the lower interfaces the primary one used.
This change fixes this. Now VF type interfaces will be checked
recursively until the interface tied to the actual device ports is
located.
TESTS:
- Installed on a host using a Mellanox CX5 card
- Set the interface using a port of the CX5 to pci-sriov class
- Created a vf type interface using the previously mentioned pci-sriov
- Created two datanetworks and assigned each interface to one
- Confirmed that the 'isRdma' flag is now correctly appended to the
datanetwork resources in /etc/pcidp/config.json both for the pci-sriov
interface as well as the vf interface
- The same steps were reproduced in an Intel X710 NIC to validate that
the is_a_mellanox_device() method is not yielding false positives. The
isRdma flag was not appended for this, as expected
Closes-Bug: 1973361
Signed-off-by: Antonio Augusto Vilas Boas Teixeira
<email address hidden>
Change-Id: I232d4e7fa62b8f4200328edf66f81bbb996966d0
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/842637 /opendev. org/starlingx/ config/ commit/ 1fe2aca0230e270 2dab362fc3bec8e 848f8baa20
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 1fe2aca0230e270 2dab362fc3bec8e 848f8baa20
Author: Antonio Augusto Vilas Boas Teixeira <email address hidden>
Date: Thu May 19 17:30:11 2022 -0400
Fix mellanox device detection on vf interfaces
The is_a_mellanox_ device( ) method would not correctly identify a VF type
interface as a Mellanox as it only checked the primary interface,
without checking the lower interfaces the primary one used.
This change fixes this. Now VF type interfaces will be checked
recursively until the interface tied to the actual device ports is
located.
TESTS: config. json both for the pci-sriov device( ) method is not yielding false positives. The
- Installed on a host using a Mellanox CX5 card
- Set the interface using a port of the CX5 to pci-sriov class
- Created a vf type interface using the previously mentioned pci-sriov
- Created two datanetworks and assigned each interface to one
- Confirmed that the 'isRdma' flag is now correctly appended to the
datanetwork resources in /etc/pcidp/
interface as well as the vf interface
- The same steps were reproduced in an Intel X710 NIC to validate that
the is_a_mellanox_
isRdma flag was not appended for this, as expected
Closes-Bug: 1973361
Signed-off-by: Antonio Augusto Vilas Boas Teixeira 4200328edf66f81 bbb996966d0
<email address hidden>
Change-Id: I232d4e7fa62b8f