[libvirt] [PATCH 0/3] Properly deal with multiple netdevs per PCI device when converting VF <-> PF

Laine Stump posted 3 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170804033644.4923-1-laine@laine.org
src/libvirt_private.syms |  1 +
src/util/virhostdev.c    |  2 +-
src/util/virnetdev.c     | 84 +++++++++++++++++++++++++++++++++++++++++++++---
src/util/virnetdev.h     |  5 +++
src/util/virpci.c        | 49 ++++++++++++++++++++++------
src/util/virpci.h        |  4 ++-
6 files changed, 129 insertions(+), 16 deletions(-)
[libvirt] [PATCH 0/3] Properly deal with multiple netdevs per PCI device when converting VF <-> PF
Posted by Laine Stump 6 years, 8 months ago
The commit log of Patch 1 explains the majority of the reason for
these patches. In short, they disambiguate the multiple netdevs per
PCI device on the SRIOV PF and VFs of a Mellanox dual port NIC *when
converting from a VF netdev to a PF netdev and vice versa*. This
permits us to set the vlan tag and MAC address for the correct VF
netdev (and detect the online status of the correct PF netdev for that
VF) when using a VF in macvtap passthrough mode. (in other words, with
these patches in place, it is possible to use *all* the VF netdevs on
both ports of a dual port mellanox NIC for macvtap passthrough.)

These patches *do not* solve the problem of saving/setting the mac
address/vlan tag for both ports when using a dual port VF for PCI
device assignment with VFIO (see my RFC email from yesterday). That is
a much more complex problem. (These patches are a prerequisite to
anything that might come out of that RFC though).

Laine Stump (3):
  util: new function virNetDevGetPhysPortID()
  util: support matching a phys_port_id in virPCIGetNetName()
  util: match phys_port_id when converting PF-netdev to/from VF-netdev

 src/libvirt_private.syms |  1 +
 src/util/virhostdev.c    |  2 +-
 src/util/virnetdev.c     | 84 +++++++++++++++++++++++++++++++++++++++++++++---
 src/util/virnetdev.h     |  5 +++
 src/util/virpci.c        | 49 ++++++++++++++++++++++------
 src/util/virpci.h        |  4 ++-
 6 files changed, 129 insertions(+), 16 deletions(-)

-- 
2.13.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/3] Properly deal with multiple netdevs per PCI device when converting VF <-> PF
Posted by Michal Privoznik 6 years, 8 months ago
On 08/04/2017 05:36 AM, Laine Stump wrote:
> The commit log of Patch 1 explains the majority of the reason for
> these patches. In short, they disambiguate the multiple netdevs per
> PCI device on the SRIOV PF and VFs of a Mellanox dual port NIC *when
> converting from a VF netdev to a PF netdev and vice versa*. This
> permits us to set the vlan tag and MAC address for the correct VF
> netdev (and detect the online status of the correct PF netdev for that
> VF) when using a VF in macvtap passthrough mode. (in other words, with
> these patches in place, it is possible to use *all* the VF netdevs on
> both ports of a dual port mellanox NIC for macvtap passthrough.)
> 
> These patches *do not* solve the problem of saving/setting the mac
> address/vlan tag for both ports when using a dual port VF for PCI
> device assignment with VFIO (see my RFC email from yesterday). That is
> a much more complex problem. (These patches are a prerequisite to
> anything that might come out of that RFC though).
> 
> Laine Stump (3):
>   util: new function virNetDevGetPhysPortID()
>   util: support matching a phys_port_id in virPCIGetNetName()
>   util: match phys_port_id when converting PF-netdev to/from VF-netdev
> 
>  src/libvirt_private.syms |  1 +
>  src/util/virhostdev.c    |  2 +-
>  src/util/virnetdev.c     | 84 +++++++++++++++++++++++++++++++++++++++++++++---
>  src/util/virnetdev.h     |  5 +++
>  src/util/virpci.c        | 49 ++++++++++++++++++++++------
>  src/util/virpci.h        |  4 ++-
>  6 files changed, 129 insertions(+), 16 deletions(-)
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list