From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [PATCH v3 1/2] vhost: Add callback and private data for vhost PMD Date: Tue, 10 Nov 2015 12:13:54 +0900 Message-ID: <564160F2.6030407@igel.co.jp> References: <1446436737-25606-2-git-send-email-mukawa@igel.co.jp> <1447046221-20811-1-git-send-email-mukawa@igel.co.jp> <1447046221-20811-2-git-send-email-mukawa@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com To: Aaron Conole Return-path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id E65A4591F for ; Tue, 10 Nov 2015 04:13:58 +0100 (CET) Received: by pacdm15 with SMTP id dm15so195411429pac.3 for ; Mon, 09 Nov 2015 19:13:58 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2015/11/10 3:16, Aaron Conole wrote: > Greetings, > > Tetsuya Mukawa writes: >> These variables are needed to be able to manage one of virtio devices >> using both vhost library APIs and vhost PMD. >> For example, if vhost PMD uses current callback handler and private data >> provided by vhost library, A DPDK application that links vhost library >> cannot use some of vhost library APIs. To avoid it, callback and private >> data for vhost PMD are needed. >> >> Signed-off-by: Tetsuya Mukawa >> --- >> lib/librte_vhost/rte_vhost_version.map | 6 +++ >> lib/librte_vhost/rte_virtio_net.h | 3 ++ >> lib/librte_vhost/vhost_user/virtio-net-user.c | 13 +++---- >> lib/librte_vhost/virtio-net.c | 56 +++++++++++++++++++++++++-- >> lib/librte_vhost/virtio-net.h | 4 +- >> 5 files changed, 70 insertions(+), 12 deletions(-) >> >> diff --git a/lib/librte_vhost/rte_vhost_version.map b/lib/librte_vhost/rte_vhost_version.map >> index 3d8709e..00a9ce5 100644 >> --- a/lib/librte_vhost/rte_vhost_version.map >> +++ b/lib/librte_vhost/rte_vhost_version.map >> @@ -20,3 +20,9 @@ DPDK_2.1 { >> rte_vhost_driver_unregister; >> >> } DPDK_2.0; >> + >> +DPDK_2.2 { >> + global: >> + >> + rte_vhost_driver_pmd_callback_register; >> +} DPDK_2.1; >> diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h >> index 5687452..3ef6e58 100644 >> --- a/lib/librte_vhost/rte_virtio_net.h >> +++ b/lib/librte_vhost/rte_virtio_net.h >> @@ -128,6 +128,7 @@ struct virtio_net { >> char ifname[IF_NAME_SZ]; /**< Name of the tap device or socket path. */ >> uint32_t virt_qp_nb; /**< number of queue pair we have allocated */ >> void *priv; /**< private context */ >> + void *pmd_priv; /**< private context for vhost PMD */ >> struct vhost_virtqueue *virtqueue[VHOST_MAX_QUEUE_PAIRS * 2]; /**< Contains all virtqueue information. */ >> } __rte_cache_aligned; > Sorry if I'm missing something, but this is an ABI breaker, isn't it? I > think this needs the RTE_NEXT_ABI tag around it. Hi Aaron, Thanks for reviewing. Yes, your are correct. I guess I can implement vhost PMD without this variable, so I will remove it. Thanks, Tetsuya