From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by dpdk.org (Postfix) with ESMTP id 849815A0A for ; Thu, 24 Dec 2015 05:07:19 +0100 (CET) Received: by mail-pa0-f45.google.com with SMTP id jx14so115682681pad.2 for ; Wed, 23 Dec 2015 20:07:19 -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=9rRU2OlMVCJuP1xTtR6Sir5eE0GNpjSk9fvK3V0+h9o=; b=xpbMzXvM5iQiUtzAbD20GlP/P4j8ik9iH70pxY4K0sqgiR/A9p6FdBVvaO26CAJaj3 7f2EHsNUgKYXmeD6D/FSavlB5iwt8S73HrhINiAgMqENA1fd0ufERsMCYail4LGO6Als HDQ87ezj0+gJ1No+snpz4w4rroOGE/BXf5crTAT/dm+UN2FmGMFKaNa/hDoleBy8D9rk Js3h1vpsg+RTS511mvav+yJ3UGefD5i+G6h7AJuYhds3UB9VK0K7Og60+YA24gn3IqHO Zr7HxFeXJBTrMfwCU12quOfuNzdC/zYT/MBxijnHJwGQP2pypmbMg3QxV/klXtv+Dh8T hvDQ== 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=9rRU2OlMVCJuP1xTtR6Sir5eE0GNpjSk9fvK3V0+h9o=; b=YSSCouLfxvnzU0BkOV64tjiNOZgXCwksJJsX8HD28FPSMhWVLK1R1wprK3hLsNkEN0 rm4B+cUaLjLLFPearqtI5XOceSeJqXUXaJP8d1BMUrazGTPIyNaV3z/RLhZItdnF7CpT AmrgkbAAJeDV5XeSDe2R6cc7L2xNDujs+e1MjjvGRoqja5u9bbVR3St8myF6PW0HPfMs 0L+Ojxin6AEWVeuxyE2jd4JTFXuilcyudhDwRyhBNU7OxErgx0QSU5ZCYIGkDnvmTa5s A/GadgDGegbyuHu/yDOVRNsQHDTDZjCi4mCOrXZxqxb0rcqQdcWURfWIciJCn2Jf+fit 7sKQ== X-Gm-Message-State: ALoCoQm21rF+UfBHbushzP+OTq/ibvM8NB3iJAK9R3Fj30c/7bJ1zUi7A+7Oi9Ay5j7nc1+DrZ5diVAyN2e+OFLBh4NaicbszA== X-Received: by 10.66.155.8 with SMTP id vs8mr49587778pab.18.1450930038916; Wed, 23 Dec 2015 20:07:18 -0800 (PST) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id v17sm30526858pfi.17.2015.12.23.20.07.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Dec 2015 20:07:18 -0800 (PST) To: Yuanhan Liu , Thomas Monjalon , Rich Lane References: <1448355603-21275-2-git-send-email-mukawa@igel.co.jp> <20151223024453.GW18863@yliu-dev.sh.intel.com> <1689693.Nk6ErSWZrF@xps13> <20151224035105.GA18863@yliu-dev.sh.intel.com> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <567B6F77.8010909@igel.co.jp> Date: Thu, 24 Dec 2015 13:07:19 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151224035105.GA18863@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 v5 1/3] 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, 24 Dec 2015 04:07:19 -0000 On 2015/12/24 12:51, Yuanhan Liu wrote: > On Wed, Dec 23, 2015 at 11:00:15PM +0100, Thomas Monjalon wrote: >> 2015-12-23 10:44, Yuanhan Liu: >>> On Tue, Dec 22, 2015 at 01:38:29AM -0800, Rich Lane wrote: >>>> On Mon, Dec 21, 2015 at 9:47 PM, Yuanhan Liu >>>> wrote: >>>> >>>> On Mon, Dec 21, 2015 at 08:47:28PM -0800, Rich Lane wrote: >>>> > The queue state change callback is the one new API that needs to be >>>> > added because >>>> > normal NICs don't have this behavior. >>>> >>>> Again I'd ask, will vring_state_changed() be enough, when above issues >>>> are resolved: vring_state_changed() will be invoked at new_device()/ >>>> destroy_device(), and of course, ethtool change? >>>> >>>> >>>> It would be sufficient. It is not a great API though, because it requires the >>>> application to do the conversion from struct virtio_net to a DPDK port number, >>>> and from a virtqueue index to a DPDK queue id and direction. Also, the current >>>> implementation often makes this callback when the vring state has not actually >>>> changed (enabled -> enabled and disabled -> disabled). >>>> >>>> If you're asking about using vring_state_changed() _instead_ of the link status >>>> event and rte_eth_dev_socket_id(), >>> No, I like the idea of link status event and rte_eth_dev_socket_id(); >>> I was just wondering why a new API is needed. Both Tetsuya and I >>> were thinking to leverage the link status event to represent the >>> queue stats change (triggered by vring_state_changed()) as well, >>> so that we don't need to introduce another eth event. However, I'd >>> agree that it's better if we could have a new dedicate event. >>> >>> Thomas, here is some background for you. For vhost pmd and linux >>> virtio-net combo, the queue can be dynamically changed by ethtool, >>> therefore, the application wishes to have another eth event, say >>> RTE_ETH_EVENT_QUEUE_STATE_CHANGE, so that the application can >>> add/remove corresponding queue to the datapath when that happens. >>> What do you think of that? >> Yes it is an event. So I don't understand the question. >> What may be better than a specific rte_eth_event_type? > The alternative is a new set of callbacks, but judging that we already > have a set of callback for vhost libraray, and adding a new set to vhost > pmd doesn't seem elegant to me. > > Therefore, I'd prefer a new eth event. > > --yliu I am ok to have one more event type. BTW, I have questions about numa_node. I guess "rte_eth_dev_socket_id()" can only return numa_node of specified port. If multiple queues are used in one device(port), can we say all queues are always in same numa_node? If the answer is no, I am still not sure we can remove "struct virtio_net" from DPDK application callback handling. I agree we can add RTE_ETH_EVENT_QUEUE_STATE_CHANGE for interrupt notice. But current ethdev APIs may not be able to hide vhost specific properties, then the callback hander needs to handle "struct virtio_net" directly. Thanks, Tetsuya