From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3] ethdev: report error on name truncation Date: Thu, 17 Jan 2019 17:07:34 +0000 Message-ID: References: <20190107143951.30076-1-ndabilpuram@marvell.com> <20190117141316.24187-1-ndabilpuram@marvell.com> <1842598.N7HBfy6t9g@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, Andrew Rybchenko , Jerin Jacob Kollanukkaran To: Thomas Monjalon , Nithin Kumar Dabilpuram Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 96AB729AC for ; Thu, 17 Jan 2019 18:07:37 +0100 (CET) In-Reply-To: <1842598.N7HBfy6t9g@xps> Content-Language: en-US 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 1/17/2019 3:38 PM, Thomas Monjalon wrote: > 17/01/2019 15:13, 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 >> --- >> + rc = snprintf(z_name, sizeof(z_name), "eth_p%d_q%d_%s", >> + dev->data->port_id, queue_id, ring_name); >> + >> + if (rc >= RTE_MEMZONE_NAMESIZE) { >> + RTE_ETHDEV_LOG(ERR, "ring name too long\n"); >> + rte_errno = ENAMETOOLONG; >> + return NULL; >> + } > > Usually we don't insert a blank line before a test of a return value. > It's really a nitpick, so Ferruh, it's up to you to keep it or not when applying. > > Acked-by: Thomas Monjalon > Applied to dpdk-next-net/master, thanks. (Blank line removed while merging)