RE: [PATCH] hyper-v: allow access to vmbus from userspace driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: devel [mailto:driverdev-devel-bounces@xxxxxxxxxxxxxxxxxxxxxx] On
> Behalf Of KY Srinivasan
> Sent: Tuesday, February 3, 2015 11:24 AM
> To: Stephen Hemminger; Haiyang Zhang
> Cc: devel@xxxxxxxxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx
> Subject: RE: [PATCH] hyper-v: allow access to vmbus from userspace driver
> 
> 
> 
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@xxxxxxxxxxxxxxxxxx]
> > Sent: Tuesday, February 3, 2015 11:04 AM
> > To: KY Srinivasan; Haiyang Zhang
> > Cc: devel@xxxxxxxxxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx
> > Subject: [PATCH] hyper-v: allow access to vmbus from userspace driver
> >
> > Brocade is submitting a hyper-v driver for DPDK <dev@xxxxxxxx> but
> > this driver needs a hook in the hyper-v bus layer to allow the
> > additional hv_uio driver to access the shared vmbus pages. The hv_uio
> > driver lives in DPDK (like
> > igb_uio) and provides userspace access to raw network packets.
> >
> > Signed-off-by: Stas Egorov <segorov@xxxxxxxxxxxx>
> > Signed-off-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx>
> >
> > ---
> >  drivers/hv/connection.c |   20 +++++++++++++++++---
> >  include/linux/hyperv.h  |    3 +++
> >  2 files changed, 20 insertions(+), 3 deletions(-)
> >
> > --- a/drivers/hv/connection.c	2015-02-03 10:58:51.751752450 -0800
> > +++ b/drivers/hv/connection.c	2015-02-03 10:58:51.751752450 -0800
> > @@ -64,6 +64,21 @@ static __u32 vmbus_get_next_version(__u3
> >  	}
> >  }
> >
> > +static const uuid_le HV_NET_GUID = {
> > +	.b = {
> > +		0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46,
> > +		0x91, 0x3f, 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e
> > +	}
> > +};
> > +
> 
> We already have this guid defined in linux/hyperv.h; look at HV_NIC_GUID.
> 
> > +void vmbus_get_pages(unsigned long *int_page, unsigned long
> > +monitor_pages[2]) {
> > +	*int_page = (unsigned long)vmbus_connection.int_page;
> > +	monitor_pages[0] = (unsigned
> > long)vmbus_connection.monitor_pages[0];
> > +	monitor_pages[1] = (unsigned
> > long)vmbus_connection.monitor_pages[1];
> > +}
> > +EXPORT_SYMBOL_GPL(vmbus_get_pages);

vmbus_get_pages() is too generic. Perhaps vmbus_get_monitor_pages() may be a better
name for this function.

Regards,

K. Y
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux