Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543547

RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial numbers

From Haiyang Zhang <haiyangz@microsoft.com>
Newsgroups linux.kernel
Subject RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial numbers
Date 2016-12-16 17:00 +0100
Message-ID <sP35n-5AA-7@gated-at.bofh.it> (permalink)
References (8 earlier) <sMOWR-2d6-9@gated-at.bofh.it> <sOr9M-6Gb-5@gated-at.bofh.it> <sOr9M-6Gb-3@gated-at.bofh.it> <sOrCO-6Q9-27@gated-at.bofh.it> <sOPlM-4TI-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> -----Original Message-----
> From: KY Srinivasan
> Sent: Thursday, December 15, 2016 8:11 PM
> To: Stephen Hemminger <stephen@networkplumber.org>; Greg KH
> <gregkh@linuxfoundation.org>
> Cc: olaf@aepfle.de; jasowang@redhat.com; linux-kernel@vger.kernel.org;
> bjorn.helgaas@gmail.com; apw@canonical.com; devel@linuxdriverproject.org;
> leann.ogasawara@canonical.com; Haiyang Zhang <haiyangz@microsoft.com>
> Subject: RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on
> serial numbers
> 
> 
> 
> > -----Original Message-----
> > From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On
> > Behalf Of Stephen Hemminger
> > Sent: Wednesday, December 14, 2016 3:52 PM
> > To: Greg KH <gregkh@linuxfoundation.org>
> > Cc: olaf@aepfle.de; jasowang@redhat.com; linux-kernel@vger.kernel.org;
> > bjorn.helgaas@gmail.com; apw@canonical.com;
> > devel@linuxdriverproject.org; leann.ogasawara@canonical.com; Haiyang
> > Zhang <haiyangz@microsoft.com>
> > Subject: Re: [PATCH 3/3] hv_netvsc: Implement VF matching based on
> serial
> > numbers
> >
> > Normally, that would work but in this case we have one driver (netvsc)
> > which is managing another driver which is unaware of Hyper-V or netvsc
> > drivers existence.  The callback is happening in netvsc driver and it
> > needs to say "hey I know that SR-IOV device, it is associated with my
> > network device". This problem is how to know that N is associated with
> > V? The V device has to be a network device, that is easy. But then it
> > also has to be a PCI device, not to bad. But then the netvsc code
> > is matching based on hyper-V only PCI bus metadata (the serial #).
> >
> > The Microsoft developers made the rational decision not to go
> modifying
> > all the possible SR-IOV network devices from Intel and Mellanox to add
> > the functionality there. That would have been much worse.
> >
> > Maybe, rather than trying to do the management in the kernel it
> > could have been done better in user space. Unfortunately, this would
> > only move the problem.  The PCI-hyperv host driver could expose serial
> > value through sysfs (with some pain). But the problem would be how
> > to make a new API to  join the two V and N device.  Doing a private
> > ioctl is worse than the notifier.
> 
> All this has been discussed earlier in the thread. I think I have a
> solution
> to the problem:
> The only PCI (non-VF) NIC that may be present in the VM is the emulated
> NIC and
> we know exactly the device ID and vendor ID of this NIC. Furthermore,
> as a platform we are not going to be emulating additional NICs. So,
> if the PCI NIC is not the emulated NIC, it must be a VF and we can
> extract the
> serial number.

How about direct pass-through NIC devices. Do they have vPCI serial number?
And, the numbers should be different from VF NIC?

Thanks,
- Haiyang

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers Greg KH <gregkh@linuxfoundation.org> - 2016-12-15 00:30 +0100
  Re: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers Stephen Hemminger <stephen@networkplumber.org> - 2016-12-15 01:00 +0100
    RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers KY Srinivasan <kys@microsoft.com> - 2016-12-16 02:20 +0100
      RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers Haiyang Zhang <haiyangz@microsoft.com> - 2016-12-16 17:00 +0100
        RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers KY Srinivasan <kys@microsoft.com> - 2016-12-16 20:00 +0100
    Re: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial  numbers Greg KH <gregkh@linuxfoundation.org> - 2016-12-16 17:50 +0100

csiph-web