From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id A5F6DE5D for ; Fri, 8 Dec 2017 16:34:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2017 07:33:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,378,1508828400"; d="scan'208";a="10811795" Received: from awalabdu-mobl.ger.corp.intel.com (HELO [163.33.228.212]) ([163.33.228.212]) by fmsmga004.fm.intel.com with ESMTP; 08 Dec 2017 07:33:58 -0800 To: Ferruh Yigit , dev@dpdk.org Cc: Declan Doherty References: <1510929733-7225-1-git-send-email-mohammad.abdul.awal@intel.com> <7c9ed339-3fb6-2768-4a72-407111b1a33b@intel.com> From: Mohammad Abdul Awal Message-ID: <61e87b33-30e0-3398-3484-ce851728741e@intel.com> Date: Fri, 8 Dec 2017 15:33:58 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <7c9ed339-3fb6-2768-4a72-407111b1a33b@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: added switch_domain and representor port 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: Fri, 08 Dec 2017 15:34:01 -0000 On 20/11/2017 19:57, Ferruh Yigit wrote: > On 11/17/2017 6:42 AM, Mohammad Abdul Awal wrote: >> switch_domain attribute has been added to specify that a rte_eth_dev >> instance belongs to a switch domain in the software switch. >> >> RTE_ETH_DEV_REPRESENTOR_PORT has been defined to specify that a >> rte_eth_dev instance is a representor device. >> >> Signed-off-by: Mohammad Abdul Awal >> Signed-off-by: Declan Doherty >> --- >> lib/librte_ether/rte_ethdev.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h >> index 341c2d6..7e82c70 100644 >> --- a/lib/librte_ether/rte_ethdev.h >> +++ b/lib/librte_ether/rte_ethdev.h >> @@ -1047,6 +1047,7 @@ struct rte_eth_dev_info { >> /** Configured number of rx/tx queues */ >> uint16_t nb_rx_queues; /**< Number of RX queues. */ >> uint16_t nb_tx_queues; /**< Number of TX queues. */ >> + uint16_t switch_domain; /**< Switch domain which port belongs to. */ > What to put or not into rte_eth_dev_info is not that clear, but recent > description from Andrew [1] makes sense to me: using more device related static > information in dev_info instead of dynamic data. > > There is an option to create a new API for this, what do you think? > > [1] > http://dpdk.org/ml/archives/dev/2017-November/081868.html > >> }; >> >> /** >> @@ -1810,6 +1811,7 @@ struct rte_eth_dev_data { >> int numa_node; /**< NUMA node connection */ >> struct rte_vlan_filter_conf vlan_filter_conf; >> /**< VLAN filter configuration. */ >> + uint16_t switch_domain; /**< Switch domain which port belongs to. */ > Can you please describe why "switch_domain" used for? In patchset only ixgbe > uses it, and that is only for assign to dev_info, it is not clear why this is > needed. We kept it keeping in mind for future use, specially for switchdev API and OVS support. But for this patch it is not necessary to be here. We will remove it from here now. New patch will be submitted if needed in future. >> }; >> >> /** Device supports link state interrupt */ >> @@ -1818,6 +1820,8 @@ struct rte_eth_dev_data { >> #define RTE_ETH_DEV_BONDED_SLAVE 0x0004 >> /** Device supports device removal interrupt */ >> #define RTE_ETH_DEV_INTR_RMV 0x0008 >> +/** Device is a port representor */ >> +#define RTE_ETH_DEV_REPRESENTOR_PORT 0x0010 > As far as I can see this is not a generic device option, but just a way to mark > a specific virtual PMD. There must be a better way to do this, I think this flag > is not good idea. Thanks Ferruh. We will also remove this flag option. Without this flag option, we can still identify the PMD as a port representor type or not by looking at the device name. >> >> /** >> * @internal >> >