From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH v3 11/25] mlx5: add support for configuration through kvargs Date: Wed, 22 Jun 2016 09:30:42 +0200 Message-ID: <20160622073042.GP14221@autoinstall.dev.6wind.com> References: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> <1466493818-1877-12-git-send-email-nelio.laranjeiro@6wind.com> <57696E82.20607@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, Adrien Mazarguil To: Ferruh Yigit Return-path: Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by dpdk.org (Postfix) with ESMTP id A1C40C12E for ; Wed, 22 Jun 2016 09:30:46 +0200 (CEST) Received: by mail-lb0-f179.google.com with SMTP id oe3so17046725lbb.1 for ; Wed, 22 Jun 2016 00:30:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <57696E82.20607@intel.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 Tue, Jun 21, 2016 at 05:42:42PM +0100, Ferruh Yigit wrote: > On 6/21/2016 8:23 AM, Nelio Laranjeiro wrote: > > The intent is to replace the remaining compile-time options and envir= onment > > variables with a common mean of runtime configuration. This commit on= ly > > adds the kvargs handling code, subsequent commits will update the res= t. > >=20 > > Signed-off-by: Nelio Laranjeiro > > Signed-off-by: Adrien Mazarguil > > --- >=20 > ... >=20 > > +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. >=20 > 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; >=20 Good catch, in fact as it is not processed by the PMD itself, it must be compliant with the rte_kvargs_process(). I will fix in in the v4. --=20 N=E9lio Laranjeiro 6WIND