From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 02/20] librte_ether: add fields from rte_pci_driver to rte_eth_dev_data Date: Wed, 30 Sep 2015 10:56:04 +0100 Message-ID: <20150930095603.GA10264@bricha3-MOBL3> References: <1443445418-18498-1-git-send-email-bernard.iremonger@intel.com> <1443445418-18498-3-git-send-email-bernard.iremonger@intel.com> <20150929190812.GA3154@hmsreliant.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Neil Horman Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B679A8D91 for ; Wed, 30 Sep 2015 11:56:07 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20150929190812.GA3154@hmsreliant.think-freely.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Sep 29, 2015 at 03:08:12PM -0400, Neil Horman wrote: > On Mon, Sep 28, 2015 at 02:03:20PM +0100, Bernard Iremonger wrote: > > 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. > > use dev_type to distinguish between vdev's and pdev's. > > remove pci_dev branches. > > > > Signed-off-by: Bernard Iremonger > > --- > > lib/librte_ether/rte_ethdev.c | 53 ++++++++++++++++++++++++------------------- > > lib/librte_ether/rte_ethdev.h | 15 ++++++++++++ > > 2 files changed, 45 insertions(+), 23 deletions(-) > > > > +++ b/lib/librte_ether/rte_ethdev.h > > @@ -1635,8 +1635,23 @@ struct rte_eth_dev_data { > > all_multicast : 1, /**< RX all multicast mode ON(1) / OFF(0). */ > > dev_started : 1, /**< Device state: STARTED(1) / STOPPED(0). */ > > lro : 1; /**< RX LRO is ON(1) / OFF(0) */ > > + uint32_t dev_flags; /**< Flags controlling handling of device. */ > > + enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */ > Why add this here? The ennumerated driver types are all variants on PCI bus > types. Not sure why the ethernet interface needs to know this info > > > + int numa_node; > Ditto, this seems like information that is only relevant if the device is on a > physical bus (i.e. virual devices are likely to not have a numa node) > Actually, I disagree. For some virtual devices they will have a numa node. For ring or other virtual PMDs the numa node will be the node on which the ring / mempool etc. memory is allocated on, and can be of relevance. /Bruce