From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 2E3648D91 for ; Thu, 19 Nov 2015 03:03:54 +0100 (CET) Received: by pacej9 with SMTP id ej9so63510165pac.2 for ; Wed, 18 Nov 2015 18:03:53 -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=13rIdvzT+RXXyfjrOj8LVgCS3R2HHnQxtyOTRCrHaxg=; b=0yQ/ungUSszfde9vWUE/qMBRVQrLv+0y8K3kI+tQrD4f+XZdItTfE+BGc54phkMKuH vcqLUEQkpr3lst+NfiC6p+ygs1aU5JxMtp0tR9ZRX/1gwXSmWyBbNT3kOXn918g4zgjw NVc4Flkk1hwqno+lE3TuiV2RawIJAq++VtlKdbSTYmMkoZUpB2kyHKz/QUsylYgtj25L VhwF+pViL/3fRzVxxE1B1Ah9VJbdEyxRi0QH3/4clvhkpd54vBUSuxYgLhuK09LZ20ut W0CXFmDNVkzzDLWS5Vg9vWB2xg58QxVgZSAQcIPpI2NlPUJldIWD52s32logGL3e/T/b oxEg== 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=13rIdvzT+RXXyfjrOj8LVgCS3R2HHnQxtyOTRCrHaxg=; b=QFjnlsRNmgL42Rcp1QEDbOtccPZCNi491lirzwTMHUSKA9tMY/67NqmC1dhbsEpY6e n5arEY5FJfl8oo455kM0ef0o1muvPWZz9Cjnf6U08zgcOyVyYoBMxlYFbyS32HjdSRhR DW9ID1hoasaKRmIC+DUiNhhizQsxP0tbwc7rdL06O3y5NOVjm1rUSMag51djT/qlk+T0 u0gW3JmhZHDWyVGKO3NHbXBLxEYIvzMlJ3SFn/wFeIWZ3L6Ow2OMTZoBWb2aVdeSD24w xBJmL5iuSTBinD0qZRooWpQ5LsZWoRsdqL4nj7uU/q3QGIMasEZAGEfbW026hybbuB5i FZ3Q== X-Gm-Message-State: ALoCoQnVqS61jNJeZsuIzWdMpc1J9H/YVZZMGaeKj7+SUeZvEmvjHxsH8cR9czMHglAon6MZGaE8 X-Received: by 10.68.69.106 with SMTP id d10mr6749385pbu.143.1447898633399; Wed, 18 Nov 2015 18:03:53 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id qj4sm6652475pbc.21.2015.11.18.18.03.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Nov 2015 18:03:52 -0800 (PST) To: Yuanhan Liu References: <1447046221-20811-3-git-send-email-mukawa@igel.co.jp> <1447392031-24970-1-git-send-email-mukawa@igel.co.jp> <1447392031-24970-2-git-send-email-mukawa@igel.co.jp> <20151117132933.GV2326@yliu-dev.sh.intel.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <564D2E06.7060608@igel.co.jp> Date: Thu, 19 Nov 2015 11:03:50 +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: <20151117132933.GV2326@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, ann.zhuangyanying@huawei.com Subject: Re: [dpdk-dev] [PATCH v4 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: Thu, 19 Nov 2015 02:03:54 -0000 On 2015/11/17 22:29, Yuanhan Liu wrote: > On Fri, Nov 13, 2015 at 02:20:30PM +0900, Tetsuya Mukawa wrote: >> 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. > Can you be more specific about this? > > --yliu How about like below? commit log: Currently, when virtio device is created and destroyed, vhost library will call one of callback handlers. The vhost PMD need to use this pair of callback handlers to know which virtio devices are connected actually. Because we can register only one pair of callbacks to vhost library, if the PMD use it, DPDK applications cannot have a way to know the events. This may break legacy DPDK applications that uses vhost library. To prevent it, this patch adds one more pair of callbacks to vhost library especially for the vhost PMD. With the patch, legacy applications can use the vhost PMD even if they need additional specific handling for virtio device creation and destruction. For example, legacy application can call rte_vhost_enable_guest_notification() in callbacks to change setting. Tetsuya