From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 21 Jun 2016 09:42:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,505,1459839600"; d="scan'208";a="832543962" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.90]) ([10.237.220.90]) by orsmga003.jf.intel.com with ESMTP; 21 Jun 2016 09:42:43 -0700 To: Nelio Laranjeiro , dev@dpdk.org References: <1465379291-25310-1-git-send-email-nelio.laranjeiro@6wind.com> <1466493818-1877-12-git-send-email-nelio.laranjeiro@6wind.com> Cc: Adrien Mazarguil From: Ferruh Yigit Message-ID: <57696E82.20607@intel.com> Date: Tue, 21 Jun 2016 17:42:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1466493818-1877-12-git-send-email-nelio.laranjeiro@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Tue, 21 Jun 2016 16:43:11 -0000 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;