From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net-next v2] hyper-v: allow access to vmbus from userspace driver Date: Thu, 5 Feb 2015 08:50:18 -0800 Message-ID: <20150205085018.06e8a691@urahara> References: <20150204152029.65f02d64@urahara> <87egq4r5ao.fsf@vitty.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org, devel-tBiZLqfeLfOHmIFyCCdPziST3g8Odh+X@public.gmane.org, Haiyang Zhang , KY Srinivasan , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vitaly Kuznetsov Return-path: In-Reply-To: <87egq4r5ao.fsf-hpI3/L/TUU23oHxwIazZmlaTQe2KTcn/@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Thu, 05 Feb 2015 12:01:03 +0100 Vitaly Kuznetsov wrote: > 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. Was in earlier commit. Need to prevent driver from logging error when device is not claimed directly by existing kernel devices.