From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 11/25] mlx5: add support for configuration through kvargs Date: Tue, 21 Jun 2016 17:42:42 +0100 Message-ID: <57696E82.20607@intel.com> References: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> <1466493818-1877-12-git-send-email-nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: Adrien Mazarguil To: Nelio Laranjeiro , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0CC7EC426 for ; Tue, 21 Jun 2016 18:43:10 +0200 (CEST) In-Reply-To: <1466493818-1877-12-git-send-email-nelio.laranjeiro@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/21/2016 8:23 AM, Nelio Laranjeiro wrote: > The intent is to replace the remaining compile-time options and environ= ment > variables with a common mean of runtime configuration. This commit only > adds the kvargs handling code, subsequent commits will update the rest. >=20 > Signed-off-by: Nelio Laranjeiro > Signed-off-by: Adrien Mazarguil > --- ... > +static int > +mlx5_args_check(const char *key, const char *val, void *opaque) > +{ > + struct priv *priv =3D opaque; > + > + /* No parameters are expected at the moment. */ > + (void)priv; > + (void)val; > + WARN("%s: unknown parameter", key); > + return EINVAL; Returning positive value here will prevent rte_kvargs_process() to fail, I guess that is the intention but returning EINVAL is misleading. Also generating the checkpatch warning: WARNING:USE_NEGATIVE_ERRNO: return of an errno should typically be negative (ie: return -EINVAL) #71: FILE: drivers/net/mlx5/mlx5.c:264: + return EINVAL;