From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <aconole@redhat.com>
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
 by dpdk.org (Postfix) with ESMTP id 6D3EF591E
 for <dev@dpdk.org>; Mon,  9 Nov 2015 19:16:41 +0100 (CET)
Received: from int-mx13.intmail.prod.int.phx2.redhat.com
 (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
 by mx1.redhat.com (Postfix) with ESMTPS id 7EA60C0B60EB;
 Mon,  9 Nov 2015 18:16:40 +0000 (UTC)
Received: from aconole.bos.csb (dhcp-25-6.bos.redhat.com [10.18.25.6])
 by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 tA9IGdaS006220
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Mon, 9 Nov 2015 13:16:39 -0500
From: Aaron Conole <aconole@redhat.com>
To: Tetsuya Mukawa <mukawa@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>
Date: Mon, 09 Nov 2015 13:16:39 -0500
In-Reply-To: <1447046221-20811-2-git-send-email-mukawa@igel.co.jp> (Tetsuya
 Mukawa's message of "Mon, 9 Nov 2015 14:17:00 +0900")
Message-ID: <f7t1tbzrqbc.fsf@aconole.bos.csb>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com
Subject: Re: [dpdk-dev] [PATCH v3 1/2] vhost: Add callback and private data
	for vhost PMD
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Nov 2015 18:16:41 -0000

Greetings,

Tetsuya Mukawa <mukawa@igel.co.jp> 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 <mukawa@igel.co.jp>
> ---
>  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.