From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by dpdk.org (Postfix) with ESMTP id 5A213A6A for ; Tue, 22 Dec 2015 10:38:30 +0100 (CET) Received: by mail-vk0-f46.google.com with SMTP id a189so115007062vkh.2 for ; Tue, 22 Dec 2015 01:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bigswitch-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xfQRu0rGEZICsQd8D8xPUPDLR+KHtBStgc6ZBMbuSbc=; b=LID9jBNTAK5h4H93SUltgSkPQcoAel97vQhc5MUggFzWuCi+abXUKMJUpeHLkIyu3W oy1eNY42LU2y6uUBbtcGulsKl0KcPTQ+0YR3tonYw8S2LXn7hqOoYUo788ulqdHRFwwG k54ZpqR5teNh5xSWG4LIZpidaVipERyhCxVKrCaZC7M+FRZqPbAvl0Prn4ntFsZ0ZKak Nkl2XVatyWgxEM+Ij6qav82kUzA/By/ORHKiBLJ9bMy2gXrG8giwPyoyjMFn5mpknqCP Qo4WEauoIqVH0O4DhGU19JXaEQuhm1L4CGFjUxp3eloINLbe1XF1FXZ3fWQKKfbGhBJ0 iWaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xfQRu0rGEZICsQd8D8xPUPDLR+KHtBStgc6ZBMbuSbc=; b=UIAbUNWdfRuwIX0Nkl2YRepdhUgmPyJ7FrzxzMmeStaW8BN2K2DoOx25VdEdyc9lab 2r3aq81DjY3ESla5Al1JV2WUTnB8ssFEqUC3hqdz63mIivaFIxUbUk+JUmbukxk0slFl HEqmZtqzoIvuDOWrJy7mxqJItlYq4V7HQqitwnL4f7rszrI7UMBPMOI2A6QQHVmF6Vmh GtO0OG5xbQfKONLM4f0l4wkynNIi+3UQ14n6fLjAS7/RKu1k1/W/VYFUnCfaD1gssjTx /hLWDDqtHtCbM+H4PmCIiG6TLFbWlmJiImL7HLyubeZOPxIs1NeORAjNjubTlAd16db/ P7QQ== X-Gm-Message-State: ALoCoQmcASFJdpyYicJFgrysKMaS4m/SKBCGHCTuW7wHqQcD6zyXQxhkw+Po6cyNRJpgGiA/2HAe/Lz8HfzSUmrXqn/gDxYwo4Ld4QgPZXhS02N+QFyElWE= MIME-Version: 1.0 X-Received: by 10.31.168.205 with SMTP id r196mr15438700vke.120.1450777109706; Tue, 22 Dec 2015 01:38:29 -0800 (PST) Received: by 10.31.156.16 with HTTP; Tue, 22 Dec 2015 01:38:29 -0800 (PST) In-Reply-To: <20151222054710.GK18863@yliu-dev.sh.intel.com> References: <1447392031-24970-3-git-send-email-mukawa@igel.co.jp> <1448355603-21275-1-git-send-email-mukawa@igel.co.jp> <1448355603-21275-2-git-send-email-mukawa@igel.co.jp> <20151217114223.GC29571@yliu-dev.sh.intel.com> <56737A5E.1030803@igel.co.jp> <20151218041536.GI29571@yliu-dev.sh.intel.com> <56738B5C.1030206@igel.co.jp> <20151222034158.GH18863@yliu-dev.sh.intel.com> <20151222054710.GK18863@yliu-dev.sh.intel.com> Date: Tue, 22 Dec 2015 01:38:29 -0800 Message-ID: From: Rich Lane To: Yuanhan Liu Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Tue, 22 Dec 2015 09:38:30 -0000 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(), then yes, it still works. I'd only consider that a stopgap until the real ethdev APIs are implemented. I'd suggest to add RTE_ETH_EVENT_QUEUE_STATE_CHANGE rather than create another callback registration API. Perhaps we could merge the basic PMD which I think is pretty solid and then continue the API discussion with patches to it.