From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by dpdk.org (Postfix) with ESMTP id 3C59AA2F for ; Tue, 10 Nov 2015 10:48:09 +0100 (CET) Received: by pabfh17 with SMTP id fh17so230026794pab.0 for ; Tue, 10 Nov 2015 01:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel_co_jp.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=bAuMEa6hJE2OMj/YsQ31znFXYbBbaT8ACYQipRhWeAU=; b=kqynOkrow8j+EEBdssXVTjTFW75TKCmh5ZBk68Ja70xsy3TBZIPk+l2kqNMWET6mt5 3J93DsGF8x3L98CEIx/1WIpffJi8WknTEEzJjfU8+alWtM+jOLoLu//oqD99yx1ARCpn F5+L/MHVwNdfRIGc5Chdy4D5wEPhb/b1AkZIqXjTwL18BuEOUB3TtDLjzUIPmb/rgjJq Go2V/kY0jfqs3Rc1WeVC6sZ6B/2QsvwecRNytte/de7eaIxckI8NwhqPa1oFWbye7a0l Aya5OMgchSYOBWZIsXC2alJyxE6ZeW5OcEqw4CIk3/IijNA+2D6mu2V4HD9Qmqx7tqLF apUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=bAuMEa6hJE2OMj/YsQ31znFXYbBbaT8ACYQipRhWeAU=; b=VO4i4eLFUtYCnZmjM3ssyiKaSEnxgOPj6e6rg1FIK9D5+jl5Np++2X6+XuP+PBK6qD u8vh+ghEH4+lsL/NTbhtPWkOuj0G5VLhRZFxHz4ADwwDa4V4v2zXEVMiujVf51nKbCzj XfZEoSIOAfsWtewYwvSM3Qsh1PDqlMrMIO0+QABI4caHxY9hU0Tpt0EsJrDpBPBrKeM4 tGJnKtiny3ITmEExlzAAZ2OD2mnP71hFBpTVMvxJRQ/9eM0nPwMNP1JTTw2HvHbzmbbO GG6+s7NxkeCko6m+c64aZMcd4Ut1UGKbqYNuE41cRGhZ1MwxKraSUueD5JdzU3YgkzKT u1Kg== X-Gm-Message-State: ALoCoQmBkejdcHOdIK7BG6U6uZfhspcSdovQEvVXfc6tXEKYq9jfZHP/yjPHxeoJbTTP3s0ei28k X-Received: by 10.68.163.97 with SMTP id yh1mr4196045pbb.36.1447148888634; Tue, 10 Nov 2015 01:48:08 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id ou3sm3058921pbb.44.2015.11.10.01.48.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Nov 2015 01:48:08 -0800 (PST) To: Panu Matilainen , Aaron Conole 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> <564160F2.6030407@igel.co.jp> <564199B7.3010905@redhat.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <5641BD54.3070700@igel.co.jp> Date: Tue, 10 Nov 2015 18:48:04 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <564199B7.3010905@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 09:48:09 -0000 On 2015/11/10 16:16, Panu Matilainen wrote: > On 11/10/2015 05:13 AM, Tetsuya Mukawa wrote: >> 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. > > No need to. > > The librte_vhost ABI has already been broken during the DPDK 2.2 cycle > by the multiqueue changes, but that's okay since it was announced > during 2.1 cycle (in commit 3c848bd7b1c6f4f681b833322a748fdefbb5fb2d). > > What is missing right now is bumping the library version, and that > must happen before 2.2 is released. > > - Panu - > > Hi Panu, Thank you so much. Let me make sure what you mean. I guess I need to add RTE_NEXT_ABI tags where pmd_priv is used. This is because we don't break DPDK-2.1 ABI. Anyway, the tag will be removed when DPDK-2.2 is released, then we can use vhost PMD. Is this correct? Thanks, Tetsuya