From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=mICWyt9+rl1f0L2WAmZPlPFGzUu1Lxqrw3doGfqSnzY=; b=pwLv90Qd2h04OlCu4WegCVyjK5DcSIieMhr9lEqyud8EjI+kMklQUUiL0tIBcsaABd yT7plsSGKC854H/PvbHfJd9gkYnGMrYlhTEtnW/WbkozMcx5WGQMFpfsMx1vkRn2SRKC IRbrimGG+X67MU1Fqs7o5n+nAeRkVzuSEMb8xHXH9teMj/mlgAU1+dI+2tcn27wQ48bo YDqAVgXOQC3nvV/bbrIoKTKH6Un10T38OhXLLk/HtY0f1x5vx/wnnKRqS73AsFplcGGQ ig2GhM92HtXttrjJrvLcLW7vzu+EhClzTaTp8V3Bybd3e58RWvKohKSMw/2P40dNfERI MaTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=mICWyt9+rl1f0L2WAmZPlPFGzUu1Lxqrw3doGfqSnzY=; b=BUOWR3J6/pJSmzOJacUMde+nPC+ziJEh6iw1yTF0BvA1HhsKUBmSCahLmFpJz5F+uM 7OEEXvBUMy9Dq7yBuxX02unahV+3iyMpJqnixVj8Ct8cSOZeCR9EsyCAKJX9RoGoLeWV B9fg/wO3KKSkyrHVBbr/aHcAo7AcFLiAha1bfH0duJWF3HJpl4B1oHjywyKU6s2JPixo R+igDDrdAnU8L7JCrKINwRCey2XcCdKaLUf3nc6Bk4prc8X/zqZ4KHelMgcGyFmTvM48 IZQKlzeiG8dtnX04ly/bczfU2JOXdKQPKm5CkS60lnU4PDu4YSq+HZnnV/hQzy8bmrDs 4tiA== X-Gm-Message-State: ALyK8tL+n4eOgfYgt85ITaFG2kg6+Tj4UONvi0TLFK3j8RMthOLNVSMkw97v84uQqmyKiEr7 X-Received: by 10.194.123.73 with SMTP id ly9mr25161596wjb.21.1466580646212; Wed, 22 Jun 2016 00:30:46 -0700 (PDT) Received: from autoinstall.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id i14sm6647693wmg.7.2016.06.22.00.30.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2016 00:30:45 -0700 (PDT) Date: Wed, 22 Jun 2016 09:30:42 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Ferruh Yigit Cc: dev@dpdk.org, Adrien Mazarguil 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57696E82.20607@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 11/25] mlx5: add support for configuration through kvargs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2016 07:30:46 -0000 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 environment > > variables with a common mean of runtime configuration. This commit only > > adds the kvargs handling code, subsequent commits will update the rest. > > > > 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 = 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; > 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. -- Nélio Laranjeiro 6WIND