From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BBFC2B406 for ; Thu, 5 Feb 2015 12:01:09 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15B17dV005513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 5 Feb 2015 06:01:07 -0500 Received: from vitty.brq.redhat.com.smtpmail-local-domain (vitty.brq.redhat.com [10.34.26.3]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t15B13jm024292 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 5 Feb 2015 06:01:05 -0500 From: Vitaly Kuznetsov To: Stephen Hemminger References: <20150204152029.65f02d64@urahara> Date: Thu, 05 Feb 2015 12:01:03 +0100 In-Reply-To: <20150204152029.65f02d64@urahara> (Stephen Hemminger's message of "Wed, 4 Feb 2015 15:20:29 -0800") Message-ID: <87egq4r5ao.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Mailman-Approved-At: Thu, 05 Feb 2015 12:19:04 +0100 Cc: dev@dpdk.org, devel@linuxdriverproject.org, Haiyang Zhang , KY Srinivasan , netdev@vger.kernel.org Subject: Re: [dpdk-dev] [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 11:01:10 -0000 Stephen Hemminger writes: > This is enables the hyper-v driver for DPDK . > 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 > Signed-off-by: Stephen Hemminger > > --- > 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