From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH v2 3/4] common_base: extend RTE_MAX_ETHPORTS from 32 to 1024 Date: Wed, 6 Sep 2017 14:12:02 +0530 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> <2601191342CEEE43887BDE71AB9772584F244EC0@irsmsx105.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: "Yao, Lei A" , "dev@dpdk.org" , "thomas@monjalon.net" , "Yigit, Ferruh" , "Wiles, Keith" , "stephen@networkplumber.org" To: "Ananyev, Konstantin" , "Yang, Zhiyong" , "Richardson, Bruce" Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0087.outbound.protection.outlook.com [104.47.36.87]) by dpdk.org (Postfix) with ESMTP id DD6BCFFA for ; Wed, 6 Sep 2017 10:42:09 +0200 (CEST) In-Reply-To: <2601191342CEEE43887BDE71AB9772584F244EC0@irsmsx105.ger.corp.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" On 9/4/2017 3:57 PM, Ananyev, Konstantin wrote: > Hi Zhiong, > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yang, Zhiyong >> Sent: Monday, September 4, 2017 11:05 AM >> To: Richardson, Bruce >> 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 >> >> 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=y # >>>>>> CONFIG_RTE_LIBRTE_ETHER=y CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n >>>>>> -CONFIG_RTE_MAX_ETHPORTS=32 >>>>>> +CONFIG_RTE_MAX_ETHPORTS=1024 >>>>>> CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 >>>>>> CONFIG_RTE_LIBRTE_IEEE1588=n >>>>>> CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 >>>>>> -- >>>>>> 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 some >>> potential issues. >>>> >>>> Thanks >>>> Zhiyong >>>> >>> >>> 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 needed. >>> >>> /Bruce >> >> In testpmd, the following function will be called to validate the port_id. >> So, It is necessary to modify the max port num RTE_MAX_ETHPORTS. > > There are quite a lot memory allocations (both static an dynamic) inside DPDK libs and sample apps > that use RTE_MAX_ETHPORTS. > Increasing RTE_MAX_ETHPORTS would increase DPDK memory requirements quite significantly. It is not a good idea to significantly increase the DPDK memory requirement. Can you not make it with "CONFIG_RTE_MAX_ETHPORTS=1024" for your testing configs? > Why do you think it is *necessary* to increase default RTE_MAX_ETHPORTS to 1024? > Konstantin > >> >> 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 = 32 by default. >> int >> rte_eth_dev_is_valid_port(uint16_t port_id) >> { >> if (port_id >= RTE_MAX_ETHPORTS || >> (rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED && >> rte_eth_devices[port_id].state != RTE_ETH_DEV_DEFERRED)) >> return 0; >> else >> return 1; >> } >> >> Thanks >> Zhiyong. >