From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id CDCE6223 for ; Wed, 11 Oct 2017 11:23:14 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3268620729; Wed, 11 Oct 2017 05:23:14 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 11 Oct 2017 05:23:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=SmVPxgJuDslcJRPGyLhuHIe+aK NlDeKKfVNB0MC3LpU=; b=hIJsFEzMYQFf6MJSIP4xjCxx5PlD42J8fw0a85zUih LSLIHwS01WPT2rYTWssUxSr98Zxd2U8zFgzvFZWDKBRbOULyBBzdUOL6tIdKu9f0 ubXAr4WmCFf2CmJEfKdflzm1EhwbKDCLOMdDhOByI0iD9JbDaocDDn3DVB6DrIib I= 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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=SmVPxg JuDslcJRPGyLhuHIe+aKNlDeKKfVNB0MC3LpU=; b=OoDzsxbbZrLdRxfBRoO1vv Z9bDucQOy9SP+UeeHnzeOIpcHn51vF01lrmLny9jaV+p6/zVufIwSDTMmuBUOhA6 bL27POP4egIixy7XiDeclstZFq3e0rGs0B29zDWEC7mNliMXhFRyA757EWg8jRQc EORGbVvbXTOxZZTkPWvaWn8hgS7jz7X938SdKNE23Qkjd3ps+m7HZeAGOwBIrGZO kqI/V+7L+Yb7t+oMEB9LohqiijM1oi4SaPU+3S+LFu7aRj0HcPcosBkFJkBKDN/F aXShDgxAOwt43bY2Jna/p0EEmLYZ9gN/69zetvzhPSu6B4tsR0XYaqIQEgHCdPLQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D387924038; Wed, 11 Oct 2017 05:23:13 -0400 (EDT) From: Thomas Monjalon To: Adrien Mazarguil Cc: dev@dpdk.org, Ferruh Yigit , Gaetan Rivet , aconole@redhat.com, fbl@redhat.com Date: Wed, 11 Oct 2017 11:23:12 +0200 Message-ID: <2075344.22PATxnhkA@xps> In-Reply-To: <00db12469380e587ac434bfc5c63795e32cfddef.1507193185.git.adrien.mazarguil@6wind.com> References: <00db12469380e587ac434bfc5c63795e32cfddef.1507193185.git.adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v1 1/7] ethdev: expose flow API error helper 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: Wed, 11 Oct 2017 09:23:15 -0000 05/10/2017 11:49, Adrien Mazarguil: > rte_flow_error_set() is a convenient helper to initialize error objects. > > Since there is no fundamental reason to prevent applications from using it, > expose it through the public interface after modifying its return value > from positive to negative. This is done for consistency with the rest of > the public interface. > > Documentation is updated accordingly. > > Signed-off-by: Adrien Mazarguil > --- > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > /** > + * Initialize flow error structure. > + * > + * @param[out] error > + * Pointer to flow error structure (may be NULL). > + * @param code > + * Related error code (rte_errno). > + * @param type > + * Cause field and error types. > + * @param cause > + * Object responsible for the error. > + * @param message > + * Human-readable error message. > + * > + * @return > + * Negative error code (errno value) and rte_errno is set. > + */ > +static inline int > +rte_flow_error_set(struct rte_flow_error *error, > + int code, > + enum rte_flow_error_type type, > + const void *cause, > + const char *message) When calling this function, the performance is not critical. So it must not be an inline function. Please move it to the .c file and add it to the .map file.