From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2B70A034F; Thu, 1 Apr 2021 01:21:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C13D140ED3; Thu, 1 Apr 2021 01:21:29 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id CD22840142 for ; Thu, 1 Apr 2021 01:21:27 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 5CD9F5C00E6; Wed, 31 Mar 2021 19:21:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 19:21:27 -0400 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=fm3; bh= Z1CK/brngN6q4WJ1lJc7JaFR4CPJsbV+1sVYSBl1dEM=; b=yavfJRUvOPuSDOlj jkVqOPEZSoRl35RhZ0FMkbE9hQ5juO89Ku+7JvAo/jrgta1NqvXFAW30Arsj4w5+ K9m1hWrnK6ZMIoOyk00XLDzKK8H5vL0mCtCEyxB3egmNW85czadjTpEwJskJai7E 3hFPZUuDx5r9rj9Oj0NnPX/EViCNcba3ixFD4FbAPdSDkNUw/YUjyl3stetAc8rN /5wP/3Fbm2f+OyYY/3HRPygmIF4CbbHqr3zCsewSsi8fR4Wb0kGkYyERz2JnGIzg 1hMPssQllY3622XD+z3KsHVzR4mg/A1vSphQxw7Cj6fF1rLoo0AMsMwR9G+eN/Ds 52FpCg== 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=fm2; bh=Z1CK/brngN6q4WJ1lJc7JaFR4CPJsbV+1sVYSBl1d EM=; b=pnq+fzVS1dKwVSoTcZf6J17EZSk/0PaQ4p+i6kQFDxNSMXqPkIMzU7n7n zqRpq73fmzwRYf6Q+VtwX2lGuc0+PHKSMcxLpzSctPKa288xD87wE9Efa1lJXaP1 V3mGBolk/NKYjiJjg3kvnaQiGeMMSkeOUah9ukXJadNlcUL8QwE6pPUdcB7Ha0MZ 9U3pMHDLb0V8Vpf6yUAW6ef28HWYZCq9DmDLgOZGU4hxmAKePncRA8s1ySEdeouI 161hS6HcKQiWgzrWoqk9KqmQ26v+TW8lyY2PRPG9s4vB66dhWF8vu6E4V7JFotdt Z8KR0eYk8g5UeiihNz+pZ6ffcfg2g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeifedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 B76E21080057; Wed, 31 Mar 2021 19:21:25 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko , Andy Moreton , Ivan Malov Cc: dev@dpdk.org, ferruh.yigit@intel.com Date: Thu, 01 Apr 2021 01:21:19 +0200 Message-ID: <5393460.v3xPdy9A3h@thomas> In-Reply-To: <20210312110745.31721-8-ivan.malov@oktetlabs.ru> References: <20210312093143.28186-1-ivan.malov@oktetlabs.ru> <20210312110745.31721-1-ivan.malov@oktetlabs.ru> <20210312110745.31721-8-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 08/10] net/sfc: support action VXLAN ENCAP in MAE backend X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 12/03/2021 12:07, Ivan Malov: > +static int > +sfc_mae_encap_header_add(struct sfc_adapter *sa, > + const struct sfc_mae_bounce_eh *bounce_eh, > + struct sfc_mae_encap_header **encap_headerp) > +{ > + struct sfc_mae_encap_header *encap_header; > + struct sfc_mae *mae = &sa->mae; > + > + SFC_ASSERT(sfc_adapter_is_locked(sa)); > + > + encap_header = rte_zmalloc("sfc_mae_encap_header", > + sizeof(*encap_header), 0); > + if (encap_header == NULL) > + return ENOMEM; > + > + encap_header->size = bounce_eh->size; > + > + encap_header->buf = rte_malloc("sfc_mae_encap_header_buf", > + encap_header->size, 0); > + if (encap_header->buf == NULL) { > + rte_free(encap_header); > + return ENOMEM; > + } Are the error codes positives on purpose? checkpatch is throwing this warning: USE_NEGATIVE_ERRNO: return of an errno should typically be negative (ie: return -ENOMEM) Also the base code has a lot of these warnings: RETURN_PARENTHESES: return is not a function, parentheses are not required I guess you cannot do anything to avoid it in base code?