From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E44195681 for ; Thu, 22 Sep 2016 16:22:43 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 22 Sep 2016 07:22:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,378,1470726000"; d="scan'208";a="171951536" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga004.fm.intel.com with ESMTP; 22 Sep 2016 07:22:43 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.248]) by IRSMSX109.ger.corp.intel.com ([169.254.13.6]) with mapi id 14.03.0248.002; Thu, 22 Sep 2016 15:21:34 +0100 From: "Kerlin, MarcinX" To: "Pattan, Reshma" , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" , "De Lara Guarch, Pablo" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] librte_ether: ensure not overwrite device data in mp app Thread-Index: AQHSE17MIUvVN4VlXU6BxWRgDYewZ6CFj5ew Date: Thu, 22 Sep 2016 14:21:34 +0000 Message-ID: <68D830D942438745AD09BAFA99E33E812AA35B@IRSMSX102.ger.corp.intel.com> References: <1472806710-25866-2-git-send-email-marcinx.kerlin@intel.com> <1474381895-16066-1-git-send-email-marcinx.kerlin@intel.com> <1474381895-16066-2-git-send-email-marcinx.kerlin@intel.com> <3AEA2BF9852C6F48A459DA490692831F010A5A06@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F010A5A06@IRSMSX109.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/2] librte_ether: ensure not overwrite device data in mp app X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 14:22:44 -0000 Hi, > -----Original Message----- > From: Pattan, Reshma > Sent: Tuesday, September 20, 2016 6:48 PM > To: Kerlin, MarcinX ; dev@dpdk.org > Cc: thomas.monjalon@6wind.com; De Lara Guarch, Pablo > ; Kerlin, MarcinX > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] librte_ether: ensure not overwrite > device data in mp app >=20 > Hi, >=20 > > + > > + if (dev_data_id =3D=3D RTE_MAX_ETHPORTS) { > > + RTE_PMD_DEBUG_TRACE("Reached maximum number of > > Ethernet ports by all " > > + "the processes\n"); > > + return NULL; > > + } > > + > > >=20 > Can the log message be changed to ("Cannot allocate more than %d number o= f > devices ", RTE_MAX_ETHPORTS). > Instead of mentioning about the processes? First message announces that it exceeded the limit in one application: 1) if (port_id =3D=3D RTE_MAX_ETHPORTS) { RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports\n"); return NULL; } Second announces that it exceeded the limit in all applications: 2) if (dev_data_id =3D=3D RTE_MAX_ETHPORTS) { RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports by all " "the processes\n"); return NULL; } "Cannot allocate more than %d number of devices" In my opinion this message= is general and=20 says nothing other than first (1). Maybe only leave such a message instead of the above 2, which check only co= mmon array as=20 common array will be faster filled up than local to each process if (dev_data_id =3D=3D RTE_MAX_ETHPORTS) { RTE_PMD_DEBUG_TRACE("Cannot allocate more than %d number of devices \n"); return NULL; } Regards, Marcin >=20 > Thanks, > Reshma