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 5FA1D2C2F for ; Tue, 24 Apr 2018 21:58:46 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 77CF120D7D; Tue, 24 Apr 2018 15:58:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 24 Apr 2018 15:58:45 -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=Rp6sZX9xEehygbWEAXjpwzJj/Y BgBjHsW1I1Mn/YsV4=; b=axQZ+GKo8xmB8QL7C6cNDH2VShi6l039PYhnt5ty7J T7JqMo3jpeCz4DTIWWCb/iJ6H8t8QAGlW3CDnccXZ4COqOdB0gyGxVzSdJGNODMQ 4Ad0AxhF0izLjxC37895J1FzFYmkKDsVpjLLd85KBPJUyi5L+KMfzZMt6Z2/3WFU Q= 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=Rp6sZX 9xEehygbWEAXjpwzJj/YBgBjHsW1I1Mn/YsV4=; b=LJj5lf7mYC3WQQm6X9E1mu WpWVxMM/wtPD5PPQdALmSy7z+QfwWoN89cnvIXyvvBPxdjOYBht6ZCURvps9KBtO ifw/MRwsDNwn6WqicsTc+pLTTIGfJ/ZLh12IKmTtVSuGjcJma8NwOS/nUoddWl44 OhpUy4NQItGR81vdj2tHWS6ox8kC/A8NbJsB+RvND3WhM6kzYgw9oZpEk2lJQv8I FTk7Q7WB8MQtxhm7527f2yg4plud9U9GoDevyEZyWpGOC0sS2I6jVbhBnEb4Iqb6 cpeQ0lvtk6UstKs8G+9YnIw1vpLw8YjY2NPScj1ZPbRoevnZtE9NIGqrwG2mLK4A == 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 B256EE4488; Tue, 24 Apr 2018 15:58:44 -0400 (EDT) From: Thomas Monjalon To: Declan Doherty Cc: dev@dpdk.org, Adrien Mazarguil , Ferruh Yigit , Shahaf Shuler Date: Tue, 24 Apr 2018 21:58:43 +0200 Message-ID: <2773298.vxQ3uyuFp7@xps> In-Reply-To: <20180416130605.6509-8-declan.doherty@intel.com> 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-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v7 7/9] ethdev: add switch domain allocator 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:58:46 -0000 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?