From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id E31481B118 for ; Sun, 13 Jan 2019 21:03:00 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2E2BC289D7; Sun, 13 Jan 2019 15:02:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 13 Jan 2019 15:02:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=zrUVSCm7OQlTu9r0BJETTaI0lPeA2KNWzA0h+WLD5bQ=; b=RTXpTGd2Jy6j QgrRfnIUnKvh/pfheRLZZzjDoYOeIaE4PaBH1OfL5SMnT7JlzG6jobLTZ2i60x+A Ywjm4uaOEtKUz/CtqUJR3d5jAbTYBFITu65YhrKfibqr4rI5rkxld6i76PVWbUt6 V1tm/ZTe63/J5zeYwHK/ph2IbUrF3M4= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=zrUVSCm7OQlTu9r0BJETTaI0lPeA2KNWzA0h+WLD5 bQ=; b=e1w8Op1H4QgLDeONaykHoXQYyk+M1F92j0hb+ArEd0/esApvAkyq+bKYj bpXvsOZs2RfmGJB0dAmr9e8TXo+L07YRWf+uykId372znPtRo3bzdRP/FhWOfVSh Y0C8hHBWuDRY+fbnLXRxGL3v2tA1o1Tpq/5EQp7KMB1jqlIEjbgtkPZw7xAyjEUR pgmO0+XcEfJtxsubT2JP1Zls3kKDbbUrJZfL7lfxQBkIqtWNN7FQWTf5kK1Nj0vE DpD3zIj3joHasunLJem7eIzVfHWcpBkgjTo0NUKFNw/lSRiUW+E9jjbzxHvHSv4m TAJHM7fpx4cjCvNqYn0AEjEIn5Wsg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrfeelgddufeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CA93B1027C; Sun, 13 Jan 2019 15:02:56 -0500 (EST) From: Thomas Monjalon To: "Wiles, Keith" Cc: Nithin Kumar Dabilpuram , "Yigit, Ferruh" , Andrew Rybchenko , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Date: Sun, 13 Jan 2019 21:02:53 +0100 Message-ID: <8373161.2Fht6qqTaI@xps> In-Reply-To: <0D9DB313-B5F8-4AD0-871F-CEECC49B4359@intel.com> References: <20190107143951.30076-1-ndabilpuram@marvell.com> <20190113153749.3540-1-ndabilpuram@marvell.com> <0D9DB313-B5F8-4AD0-871F-CEECC49B4359@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:03:01 -0000 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 >= RTE_MEMZONE_NAMESIZE) { > > + RTE_ETHDEV_LOG(ERR, "truncated name"); > > + rte_errno = ENAMETOOLONG; > > + return NULL; > > + } > > 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 :-) 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?