[libvirt PATCH v2 0/2] Fix failure to find VF netdev names during virtual network start

Laine Stump posted 2 patches 2 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20211205225410.6822-1-laine@redhat.com
src/util/virnetdev.c | 24 +++-----------------
src/util/virpci.c    | 52 ++++++++++++++++++++++++++------------------
src/util/virpci.h    |  4 ++--
3 files changed, 36 insertions(+), 44 deletions(-)
[libvirt PATCH v2 0/2] Fix failure to find VF netdev names during virtual network start
Posted by Laine Stump 2 years, 4 months ago
The first patch resolves https://bugzilla.redhat.com/2025432, the 2nd
simplifies lower level code in the same manner.

V1 is here: https://listman.redhat.com/archives/libvir-list/2021-December/msg00000.html

Change in V2: Rather than adding an extra bool to the arglist of
virPCIGetVirtualFunctionsFull() (what I did in V1), just switch to
sending the name of the netdev whose phys_port_id we want to match
(called physPortNetDevName) (which will always be non-NULL in the
cases where we want) rather than the phys_port_id itself (physPortID)
(which may or may not be NULL). This way we don't need an extra arg
(we can just check for physPortNetDevName != NULL), and the lower
level function can call virNetDevGetPhysPortID() as needed.

Also added a similar 2nd patch that pushes the call to
virNetDevGetPhysPortID() down even further, into
virPCIGetNetName(). This simplifies the callers, and concentrates all
calls to virNetDevGetPhysPortID() into a single function
(virPCIGetNetName(), duh).

Laine Stump (2):
  util: fix erroneous requirement for phys_port_id to get ifname of a VF
  util: call virNetDevGetPhysPortID() in less places

 src/util/virnetdev.c | 24 +++-----------------
 src/util/virpci.c    | 52 ++++++++++++++++++++++++++------------------
 src/util/virpci.h    |  4 ++--
 3 files changed, 36 insertions(+), 44 deletions(-)

-- 
2.33.1


Re: [libvirt PATCH v2 0/2] Fix failure to find VF netdev names during virtual network start
Posted by Michal Prívozník 2 years, 4 months ago
On 12/5/21 23:54, Laine Stump wrote:
> The first patch resolves https://bugzilla.redhat.com/2025432, the 2nd
> simplifies lower level code in the same manner.
> 
> V1 is here: https://listman.redhat.com/archives/libvir-list/2021-December/msg00000.html
> 
> Change in V2: Rather than adding an extra bool to the arglist of
> virPCIGetVirtualFunctionsFull() (what I did in V1), just switch to
> sending the name of the netdev whose phys_port_id we want to match
> (called physPortNetDevName) (which will always be non-NULL in the
> cases where we want) rather than the phys_port_id itself (physPortID)
> (which may or may not be NULL). This way we don't need an extra arg
> (we can just check for physPortNetDevName != NULL), and the lower
> level function can call virNetDevGetPhysPortID() as needed.
> 
> Also added a similar 2nd patch that pushes the call to
> virNetDevGetPhysPortID() down even further, into
> virPCIGetNetName(). This simplifies the callers, and concentrates all
> calls to virNetDevGetPhysPortID() into a single function
> (virPCIGetNetName(), duh).
> 
> Laine Stump (2):
>   util: fix erroneous requirement for phys_port_id to get ifname of a VF
>   util: call virNetDevGetPhysPortID() in less places
> 
>  src/util/virnetdev.c | 24 +++-----------------
>  src/util/virpci.c    | 52 ++++++++++++++++++++++++++------------------
>  src/util/virpci.h    |  4 ++--
>  3 files changed, 36 insertions(+), 44 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal