From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7492B1B427 for ; Sun, 13 Jan 2019 21:19:03 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jan 2019 12:19:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,474,1539673200"; d="scan'208";a="116458922" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 13 Jan 2019 12:19:03 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 13 Jan 2019 12:19:02 -0800 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.160]) by FMSMSX102.amr.corp.intel.com ([169.254.10.43]) with mapi id 14.03.0415.000; Sun, 13 Jan 2019 12:19:01 -0800 From: "Wiles, Keith" To: Thomas Monjalon CC: Nithin Kumar Dabilpuram , "Yigit, Ferruh" , Andrew Rybchenko , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Thread-Topic: [dpdk-dev] [PATCH v2] ethdev: report error on name truncation Thread-Index: AQHUq1YRrlIJ7r+7kUSSCn3crITtCaWuG9kAgAAJhoCAAASBAA== Date: Sun, 13 Jan 2019 20:19:01 +0000 Message-ID: <17CD35BA-B70C-4F7C-A90B-636BB02148C8@intel.com> References: <20190107143951.30076-1-ndabilpuram@marvell.com> <20190113153749.3540-1-ndabilpuram@marvell.com> <0D9DB313-B5F8-4AD0-871F-CEECC49B4359@intel.com> <8373161.2Fht6qqTaI@xps> In-Reply-To: <8373161.2Fht6qqTaI@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.183.40] Content-Type: text/plain; charset="us-ascii" Content-ID: <304BD87B98BD354EA04242247B6A159A@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] ethdev: report error on name truncation 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: Sun, 13 Jan 2019 20:19:04 -0000 > On Jan 13, 2019, at 2:02 PM, Thomas Monjalon wrote: >=20 > 13/01/2019 20:28, Wiles, Keith: >>> On Jan 13, 2019, at 9:38 AM, Nithin Kumar Dabilpuram wrote: >>> --- a/lib/librte_ethdev/rte_ethdev.c >>> +++ b/lib/librte_ethdev/rte_ethdev.c >>> + if (rc >=3D RTE_MEMZONE_NAMESIZE) { >>> + RTE_ETHDEV_LOG(ERR, "truncated name"); >>> + rte_errno =3D ENAMETOOLONG; >>> + return NULL; >>> + } >>=20 >> I we are already returning an error here should the RTE_LOG be DEBUG >> and not ERR. >> Of course this does mean we would have to check return codes :-) >=20 > In the general case, we should always log the errors as RTE_LOG_ERR, > no matter it is handled and logged again at an upper level. > Don't you think so? My only concern is cluttering up the console output and developers should b= e checking return codes, which I know we do not do sometimes in DPDK. I think we need to do some cleaning up of DPDK and test return codes or mak= e the function return void, but that is a different problem then this one. If we are fine with this type of log style then we can leave it. To me is j= ust seem redundant if we are returning a code the calling function should r= eport the error. In some cases we will get two or more messages about the s= ame problem depending on the call path. >=20 >=20 Regards, Keith