From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 977F5A3 for ; Thu, 17 Jan 2019 16:38:59 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4FB1E1324; Thu, 17 Jan 2019 10:38:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 17 Jan 2019 10:38: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=rhkLFH9Zi15teFk9EcE7MejNKHRxnVqZeVnpBgyhv/8=; b=qHQrbWw0Fbzb 2yzGP78L0TJg5IVHxMaPPXn2lVmWvP3huu+goPz2ul1Ed3sQ98eH8lTgEN7XRQlw 5MS/13b4iN1exheuEBmewKQPHsw1eulrK2ocMaPzHGobSmt+k/sgJF+M9FoHSg1+ X5msZpBzQUyIdfakelpGtx9r8k3xTAs= 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=rhkLFH9Zi15teFk9EcE7MejNKHRxnVqZeVnpBgyhv /8=; b=uz3RHadtSYWbsDZLQoJmHP/Pi2GLxzM0Z9CdCqocf3zVut4YKkhRyRBcq Dmv/uK6ohwf8rqJW9G/LVesh9wnTpaHe4taewi9LExpcuXaiKPfrOBbGagWdeyQ5 mzP1xw6GO/2o42lafNQmGaRm58dMfpo8q1pzB3Ok++AMsHjo/vPpjiOSb85Ds8sg VQ9j7qgXuqPnYF3aAHGKmoox/u+IEPtm0bPBDO842Zack5M91eTQilYEamIUxRYO 9DsaoNWT2q8Tq/Qp/uZNdaBcIDnRlQ3CbVT39LMe/pSMd6uCsYgEVxxPhZOAIHoP WZDR9siS7NTC9yeryPypijEopT1wg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrgeekgdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfh gggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceo thhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfe drudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvthenucevlhhushhtvghrufhiiigvpedt 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 712DC102A0; Thu, 17 Jan 2019 10:38:56 -0500 (EST) From: Thomas Monjalon To: Nithin Kumar Dabilpuram , Ferruh Yigit Cc: dev@dpdk.org, Andrew Rybchenko , Jerin Jacob Kollanukkaran Date: Thu, 17 Jan 2019 16:38:54 +0100 Message-ID: <1842598.N7HBfy6t9g@xps> In-Reply-To: <20190117141316.24187-1-ndabilpuram@marvell.com> References: <20190107143951.30076-1-ndabilpuram@marvell.com> <20190117141316.24187-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] 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: Thu, 17 Jan 2019 15:38:59 -0000 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