From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by dpdk.org (Postfix) with ESMTP id 277033794 for ; Thu, 5 Feb 2015 17:50:21 +0100 (CET) Received: by mail-pa0-f48.google.com with SMTP id ey11so11049551pad.7 for ; Thu, 05 Feb 2015 08:50:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=pjZHA//KjIKecAw70ew1r5rZYBsMKoUCnp2cENHSqK4=; b=e/S/th3GI3cWyxvIw8OxdKtFaVT3VQkXXDlJBt1/lv3K/mXlwPSwQ5XBo7LYJ4TfXZ AWQbRR20AY6+oVNY3wTP8Ge++vwUn/dEpZ7CmRQhUXibYvpoRqro1VlGfAEGUKuWGy3b QnliDlUQ0ut9xigSOV9BXjo0QZzMdtPZLRjuE8Z8LjimheS9oX9IXN65SKJ8/b/XvYAO mmz2JPSd3FbpcnPvm+wn9696LOHCFWe49uiqq1hqs3+gd1+/SY8y+DD+xivKpDpQ2uGp OHuPMtpjCDsleEmEqx22qYu9wRD6nBW9xYr/DURCq7p88tMyB8zI6FPlDjDxy2fQBMUb AZ7w== X-Gm-Message-State: ALoCoQntaS7+zgQmbL7jKZ7s1//4uogGVJC5TAx5NkjfJx5phs5d0vAFU/kvjv3d+IooUZeR4B4v X-Received: by 10.66.159.67 with SMTP id xa3mr7140027pab.13.1423155020196; Thu, 05 Feb 2015 08:50:20 -0800 (PST) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id qv9sm5612560pab.27.2015.02.05.08.50.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Feb 2015 08:50:19 -0800 (PST) Date: Thu, 5 Feb 2015 08:50:18 -0800 From: Stephen Hemminger To: Vitaly Kuznetsov Message-ID: <20150205085018.06e8a691@urahara> In-Reply-To: <87egq4r5ao.fsf@vitty.brq.redhat.com> 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@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 16:50:21 -0000 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.