* [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver
@ 2015-02-04 23:20 Stephen Hemminger
2015-02-05 11:01 ` Vitaly Kuznetsov
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2015-02-04 23:20 UTC (permalink / raw)
To: KY Srinivasan, Haiyang Zhang; +Cc: dev, devel, netdev
This is enables the hyper-v driver for DPDK <dev@dpdk.org>.
The hv_uio driver needs to access the shared vmbus monitor
pages.
I would also like to put hv_uio in upstream kernel like other
uio drivers, but need to get API accepted with DPDK first.
Signed-off-by: Stas Egorov <segorov@mirantis.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
v2 - simplify and rename to vmbus_get_monitor_pages
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-04 14:59:51.636194383 -0800
@@ -64,6 +64,15 @@ static __u32 vmbus_get_next_version(__u3
}
}
+void vmbus_get_monitor_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_monitor_pages);
+
static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
__u32 version)
{
@@ -347,10 +356,7 @@ static void process_chn_event(u32 relid)
else
bytes_to_read = 0;
} while (read_state && (bytes_to_read != 0));
- } else {
- 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-04 15:00:26.388355012 -0800
@@ -868,6 +868,9 @@ extern int vmbus_recvpacket_raw(struct v
extern void vmbus_ontimer(unsigned long data);
+extern void vmbus_get_monitor_pages(unsigned long *int_page,
+ unsigned long monitor_pages[2]);
+
/* Base driver object */
struct hv_driver {
const char *name;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver
2015-02-04 23:20 [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver Stephen Hemminger
@ 2015-02-05 11:01 ` Vitaly Kuznetsov
2015-02-05 16:50 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2015-02-05 11:01 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, devel, Haiyang Zhang, KY Srinivasan, netdev
Stephen Hemminger <stephen@networkplumber.org> writes:
> This is enables the hyper-v driver for DPDK <dev@dpdk.org>.
> The hv_uio driver needs to access the shared vmbus monitor
> pages.
Why can't we just make vmbus_connection struct public?
>
> I would also like to put hv_uio in upstream kernel like other
> uio drivers, but need to get API accepted with DPDK first.
>
> Signed-off-by: Stas Egorov <segorov@mirantis.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> ---
> v2 - simplify and rename to vmbus_get_monitor_pages
>
> 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-04 14:59:51.636194383 -0800
> @@ -64,6 +64,15 @@ static __u32 vmbus_get_next_version(__u3
> }
> }
>
> +void vmbus_get_monitor_pages(unsigned long *int_page,
> + unsigned long monitor_pages[2])
> +{
Too weird to be a public interface in my opinion.
> + *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_monitor_pages);
> +
> static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
> __u32 version)
> {
> @@ -347,10 +356,7 @@ static void process_chn_event(u32 relid)
> else
> bytes_to_read = 0;
> } while (read_state && (bytes_to_read != 0));
> - } else {
> - pr_err("no channel callback for relid - %u\n", relid);
> }
> -
> }
This change wasn't mentioned in your commit msg.
>
> /*
> --- a/include/linux/hyperv.h 2015-02-03 10:58:51.751752450 -0800
> +++ b/include/linux/hyperv.h 2015-02-04 15:00:26.388355012 -0800
> @@ -868,6 +868,9 @@ extern int vmbus_recvpacket_raw(struct v
>
> extern void vmbus_ontimer(unsigned long data);
>
> +extern void vmbus_get_monitor_pages(unsigned long *int_page,
> + unsigned long monitor_pages[2]);
> +
> /* Base driver object */
> struct hv_driver {
> const char *name;
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
--
Vitaly
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver
2015-02-05 11:01 ` Vitaly Kuznetsov
@ 2015-02-05 16:50 ` Stephen Hemminger
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2015-02-05 16:50 UTC (permalink / raw)
To: Vitaly Kuznetsov; +Cc: dev, devel, Haiyang Zhang, KY Srinivasan, netdev
On Thu, 05 Feb 2015 12:01:03 +0100
Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
> Stephen Hemminger <stephen@networkplumber.org> writes:
>
> > This is enables the hyper-v driver for DPDK <dev@dpdk.org>.
> > The hv_uio driver needs to access the shared vmbus monitor
> > pages.
>
> Why can't we just make vmbus_connection struct public?
>
> >
> > I would also like to put hv_uio in upstream kernel like other
> > uio drivers, but need to get API accepted with DPDK first.
> >
> > Signed-off-by: Stas Egorov <segorov@mirantis.com>
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > ---
> > v2 - simplify and rename to vmbus_get_monitor_pages
> >
> > 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-04 14:59:51.636194383 -0800
> > @@ -64,6 +64,15 @@ static __u32 vmbus_get_next_version(__u3
> > }
> > }
> >
> > +void vmbus_get_monitor_pages(unsigned long *int_page,
> > + unsigned long monitor_pages[2])
> > +{
>
> Too weird to be a public interface in my opinion.
>
> > + *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_monitor_pages);
> > +
> > static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
> > __u32 version)
> > {
> > @@ -347,10 +356,7 @@ static void process_chn_event(u32 relid)
> > else
> > bytes_to_read = 0;
> > } while (read_state && (bytes_to_read != 0));
> > - } else {
> > - pr_err("no channel callback for relid - %u\n", relid);
> > }
> > -
> > }
>
> This change wasn't mentioned in your commit msg.
Was in earlier commit. Need to prevent driver from logging error
when device is not claimed directly by existing kernel devices.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-05 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 23:20 [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver Stephen Hemminger
2015-02-05 11:01 ` Vitaly Kuznetsov
2015-02-05 16:50 ` Stephen Hemminger
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).