From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 7EFF837AC for ; Mon, 4 Sep 2017 12:05:17 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 04 Sep 2017 03:05:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,474,1498546800"; d="scan'208";a="896887320" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 04 Sep 2017 03:05:16 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 03:05:15 -0700 Received: from bgsmsx104.gar.corp.intel.com (10.223.4.190) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 03:05:16 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.62]) by BGSMSX104.gar.corp.intel.com ([169.254.5.94]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 15:35:12 +0530 From: "Yang, Zhiyong" To: "Richardson, Bruce" CC: "Yao, Lei A" , "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Wiles, Keith" , "stephen@networkplumber.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/4] common_base: extend RTE_MAX_ETHPORTS from 32 to 1024 Thread-Index: AQHTJVHiJfsn2VqxlESVHPjzzVa456KkW9wg//+4NICAAGb48A== Date: Mon, 4 Sep 2017 10:05:11 +0000 Message-ID: References: <20170809084203.17562-1-zhiyong.yang@intel.com> <20170904055734.21354-1-zhiyong.yang@intel.com> <20170904055734.21354-4-zhiyong.yang@intel.com> <2DBBFF226F7CF64BAFCA79B681719D953A266703@shsmsx102.ccr.corp.intel.com> <20170904090903.GB17464@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: <20170904090903.GB17464@bricha3-MOBL3.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzZhYTg1ZGEtZTY0OS00ZDY1LWFlN2YtYjY2MDYxNjRiMmIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IitDVVwvYm04c1N1U1pGVFg5XC9Mcmt2dEp6NmpjdmZRRUJLXC81Y1RDNkxuWVk9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/4] common_base: extend RTE_MAX_ETHPORTS from 32 to 1024 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: Mon, 04 Sep 2017 10:05:18 -0000 Hi, Bruce: > -----Original Message----- > From: Richardson, Bruce > Sent: Monday, September 4, 2017 5:09 PM > To: Yang, Zhiyong > Cc: Yao, Lei A ; dev@dpdk.org; thomas@monjalon.net; > Yigit, Ferruh ; Wiles, Keith ; > stephen@networkplumber.org > Subject: Re: [dpdk-dev] [PATCH v2 3/4] common_base: extend > RTE_MAX_ETHPORTS from 32 to 1024 > > > > --- a/config/common_base > > > > +++ b/config/common_base > > > > @@ -131,7 +131,7 @@ CONFIG_RTE_LIBRTE_KVARGS=3Dy # > > > > CONFIG_RTE_LIBRTE_ETHER=3Dy CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=3Dn > > > > -CONFIG_RTE_MAX_ETHPORTS=3D32 > > > > +CONFIG_RTE_MAX_ETHPORTS=3D1024 > > > > CONFIG_RTE_MAX_QUEUES_PER_PORT=3D1024 > > > > CONFIG_RTE_LIBRTE_IEEE1588=3Dn > > > > CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=3D16 > > > > -- > > > > 2.13.3 > > > Hi, Zhiyong > > > > > > I met one issue for changing CONFIG_RTE_MAX_ETHPORTS to 1024. > > > One process can only open 1024 file as maximum in common linux > > > distribution, after practice, only 1009 socket file can be used for > > > vdev device with testpmd sample. > > > > Thanks for your info. It seems that 1024 is too large and may bring so= me > potential issues. > > > > Thanks > > Zhiyong > > >=20 > It should be possible to have a dynamically allocated ethdev array, which= would > allow use to have a default value - which could be e.g. 32 or 64 as now -= while > also allowing a run-time parameter to increase that to thousands if neede= d. >=20 > /Bruce In testpmd, the following function will be called to validate the port_id.= =20 So, It is necessary to modify the max port num RTE_MAX_ETHPORTS.=20 I think that RTE_MAX_ETHPORTS and a default value(num of port ) should be = different values. Now dpdk limits the max num to RTE_MAX_ETHPORTS =3D 32 by default. =20 int rte_eth_dev_is_valid_port(uint16_t port_id) { if (port_id >=3D RTE_MAX_ETHPORTS || (rte_eth_devices[port_id].state !=3D RTE_ETH_DEV_ATTACHED && rte_eth_devices[port_id].state !=3D RTE_ETH_DEV_DEFERRED)) return 0; else return 1; } Thanks Zhiyong.