From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 845865A87 for ; Wed, 23 Dec 2015 23:01:49 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id p187so163994270wmp.0 for ; Wed, 23 Dec 2015 14:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=/GnRm5x445wnmus7q8odgtE5/kQwMVK/a0RImnilqW4=; b=aHoPxg0Sbw0jO9Qn1xHxNPKxJoxL11hvwRwKXj4OBy7STy+YzfemmTBxn/CvIJgf0K 8JnVIJHvShjNm3nm5yXmwrvrfQqOk9WGv49YFucqx4kCAtprqFeNdRIW8n6xJSG7w1gX dH1tAS4855Fhhwat9oe7L+SX7d0Uwm/rwwWJziK3qVroewNGr0zO/PG4+gQZ0lBmUW1Q B8skQDAuonoT0PZlZPGRe9Rf2oB0R1OBtPYjIHuxa0K1XoA148FjTw5R0ckF4WVrppMw hEwG0OL+F1h3kPvUpAUV9bMWMtvjx0/YPyOn9ZBOTNxC5F+dFkYuiBGmuvO+/7plc0On Ggqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=/GnRm5x445wnmus7q8odgtE5/kQwMVK/a0RImnilqW4=; b=N3lFhKe7odcyWJMPYkv144eVwYDUbYu9udw9KzWi8SXHcojd5vXbBbRsrfaqUvXElq F5UKdeu0sPV054TQx8Jd/FcYrsKcnBZhYhET4HbzIDNzjzFNaLD8VelAfQHD9MMSqbQN J8DgS8b9KXOlUvYACrJFKh+UVrA0u5mCq8yNbMhJ1P/+F/flA3Op4sAeZQCeddqjFPBG xZ9+bJdMWJXRubUdHGzwCsL6EBVFGUE9GZkm8A4k8Th/7ayO253PjHvFenTl+Y2/CQxc T5NPVRMDaIzH66H//+PwzyLQaSHa0OkhKWWulpz5ZW/T4C6C9Z1392I3SUKzqswJA/XB VIdA== X-Gm-Message-State: ALoCoQmiTRLDyus1CdveS0OFfQoQTkdWsHUQdsvJZaaRTLFpSNiBd7FxxAqGLs1K9j7g2v3IzQRT9H6gM2UvsgBFS181Psp6BA== X-Received: by 10.194.93.164 with SMTP id cv4mr14595301wjb.98.1450908109375; Wed, 23 Dec 2015 14:01:49 -0800 (PST) Received: from xps13.localnet (APoitiers-658-1-50-6.w86-217.abo.wanadoo.fr. [86.217.129.6]) by smtp.gmail.com with ESMTPSA id w23sm17951902wmd.1.2015.12.23.14.01.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Dec 2015 14:01:48 -0800 (PST) From: Thomas Monjalon To: Yuanhan Liu Date: Wed, 23 Dec 2015 23:00:15 +0100 Message-ID: <1689693.Nk6ErSWZrF@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151223024453.GW18863@yliu-dev.sh.intel.com> References: <1448355603-21275-2-git-send-email-mukawa@igel.co.jp> <20151223024453.GW18863@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Wed, 23 Dec 2015 22:01:49 -0000 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?