From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id DC47F8DB1 for ; Mon, 2 Nov 2015 18:44:07 +0100 (CET) Received: by wijp11 with SMTP id p11so56570568wij.0 for ; Mon, 02 Nov 2015 09:44:07 -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=IeTSWEOCUxM26jTmMZ5OliuRqXqBjMEZyMLECDShXes=; b=NcvPgmiv8EId24ST9PylFf9lvYIks4T1SJXGUffzEr6g3vC+IgNt+nx4uXU78XKGaC TBGdrAMlk66VoxzSoCz8mbKwa3jy1ofusURI43O/0fwCa89rbSqjnUGzjdFzO0jKZRVk ZS3HXNuHIwVNZtrZS0m3grHq81RPReMQz4DS8sUoUfPLayon3kmUWWOfY9wC/BhuGIH3 nHqICx5pWrEJfNYDR4wHdnchCHtB8pBm7CJJDzwYpJGig4VtqIZc8mqliPN5BppSl1jz M8/CMlSB4kLp6xRC8FCVJoOQ1tLWolZya1IATxs/owhtJEhmbi/q0bzdq0OfXrhobLZn MkMg== 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=IeTSWEOCUxM26jTmMZ5OliuRqXqBjMEZyMLECDShXes=; b=KSqQfgRp1O94yL2/3LoYdK1AatchFRahgRf0lKE41SAeJtox4uZf1Yrz+cPVc9ZchR zafHX3f/vZyvffZ8c26tHpV7EjqOOj5XfRabpv5LolP5f87BLeLfBW7EHTcqKn4rJUqR NZkFiKRVl5RxRQJFevds8X/FBLYaC8i6oI1mmF2V6mjBD5rfj+sVnJvO8JvcI57Us/IG YZqh74kzjBi/t+zVXXbEfqHIblJghfRmAbH0ETIBfZH9eepBxwHmovZy9ZZtCtHSuEtp UR/lZzIx58DjY22TyKFqOVndKNKgiQOJav7zYpDnsYV8T6w/PTff9Y5aK0AxzML4mzS/ dPlg== X-Gm-Message-State: ALoCoQmSap+qUqN213fGDA6YwR2KIXq3V9+rUq3IknnT+ifRNtzVC3vksSJ7cW/yKtPKLuQGnG8w X-Received: by 10.194.2.169 with SMTP id 9mr14090881wjv.78.1446486247700; Mon, 02 Nov 2015 09:44:07 -0800 (PST) Received: from xps13.localnet (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id v191sm19264198wmd.24.2015.11.02.09.44.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 09:44:07 -0800 (PST) From: Thomas Monjalon To: "Iremonger, Bernard" Date: Mon, 02 Nov 2015 18:42:56 +0100 Message-ID: <4517512.rHI39xAYOX@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <8CEF83825BEC744B83065625E567D7C219F7716B@IRSMSX108.ger.corp.intel.com> References: <1446217733-9887-3-git-send-email-bernard.iremonger@intel.com> <22264893.CRHp7yC71q@xps13> <8CEF83825BEC744B83065625E567D7C219F7716B@IRSMSX108.ger.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 v7 02/28] librte_ether: add fields from rte_pci_driver to rte_eth_dev_data 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: Mon, 02 Nov 2015 17:44:08 -0000 2015-11-02 16:44, Iremonger, Bernard: > Hi Thomas, > > > > > Subject: Re: [dpdk-dev] [PATCH v7 02/28] librte_ether: add fields from > > rte_pci_driver to rte_eth_dev_data > > > > 2015-11-02 10:36, Iremonger, Bernard: > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > 2015-10-30 15:08, Bernard Iremonger: > > > > > add dev_flags to rte_eth_dev_data, add macros for dev_flags. > > > > > add kdrv to rte_eth_dev_data. > > > > > add numa_node to rte_eth_dev_data. > > > > > add drv_name to rte_eth_dev_data. > > > > > > > > A commit message should explain why things are done. > > > > > > > > > + uint32_t dev_flags; /**< Flags controlling handling of device. > > > > > +*/ > > > > > > > > Where are defined this flags? What is the scope? > > > > > > These flags are defined in the following file: > > > > > > lib/librte_ether/rte_ethdev.h > > > > > > These flags are visible to all the vdevs and pdevs. > > > > I mean it should be more explicit. Having an enum name will help. > > Note: I understand your patch. I'm just asking the questions an user will ask > > when trying to use your new API. > > Thanks > > I will try to be clearer in the commit message. > I tried an enum for the dev_flags but it does not work well. > There can be multiple flags set in dev_flags, it is intended to be a bit field similar to the pci flags. Yes. You can assign some bits in an enum. But if you prefer the defines, it's also OK if they are clearly identifiable: with a prefix and good comments allowing to map the structure field and the flags. > I have squashed down to 19 patches now, I don't want to over squash. The proposal of 5 patches was good.