From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id F3DC42BCE for ; Tue, 24 Apr 2018 21:37:19 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 97CC921C54; Tue, 24 Apr 2018 15:37:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 24 Apr 2018 15:37:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=m5hP1hIzTtHValpInWAK5CXOUW 8OLCS8SmP/fZLXqTc=; b=HtF00qM1FL9pYfg5T2ZUi6n9xrnXAaDKn+8HJBy6Mh mu8vXw/GzUZtfQb75pl9+swZpMrNFcYAddJfAHj6/9Jca2xK8yuhpjCM1ldsNFmq Auc1OixZl0y2JWztAWwD3etV5RRBy+IjZbOCXTkYOtPb8S7+AQbCum+69YW/vgLO w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=m5hP1h IzTtHValpInWAK5CXOUW8OLCS8SmP/fZLXqTc=; b=dwjXDOjJWEYIF29uP+BLgm XcE8d2nSQ1vUPbIdKsg6/ehtQIV5YFNadQTCKnePEeNKn5Y0/3nk4ZMubacO2JFi VMusP6tdkdcla6bLMpwCLWRNo2k2XC8CVzMcchL6ZmfBDaxZhYNVooMmQUg6hWdk sBJV4Ta18gSGP5X7g+7+GucHyh+YKdW9O2vXcpaLeY8IF+HbuokfgRk6DEKF961s Dd+y8HtsJrVxkbQLuzHAdXtFxKwGSlEczN8kuHbAxOKKYYxesGkhHqtBHMgqtWCA EEu0XqM4iU1kuHCNAW+yctBmJhsxRJU5oy/aKdr2leQSLA+P92//G5mAYUR+0ePQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B7C17E43E8; Tue, 24 Apr 2018 15:37:18 -0400 (EDT) From: Thomas Monjalon To: Declan Doherty , qi.z.zhang@intel.com Cc: dev@dpdk.org, Adrien Mazarguil , Ferruh Yigit , Shahaf Shuler Date: Tue, 24 Apr 2018 21:37:17 +0200 Message-ID: <190601101.P8xlxIF3tq@xps> In-Reply-To: <20180416130605.6509-5-declan.doherty@intel.com> References: <20180328135433.20203-1-declan.doherty@intel.com> <20180416130605.6509-1-declan.doherty@intel.com> <20180416130605.6509-5-declan.doherty@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v7 4/9] ethdev: Add port representor device flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2018 19:37:20 -0000 16/04/2018 15:06, Declan Doherty: > Add new device flag to specify that an ethdev port is a port representor. > Extend rte_eth_dev_info structure to expose device flags to the user which > enables applications to discover if a port is a representor port. [...] > --- a/lib/librte_ether/rte_ethdev.c > +++ b/lib/librte_ether/rte_ethdev.c > @@ -2431,6 +2431,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info) > dev_info->driver_name = dev->device->driver->name; > dev_info->nb_rx_queues = dev->data->nb_rx_queues; > dev_info->nb_tx_queues = dev->data->nb_tx_queues; > + > + dev_info->dev_flags = dev->data->dev_flags; > } [...] > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -1032,6 +1032,7 @@ struct rte_eth_dev_info { > const char *driver_name; /**< Device Driver name. */ > unsigned int if_index; /**< Index to bound host interface, or 0 if none. > Use if_indextoname() to translate into an interface name. */ > + uint32_t dev_flags; /**< Device flags */ A similar field has been added recently: http://dpdk.org/browse/next/dpdk-next-net/tree/lib/librte_ether/rte_ethdev.h#n1074 /** Generic device capabilities */ uint64_t dev_capa; It is for flags DEV_CAPA_* Note that the prefix should be fixed to RTE_ETH_DEV, and the doxygen comment should mention the flags prefix. Qi, please fix. I think dev_capa and dev_flags are the same thing. They could be merged. > /** Device supports link state interrupt */ > -#define RTE_ETH_DEV_INTR_LSC 0x0002 > +#define RTE_ETH_DEV_INTR_LSC 0x0002 > /** Device is a bonded slave */ > -#define RTE_ETH_DEV_BONDED_SLAVE 0x0004 > +#define RTE_ETH_DEV_BONDED_SLAVE 0x0004 > /** Device supports device removal interrupt */ > -#define RTE_ETH_DEV_INTR_RMV 0x0008 > +#define RTE_ETH_DEV_INTR_RMV 0x0008 > +/** Device is port representor */ > +#define RTE_ETH_DEV_REPRESENTOR 0x0010 It seems you tried to re-align but it fails. Better to use spaces for alignment.