From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7 7/9] ethdev: add switch domain allocator Date: Tue, 24 Apr 2018 21:58:43 +0200 Message-ID: <2773298.vxQ3uyuFp7@xps> References: <20180328135433.20203-1-declan.doherty@intel.com> <20180416130605.6509-1-declan.doherty@intel.com> <20180416130605.6509-8-declan.doherty@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Adrien Mazarguil , Ferruh Yigit , Shahaf Shuler To: Declan Doherty Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5FA1D2C2F for ; Tue, 24 Apr 2018 21:58:46 +0200 (CEST) In-Reply-To: <20180416130605.6509-8-declan.doherty@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 16/04/2018 15:06, Declan Doherty: > +/** > + * Array of switch domains available for allocation. Array is sized to > + * RTE_MAX_ETHPORTS elements as there cannot be more active switch domains than > + * ethdev ports in a single process. > + */ > +struct rte_eth_dev_switch { > + enum rte_eth_switch_domain_state state; > +} rte_eth_switch_domains[RTE_MAX_ETHPORTS]; [...] > --- a/lib/librte_ether/rte_ethdev_version.map > +++ b/lib/librte_ether/rte_ethdev_version.map > @@ -236,5 +236,8 @@ EXPERIMENTAL { > rt_eth_devargs_parse; > rte_eth_dev_create; > rte_eth_dev_destroy; > + rte_eth_switch_domain_alloc; > + rte_eth_switch_domain_free; > + rte_eth_switch_domains; Why the table rte_eth_switch_domains is exported? Can we use an iterator function + macro instead?