Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1534200 > unrolled thread
| Started by | kys@exchange.microsoft.com |
|---|---|
| First post | 2016-12-01 16:40 +0100 |
| Last post | 2016-12-02 22:50 +0100 |
| Articles | 12 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 02/15] hyperv: Add a function to detect hv_device kys@exchange.microsoft.com - 2016-12-01 16:40 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-01 21:40 +0100
RE: [PATCH 02/15] hyperv: Add a function to detect hv_device KY Srinivasan <kys@microsoft.com> - 2016-12-02 06:50 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-01 21:40 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-01 21:50 +0100
RE: [PATCH 02/15] hyperv: Add a function to detect hv_device KY Srinivasan <kys@microsoft.com> - 2016-12-02 07:10 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-02 07:50 +0100
RE: [PATCH 02/15] hyperv: Add a function to detect hv_device KY Srinivasan <kys@microsoft.com> - 2016-12-02 08:20 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-02 08:40 +0100
RE: [PATCH 02/15] hyperv: Add a function to detect hv_device KY Srinivasan <kys@microsoft.com> - 2016-12-02 16:50 +0100
Re: [PATCH 02/15] hyperv: Add a function to detect hv_device Greg KH <gregkh@linuxfoundation.org> - 2016-12-02 17:10 +0100
RE: [PATCH 02/15] hyperv: Add a function to detect hv_device KY Srinivasan <kys@microsoft.com> - 2016-12-02 22:50 +0100
| From | kys@exchange.microsoft.com |
|---|---|
| Date | 2016-12-01 16:40 +0100 |
| Subject | [PATCH 02/15] hyperv: Add a function to detect hv_device |
| Message-ID | <sJBCO-5Lz-15@gated-at.bofh.it> |
From: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/hv/vmbus_drv.c | 6 ++++++
include/linux/hyperv.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 0276d2e..1730ac0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -692,6 +692,12 @@ struct onmessage_work_context {
struct hv_message msg;
};
+bool device_is_hyperv(struct device *dev)
+{
+ return dev->release == vmbus_device_release;
+}
+EXPORT_SYMBOL_GPL(device_is_hyperv);
+
static void vmbus_onmessage_work(struct work_struct *work)
{
struct onmessage_work_context *ctx;
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 2a52d9a..fdd541c 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -946,6 +946,8 @@ static inline void clear_low_latency_mode(struct vmbus_channel *c)
c->low_latency = false;
}
+bool device_is_hyperv(struct device *dev);
+
void vmbus_onmessage(void *context);
int vmbus_request_offers(void);
--
1.7.4.1
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-01 21:40 +0100 |
| Message-ID | <sJGj7-1KM-1@gated-at.bofh.it> |
| In reply to | #1534200 |
On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com wrote: > From: Haiyang Zhang <haiyangz@microsoft.com> > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> > --- > drivers/hv/vmbus_drv.c | 6 ++++++ > include/linux/hyperv.h | 2 ++ > 2 files changed, 8 insertions(+), 0 deletions(-) I can't, and you shouldn't, take patches with no changelog comments at all. sorry. greg k-h
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2016-12-02 06:50 +0100 |
| Message-ID | <sJOTn-7Mw-1@gated-at.bofh.it> |
| In reply to | #1534423 |
> -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Thursday, December 1, 2016 12:34 PM > To: KY Srinivasan <kys@microsoft.com> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com; > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang > <haiyangz@microsoft.com> > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device > > On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com > wrote: > > From: Haiyang Zhang <haiyangz@microsoft.com> > > > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> > > --- > > drivers/hv/vmbus_drv.c | 6 ++++++ > > include/linux/hyperv.h | 2 ++ > > 2 files changed, 8 insertions(+), 0 deletions(-) > > I can't, and you shouldn't, take patches with no changelog comments at > all. > > sorry. Sorry about this; this will be fixed. K. Y > > greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-01 21:40 +0100 |
| Message-ID | <sJGj8-1KM-27@gated-at.bofh.it> |
| In reply to | #1534200 |
On Thu, Dec 01, 2016 at 09:35:47PM +0100, Greg KH wrote:
> On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com wrote:
> > From: Haiyang Zhang <haiyangz@microsoft.com>
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > ---
> > drivers/hv/vmbus_drv.c | 6 ++++++
> > include/linux/hyperv.h | 2 ++
> > 2 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 0276d2e..1730ac0 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -692,6 +692,12 @@ struct onmessage_work_context {
> > struct hv_message msg;
> > };
> >
> > +bool device_is_hyperv(struct device *dev)
> > +{
> > + return dev->release == vmbus_device_release;
> > +}
> > +EXPORT_SYMBOL_GPL(device_is_hyperv);
>
> Wait, eek, no! That's NOT how you determine a device type, if you
> really even ever need to do that.
>
> Why are you needing this? You should always "just know" what type of
> device a struct device * is, that's what we rely on in the driver model.
> Otherwise things get messy very very quickly.
>
> Sorry, I can't take this without a ton of justification, and even then,
> you need to do this correctly (and no, I'm not going to tell you how to
> do that as I don't like it being done...)
And, to make this even worse, you never use this function in this
series, making this something that no one even needs!!!
ugh.
I'm dropping this whole series, sorry, get it together, this was a
mess...
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-01 21:50 +0100 |
| Message-ID | <sJGj8-1KM-29@gated-at.bofh.it> |
| In reply to | #1534200 |
On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> ---
> drivers/hv/vmbus_drv.c | 6 ++++++
> include/linux/hyperv.h | 2 ++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 0276d2e..1730ac0 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -692,6 +692,12 @@ struct onmessage_work_context {
> struct hv_message msg;
> };
>
> +bool device_is_hyperv(struct device *dev)
> +{
> + return dev->release == vmbus_device_release;
> +}
> +EXPORT_SYMBOL_GPL(device_is_hyperv);
Wait, eek, no! That's NOT how you determine a device type, if you
really even ever need to do that.
Why are you needing this? You should always "just know" what type of
device a struct device * is, that's what we rely on in the driver model.
Otherwise things get messy very very quickly.
Sorry, I can't take this without a ton of justification, and even then,
you need to do this correctly (and no, I'm not going to tell you how to
do that as I don't like it being done...)
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2016-12-02 07:10 +0100 |
| Message-ID | <sJPcJ-8fP-1@gated-at.bofh.it> |
| In reply to | #1534432 |
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Thursday, December 1, 2016 12:36 PM
> To: KY Srinivasan <kys@microsoft.com>
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com;
> jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang
> <haiyangz@microsoft.com>
> Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device
>
> On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com
> wrote:
> > From: Haiyang Zhang <haiyangz@microsoft.com>
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > ---
> > drivers/hv/vmbus_drv.c | 6 ++++++
> > include/linux/hyperv.h | 2 ++
> > 2 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 0276d2e..1730ac0 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -692,6 +692,12 @@ struct onmessage_work_context {
> > struct hv_message msg;
> > };
> >
> > +bool device_is_hyperv(struct device *dev)
> > +{
> > + return dev->release == vmbus_device_release;
> > +}
> > +EXPORT_SYMBOL_GPL(device_is_hyperv);
>
> Wait, eek, no! That's NOT how you determine a device type, if you
> really even ever need to do that.
>
> Why are you needing this? You should always "just know" what type of
> device a struct device * is, that's what we rely on in the driver model.
> Otherwise things get messy very very quickly.
>
> Sorry, I can't take this without a ton of justification, and even then,
> you need to do this correctly (and no, I'm not going to tell you how to
> do that as I don't like it being done...)
>
Greg,
To support SR-IOV, netvsc registers for all netdev events. For netdev events related to the
VF interface, we need to do some special processing. And so, we need to determine
if the device that is generating the netdev event is Hyper-V device or not
(passed through the PCI pass through driver). Is this justification sufficient.
As you have observed, currently there is no user of this API and that is because netvsc
will be the user. To avoid cross-tree dependency, we wanted to get this functionality in first
before submitting the netvsc patch.
Regards,
K. Y
> greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-02 07:50 +0100 |
| Message-ID | <sJPPr-8sV-5@gated-at.bofh.it> |
| In reply to | #1534682 |
On Fri, Dec 02, 2016 at 06:02:29AM +0000, KY Srinivasan wrote:
>
>
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Thursday, December 1, 2016 12:36 PM
> > To: KY Srinivasan <kys@microsoft.com>
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com;
> > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang
> > <haiyangz@microsoft.com>
> > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device
Ugh, please fix your email client...
> >
> > On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com
> > wrote:
> > > From: Haiyang Zhang <haiyangz@microsoft.com>
> > >
> > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > ---
> > > drivers/hv/vmbus_drv.c | 6 ++++++
> > > include/linux/hyperv.h | 2 ++
> > > 2 files changed, 8 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > > index 0276d2e..1730ac0 100644
> > > --- a/drivers/hv/vmbus_drv.c
> > > +++ b/drivers/hv/vmbus_drv.c
> > > @@ -692,6 +692,12 @@ struct onmessage_work_context {
> > > struct hv_message msg;
> > > };
> > >
> > > +bool device_is_hyperv(struct device *dev)
> > > +{
> > > + return dev->release == vmbus_device_release;
> > > +}
> > > +EXPORT_SYMBOL_GPL(device_is_hyperv);
> >
> > Wait, eek, no! That's NOT how you determine a device type, if you
> > really even ever need to do that.
> >
> > Why are you needing this? You should always "just know" what type of
> > device a struct device * is, that's what we rely on in the driver model.
> > Otherwise things get messy very very quickly.
> >
> > Sorry, I can't take this without a ton of justification, and even then,
> > you need to do this correctly (and no, I'm not going to tell you how to
> > do that as I don't like it being done...)
> >
> Greg,
>
> To support SR-IOV, netvsc registers for all netdev events. For netdev events related to the
> VF interface, we need to do some special processing. And so, we need to determine
> if the device that is generating the netdev event is Hyper-V device or not
> (passed through the PCI pass through driver). Is this justification sufficient.
> As you have observed, currently there is no user of this API and that is because netvsc
> will be the user. To avoid cross-tree dependency, we wanted to get this functionality in first
> before submitting the netvsc patch.
See, you do have some text for a changelog!
{grumble...}
No, I don't think this is a good justification, where are you going to
put this "check" into the networking stack? Your driver should only be
binding to devices of this "type" anyway, so by that logic, it already
"knows" that the device is of this type.
In other words, why do you need this and PCI or USB doesn't? Why is
hyperv "special"?
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2016-12-02 08:20 +0100 |
| Message-ID | <sJQit-uF-27@gated-at.bofh.it> |
| In reply to | #1534695 |
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Thursday, December 1, 2016 10:48 PM
> To: KY Srinivasan <kys@microsoft.com>
> Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com;
> jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang
> <haiyangz@microsoft.com>
> Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device
>
> On Fri, Dec 02, 2016 at 06:02:29AM +0000, KY Srinivasan wrote:
> >
> >
> > > -----Original Message-----
> > > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > > Sent: Thursday, December 1, 2016 12:36 PM
> > > To: KY Srinivasan <kys@microsoft.com>
> > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> > > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com;
> > > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang
> > > <haiyangz@microsoft.com>
> > > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device
>
> Ugh, please fix your email client...
>
> > >
> > > On Thu, Dec 01, 2016 at 09:28:39AM -0800, kys@exchange.microsoft.com
> > > wrote:
> > > > From: Haiyang Zhang <haiyangz@microsoft.com>
> > > >
> > > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> > > > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> > > > ---
> > > > drivers/hv/vmbus_drv.c | 6 ++++++
> > > > include/linux/hyperv.h | 2 ++
> > > > 2 files changed, 8 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > > > index 0276d2e..1730ac0 100644
> > > > --- a/drivers/hv/vmbus_drv.c
> > > > +++ b/drivers/hv/vmbus_drv.c
> > > > @@ -692,6 +692,12 @@ struct onmessage_work_context {
> > > > struct hv_message msg;
> > > > };
> > > >
> > > > +bool device_is_hyperv(struct device *dev)
> > > > +{
> > > > + return dev->release == vmbus_device_release;
> > > > +}
> > > > +EXPORT_SYMBOL_GPL(device_is_hyperv);
> > >
> > > Wait, eek, no! That's NOT how you determine a device type, if you
> > > really even ever need to do that.
> > >
> > > Why are you needing this? You should always "just know" what type of
> > > device a struct device * is, that's what we rely on in the driver model.
> > > Otherwise things get messy very very quickly.
> > >
> > > Sorry, I can't take this without a ton of justification, and even then,
> > > you need to do this correctly (and no, I'm not going to tell you how to
> > > do that as I don't like it being done...)
> > >
> > Greg,
> >
> > To support SR-IOV, netvsc registers for all netdev events. For netdev
> events related to the
> > VF interface, we need to do some special processing. And so, we need to
> determine
> > if the device that is generating the netdev event is Hyper-V device or not
> > (passed through the PCI pass through driver). Is this justification sufficient.
> > As you have observed, currently there is no user of this API and that is
> because netvsc
> > will be the user. To avoid cross-tree dependency, we wanted to get this
> functionality in first
> > before submitting the netvsc patch.
>
> See, you do have some text for a changelog!
>
> {grumble...}
>
> No, I don't think this is a good justification, where are you going to
> put this "check" into the networking stack? Your driver should only be
> binding to devices of this "type" anyway, so by that logic, it already
> "knows" that the device is of this type.
>
> In other words, why do you need this and PCI or USB doesn't? Why is
> hyperv "special"?
On Hyper-V, each VF interface (SR-IOV interface)
is paired with an instance of the
synthetic interface that is managed by netvsc.
When the VF interface comes up, we
need to associate the VF instance with
the corresponding netvsc instance. To do this
without modifying the VF drivers, netvsc registers
for netdev events. In the netdev
event handler (in netvsc) currently I am
doing the association based on the MAC
address - this code is currently committed
upstream (see drivers/net/hyperv/netvsc_drv.c
netvsc_register_vf()). Going forward, we want to
base this association based on a sequence
number that the host publishes both for the
VF as well as the corresponding
synthetic (netvsc) instance.
You are right, netvsc already knows that the
devices it is managing belong to vmbus.
Since we are registering for netdev events,
we will get notified for devices that may not
be vmbus devices and that is where this new
API will be used. If the device is a vmbus device
we can extract the sequence number to implement the match.
Regards,
K. Y
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-02 08:40 +0100 |
| Message-ID | <sJQBP-Bh-5@gated-at.bofh.it> |
| In reply to | #1534710 |
On Fri, Dec 02, 2016 at 07:14:03AM +0000, KY Srinivasan wrote: > > In other words, why do you need this and PCI or USB doesn't? Why is > > hyperv "special"? > > On Hyper-V, each VF interface (SR-IOV interface) > is paired with an instance of the > synthetic interface that is managed by netvsc. > When the VF interface comes up, we > need to associate the VF instance with > the corresponding netvsc instance. To do this > without modifying the VF drivers, netvsc registers > for netdev events. Why not modify the VF drivers? You have the full source to them...
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2016-12-02 16:50 +0100 |
| Message-ID | <sJYg2-5Hd-17@gated-at.bofh.it> |
| In reply to | #1534715 |
> -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Thursday, December 1, 2016 11:36 PM > To: KY Srinivasan <kys@microsoft.com> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com; > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang > <haiyangz@microsoft.com> > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device > > On Fri, Dec 02, 2016 at 07:14:03AM +0000, KY Srinivasan wrote: > > > In other words, why do you need this and PCI or USB doesn't? Why is > > > hyperv "special"? > > > > On Hyper-V, each VF interface (SR-IOV interface) > > is paired with an instance of the > > synthetic interface that is managed by netvsc. > > When the VF interface comes up, we > > need to associate the VF instance with > > the corresponding netvsc instance. To do this > > without modifying the VF drivers, netvsc registers > > for netdev events. > > Why not modify the VF drivers? You have the full source to them... Greg, This is even worse. On Linux, VF drivers are hypervisor agnostic and I want to keep it that way. Regards, K. Y
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-12-02 17:10 +0100 |
| Message-ID | <sJYzo-64D-45@gated-at.bofh.it> |
| In reply to | #1535038 |
On Fri, Dec 02, 2016 at 03:38:51PM +0000, KY Srinivasan wrote: > > > > -----Original Message----- > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > Sent: Thursday, December 1, 2016 11:36 PM > > To: KY Srinivasan <kys@microsoft.com> > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; > > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com; > > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang > > <haiyangz@microsoft.com> > > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device > > > > On Fri, Dec 02, 2016 at 07:14:03AM +0000, KY Srinivasan wrote: > > > > In other words, why do you need this and PCI or USB doesn't? Why is > > > > hyperv "special"? > > > > > > On Hyper-V, each VF interface (SR-IOV interface) > > > is paired with an instance of the > > > synthetic interface that is managed by netvsc. > > > When the VF interface comes up, we > > > need to associate the VF instance with > > > the corresponding netvsc instance. To do this > > > without modifying the VF drivers, netvsc registers > > > for netdev events. > > > > Why not modify the VF drivers? You have the full source to them... > Greg, > > This is even worse. On Linux, VF drivers are hypervisor agnostic > and I want to keep it that way. Ok, I really don't know what to suggest, other than this is probably not the way to do this as no other bus has to. As I don't see the code that actually uses this anywhere, it's really impossible to have this conversation at all :( greg k-h
[toc] | [prev] | [next] | [standalone]
| From | KY Srinivasan <kys@microsoft.com> |
|---|---|
| Date | 2016-12-02 22:50 +0100 |
| Message-ID | <sK3Sp-Mw-1@gated-at.bofh.it> |
| In reply to | #1535051 |
> -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Friday, December 2, 2016 8:03 AM > To: KY Srinivasan <kys@microsoft.com> > Cc: olaf@aepfle.de; jasowang@redhat.com; Haiyang Zhang > <haiyangz@microsoft.com>; linux-kernel@vger.kernel.org; > apw@canonical.com; devel@linuxdriverproject.org; > leann.ogasawara@canonical.com > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device > > On Fri, Dec 02, 2016 at 03:38:51PM +0000, KY Srinivasan wrote: > > > > > > > -----Original Message----- > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > Sent: Thursday, December 1, 2016 11:36 PM > > > To: KY Srinivasan <kys@microsoft.com> > > > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; > > > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com; > > > jasowang@redhat.com; leann.ogasawara@canonical.com; Haiyang Zhang > > > <haiyangz@microsoft.com> > > > Subject: Re: [PATCH 02/15] hyperv: Add a function to detect hv_device > > > > > > On Fri, Dec 02, 2016 at 07:14:03AM +0000, KY Srinivasan wrote: > > > > > In other words, why do you need this and PCI or USB doesn't? Why is > > > > > hyperv "special"? > > > > > > > > On Hyper-V, each VF interface (SR-IOV interface) > > > > is paired with an instance of the > > > > synthetic interface that is managed by netvsc. > > > > When the VF interface comes up, we > > > > need to associate the VF instance with > > > > the corresponding netvsc instance. To do this > > > > without modifying the VF drivers, netvsc registers > > > > for netdev events. > > > > > > Why not modify the VF drivers? You have the full source to them... > > Greg, > > > > This is even worse. On Linux, VF drivers are hypervisor agnostic > > and I want to keep it that way. > > Ok, I really don't know what to suggest, other than this is probably not > the way to do this as no other bus has to. As I don't see the code that > actually uses this anywhere, it's really impossible to have this > conversation at all :( I agree it is difficult to discuss this without having the code that uses this. That said, there is currently code in the tree that disambiguates the netdev events that netvsc sees - look at the function get_netvsc_bymac(). This function allows us to associate the VF interface that maybe coming up with the associated netvsc interface using MAC address. What I want to do is to not use the MAC address but to use a serial number that the host publishes. I could send the netvsc patches that use this if that would help here. In any case once we have this functionality, we will be submitting the patches that use this. What I am trying to do here is to implement the equivalent of dev_is_pci() for vmbus. You also had concerns about how we were implementing this functionality. We could certainly use the same mechanism used in dev_is_pci(). Perhaps I could also use the same naming convention - dev_is_hv()? Regards, K. Y > > greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web