From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ethdev: report error on name truncation Date: Mon, 14 Jan 2019 15:30:13 +0100 Message-ID: <2210030.V8WD4YKsKK@xps> References: <20190107143951.30076-1-ndabilpuram@marvell.com> <20190113153749.3540-1-ndabilpuram@marvell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Ferruh Yigit , Andrew Rybchenko , Jerin Jacob Kollanukkaran To: Nithin Kumar Dabilpuram Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id F2A8F1B20D for ; Mon, 14 Jan 2019 15:30:16 +0100 (CET) In-Reply-To: <20190113153749.3540-1-ndabilpuram@marvell.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" 13/01/2019 16:38, Nithin Kumar Dabilpuram: > Currently this api doesn't report error if name is > truncated and so user is not sure about uniqueness > of name. This change reports error to help user. > > Signed-off-by: Nithin Dabilpuram > --- > + if (rc >= RTE_MEMZONE_NAMESIZE) { > + RTE_ETHDEV_LOG(ERR, "truncated name"); It would be better understandable from an user perspective by saying "ring name too long". And it would be even better with \n at the end ;) > + rte_errno = ENAMETOOLONG; > + return NULL; > + }