From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id B0660ADFE for ; Thu, 5 Feb 2015 00:20:31 +0100 (CET) Received: by pdev10 with SMTP id v10so3690312pde.3 for ; Wed, 04 Feb 2015 15:20:31 -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:mime-version :content-type:content-transfer-encoding; bh=7d+WIrYYtZlhZyG8NWun/uunSl+TuplBlCMB4b46m6M=; b=g+H9gxz1wl3tlidVpLJ1+aszMy/irqbZMwjgb2+49eCQlorq6oy7LSS0u4LXLFc9PX g2kZJlIHZTSgTfEI7cAqgmaG2UteFJtKSvJDoEEnOARjLLuANgRRA2wj+NewC+kymUBj +nDIZsfzKhlYz1dSrG2xm10g6OZVyM0FFVyPfc0ZzYfiMxEjfCwK74gD0zwxtDzqUZZ8 wQ97W5x0U2CpliK4ebW7+/BJASni7qxzEZNqWEkcDuET0ePwwWJ0TM9BYOx3bTIleBsz Sx+TvWaXFf7pEnB22Ez6sLper9/ZhuIB1Cuzy5u3uLVtkF64OBk6+8exrM1RwbO2RvPz wcZw== X-Gm-Message-State: ALoCoQn1nrBeSRDNoHCvHeTf1HWC8TgupvXw3GX7UNx4W7fcktcAZWQFwyAF6afRn61v1UTyWcvV X-Received: by 10.70.34.177 with SMTP id a17mr795067pdj.123.1423092030993; Wed, 04 Feb 2015 15:20:30 -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 c17sm3113443pdl.6.2015.02.04.15.20.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 15:20:30 -0800 (PST) Date: Wed, 4 Feb 2015 15:20:29 -0800 From: Stephen Hemminger To: KY Srinivasan , Haiyang Zhang Message-ID: <20150204152029.65f02d64@urahara> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, devel@linuxdriverproject.org, netdev@vger.kernel.org Subject: [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: Wed, 04 Feb 2015 23:20:32 -0000 This is enables the hyper-v driver for DPDK . 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 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]) +{ + *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;