DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: stephen hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, devel@linuxdriverproject.org,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	netdev@vger.kernel.org
Subject: Re: [dpdk-dev] hyper-v: allow access to vmbus from userspace driver
Date: Wed, 04 Feb 2015 14:42:43 +0100	[thread overview]
Message-ID: <2084158.GG5mBQGd4q@xps13> (raw)
In-Reply-To: <20150203110345.15c38345@urahara>

Hi Stephen,

2015-02-03 11:03, stephen hemminger:
> Brocade is submitting a hyper-v driver for DPDK <dev@dpdk.org>
> 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@mirantis.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

The hyper-v driver for DPDK has not been sent yet to
	http://dpdk.org/dev/patchwork
but it would be interesting to better explain this uio mapping.

Thanks
-- 
Thomas


> --- 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
> +	}
> +};
> +
> +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);
> +
>  static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
>  					__u32 version)
>  {
> @@ -347,7 +362,8 @@ static void process_chn_event(u32 relid)
>  			else
>  				bytes_to_read = 0;
>  		} while (read_state && (bytes_to_read != 0));
> -	} else {
> +	} else if (!memcmp(&channel->device_obj->dev_type, &HV_NET_GUID,
> +			   sizeof(uuid_le))) {
>  		pr_err("no channel callback for relid - %u\n", relid);
>  	}
>  
> --- a/include/linux/hyperv.h	2015-02-03 10:58:51.751752450 -0800
> +++ b/include/linux/hyperv.h	2015-02-03 10:58:51.751752450 -0800
> @@ -868,6 +868,9 @@ extern int vmbus_recvpacket_raw(struct v
>  
>  extern void vmbus_ontimer(unsigned long data);
>  
> +extern void vmbus_get_pages(unsigned long *int_page,
> +			    unsigned long monitor_pages[2]);
> +
>  /* Base driver object */
>  struct hv_driver {
>  	const char *name;

           reply	other threads:[~2015-02-04 13:43 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20150203110345.15c38345@urahara>]

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=2084158.GG5mBQGd4q@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --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).