From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id BBCC37E99 for ; Wed, 15 Oct 2014 11:52:23 +0200 (CEST) Received: by mail-wg0-f41.google.com with SMTP id b13so941252wgh.12 for ; Wed, 15 Oct 2014 03:00:12 -0700 (PDT) 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=zc07hlbSaG75cpvTdLdHbo0ZKXh0sK6BHPHMNL1wghg=; b=LXYlFmvkOdgirVaH19fmSSMuzHijiWSXFA8NI9VNFiDu//QzAa99aylLQEaXwAi4YI gEde2hemrC4tr4GAB5n+xrW/ta8XfAy6dSAfMg+G0QSicU1FpmQ/qS/auGVrLm7B4nEU QiwKX9X0tSmhIGGx5X19UYUiQ84sWXm0g/puNp09UpAjRf0MR1y6Bq0+ACrWNPLvZVVx LjU52lsVjkEsf0MtKLKnUByyaEyK4B1FSkDBqHDu5Q/7f+EK/w3S65YQG/uf/bMYr1wu cD04EhWaDjc5oQeYinKeFy69KmbU6yHekG5tlW335H5HxezUq+Onxh9wu0jlo0zbalAs 7GmA== X-Gm-Message-State: ALoCoQnqx3cEyV7cCOKPaprgV4Qx6FYPn262h5pP54zA+KcVJjgKv1v2VO+WU7Zku93lfW35wvdq X-Received: by 10.194.81.70 with SMTP id y6mr1701158wjx.113.1413367212099; Wed, 15 Oct 2014 03:00:12 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id fa7sm23262027wjd.27.2014.10.15.03.00.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Oct 2014 03:00:11 -0700 (PDT) From: Thomas Monjalon To: "Chen, Jing D" Date: Wed, 15 Oct 2014 11:59:54 +0200 Message-ID: <2528969.6AYAK7jRAV@xps13> Organization: 6WIND User-Agent: KMail/4.14.1 (Linux/3.16.4-1-ARCH; KDE/4.14.1; x86_64; ; ) In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D015F36E1@shsmsx102.ccr.corp.intel.com> References: <1411478047-1251-1-git-send-email-jing.d.chen@intel.com> <10317086.OmtuOpvoDk@xps13> <4341B239C0EFF9468EE453F9E9F4604D015F36E1@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/6] ether: enhancement for VMDQ support 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, 15 Oct 2014 09:52:24 -0000 2014-10-15 09:47, Chen, Jing D: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2014-10-15 06:59, Chen, Jing D: > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > > enum rte_eth_rx_mq_mode { > > > > > - ETH_MQ_RX_NONE = 0, /**< None of DCB,RSS or VMDQ mode */ > > > > > - > > > > > - ETH_MQ_RX_RSS, /**< For RX side, only RSS is on */ > > > > > - ETH_MQ_RX_DCB, /**< For RX side,only DCB is on. */ > > > > > - ETH_MQ_RX_DCB_RSS, /**< Both DCB and RSS enable */ > > > > > - > > > > > - ETH_MQ_RX_VMDQ_ONLY, /**< Only VMDQ, no RSS nor DCB */ > > > > > - ETH_MQ_RX_VMDQ_RSS, /**< RSS mode with VMDQ */ > > > > > - ETH_MQ_RX_VMDQ_DCB, /**< Use VMDQ+DCB to route traffic to queues */ > > > > > - ETH_MQ_RX_VMDQ_DCB_RSS, /**< Enable both VMDQ and DCB in VMDq */ > > > > > + /**< None of DCB,RSS or VMDQ mode */ > > > > > + ETH_MQ_RX_NONE = 0, > > > > > + > > > > > + /**< For RX side, only RSS is on */ > > > > > + ETH_MQ_RX_RSS = ETH_MQ_RX_RSS_FLAG, > > > > > + /**< For RX side,only DCB is on. */ > > > > > + ETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG, > > > > > + /**< Both DCB and RSS enable */ > > > > > + ETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG, > > > > > + > > > > > + /**< Only VMDQ, no RSS nor DCB */ > > > > > + ETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG, > > > > > + /**< RSS mode with VMDQ */ > > > > > + ETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG, > > > > > + /**< Use VMDQ+DCB to route traffic to queues */ > > > > > + ETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG, > > > > > + /**< Enable both VMDQ and DCB in VMDq */ > > > > > + ETH_MQ_RX_VMDQ_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG | > > > > > + ETH_MQ_RX_VMDQ_FLAG, > > > > > }; > > > > > > > > Why not simply remove all these combinations and keep only flags? > > > > Please keep it simple. > > > > > > One reason is back-compatibility. > > > > I understand but I think we should prefer cleanup. > > As there is no way to advertise deprecation of flags, it should be > > simply removed. > > > > > Another reason is not all NIC driver support all the combined modes, only > > > limited sets > > > driver supported. Under this condition, it's better to use the combination > > > definition > > > (VMDQ_DCB, DCB_RSS, etc) to let driver check whether it supports. > > > > Driver can do the same checks with simple flags and it's probably simpler > > (e.g. a driver which doesn't support VMDQ had no need to check all VMDQ > > combinations). [...] > case ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG: [...] > Won't it look weird for reading? In fact, it's more complex in > rte_eth_dev_check_mq_mode(), > With the change, the code will look weird. I think that defining all combinations of flags is more weird. > In fact, I don't see benefit with the change to old code. New PMD driver > can use simple flag while old driver (IXGBE/IGB) can use original definition. If nobody else agree with my point of view, I'll accept yours. -- Thomas