From: Haiyang Zhang <haiyangz@microsoft.com>
To: KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <stephen@networkplumber.org>,
Greg KH <gregkh@linuxfoundation.org>
Cc: "olaf@aepfle.de" <olaf@aepfle.de>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bjorn.helgaas@gmail.com" <bjorn.helgaas@gmail.com>,
"apw@canonical.com" <apw@canonical.com>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"leann.ogasawara@canonical.com" <leann.ogasawara@canonical.com>
Subject: RE: [PATCH 3/3] hv_netvsc: Implement VF matching based on serial numbers
Date: Fri, 16 Dec 2016 15:20:30 +0000 [thread overview]
Message-ID: <BLUPR03MB14124A002C8FA527DE7E5A9BCA9C0@BLUPR03MB1412.namprd03.prod.outlook.com> (raw)
In-Reply-To: <DM5PR03MB2490150F68D47BA025335DA2A09C0@DM5PR03MB2490.namprd03.prod.outlook.com>
> -----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
next prev parent reply other threads:[~2016-12-16 15:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 8:33 [PATCH 0/3] Drivers: hv: Implement VF association based on serial number kys
2016-12-08 8:33 ` [PATCH 1/3] hyperv: Move hv_pci_dev and related structs to hyperv.h kys
2016-12-08 8:33 ` [PATCH 2/3] hyperv: Add a function to detect if the device is a vmbus dev kys
2016-12-08 8:33 ` [PATCH 3/3] hv_netvsc: Implement VF matching based on serial numbers kys
2016-12-08 15:56 ` Greg KH
2016-12-09 0:05 ` KY Srinivasan
2016-12-09 7:31 ` Greg KH
2016-12-09 18:20 ` Stephen Hemminger
2016-12-09 20:09 ` Haiyang Zhang
2016-12-09 20:29 ` Stephen Hemminger
2016-12-09 21:31 ` Haiyang Zhang
2016-12-09 21:45 ` Stephen Hemminger
2016-12-09 21:53 ` Haiyang Zhang
2016-12-09 22:05 ` Stephen Hemminger
2016-12-09 22:35 ` Haiyang Zhang
2016-12-10 0:21 ` Stephen Hemminger
2016-12-10 12:20 ` Greg KH
2016-12-14 23:18 ` Haiyang Zhang
2016-12-14 23:27 ` Greg KH
2016-12-14 23:51 ` Stephen Hemminger
2016-12-16 1:11 ` KY Srinivasan
2016-12-16 15:20 ` Haiyang Zhang [this message]
2016-12-16 18:39 ` KY Srinivasan
2016-12-16 16:45 ` Greg KH
2016-12-08 9:49 ` [PATCH 1/3] hyperv: Move hv_pci_dev and related structs to hyperv.h kbuild test robot
2016-12-08 15:26 ` KY Srinivasan
2016-12-08 15:56 ` gregkh
2016-12-08 16:54 ` KY Srinivasan
2016-12-08 11:15 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BLUPR03MB14124A002C8FA527DE7E5A9BCA9C0@BLUPR03MB1412.namprd03.prod.outlook.com \
--to=haiyangz@microsoft.com \
--cc=apw@canonical.com \
--cc=bjorn.helgaas@gmail.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=leann.ogasawara@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).