Skip to content

hv_netvsc: associate VF and PV device by serial number

Stephen Hemminger linux-pci netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 4 repliesIn review
  2. v12 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PCI: hv: support reporting serial number as slot informationdrivers/pci/controller/pci-hyperv.c+37 -00 replies
2/2hv_netvsc: pair VF based on serial numberdrivers/net/hyperv/netvsc.c drivers/net/hyperv/netvsc_drv.c+36 -251 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] hv_netvsc: associate VF and PV device by serial number

The Hyper-V implementation of PCI controller has concept of 32 bit serial number (not to be confused with PCI-E serial number). This value is sent in the protocol from the host to indicate SR-IOV VF device is attached to a synthetic NIC.

Using the serial number (instead of MAC address) to associate the two devices avoids lots of potential problems when there are duplicate MAC addresses from tunnels or layered devices.

The patch set is broken into two parts, one is for the PCI controller and the other is for the netvsc device. Normally, these go through different trees but sending them together here for better review. The PCI changes were submitted previously, but the main review comment was "why do you need this?". This is why.

v2 - slot name can be shorter.
remove locking when creating pci_slots; see comment for explaination

Stephen Hemminger (2):
PCI: hv: support reporting serial number as slot information
hv_netvsc: pair VF based on serial number

 drivers/net/hyperv/netvsc.c         |  3 ++
 drivers/net/hyperv/netvsc_drv.c     | 58 ++++++++++++++++-------------
 drivers/pci/controller/pci-hyperv.c | 37 ++++++++++++++++++
 3 files changed, 73 insertions(+), 25 deletions(-)
Signature · 1 line
2.18.0