From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BE0A1A00E6 for ; Fri, 12 Jul 2019 11:01:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF1E81B9AC; Fri, 12 Jul 2019 11:01:35 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 823831B9AA for ; Fri, 12 Jul 2019 11:01:34 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2019 02:01:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,481,1557212400"; d="scan'208";a="189780941" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.185]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2019 02:01:31 -0700 Date: Fri, 12 Jul 2019 23:43:19 +0800 From: Ye Xiaolong To: =?iso-8859-1?Q?J=FAlius?= Milan Cc: dev@dpdk.org, qi.z.zhang@intel.com, david.marchand@redhat.com Message-ID: <20190712154319.GA51076@intel.com> References: <20190712075546.GA20880@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190712075546.GA20880@localhost.localdomain> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: fix xdp_get_channels_info return value 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Thanks for the patch. On 07/12, Július Milan wrote: >Procedure xdp_get_channels_info was returning error code -1 in case of >ioctl command SIOCETHTOOL was not supported. This patch sets return >value back to 0 as it is valid case. > >Fixes: 339b88c6a9 ("net/af_xdp: support multi-queue") > >Signed-off-by: Július Milan >--- > drivers/net/af_xdp/rte_eth_af_xdp.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c >index ff8e90589..33352e10a 100644 >--- a/drivers/net/af_xdp/rte_eth_af_xdp.c >+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c >@@ -852,9 +852,13 @@ xdp_get_channels_info(const char *if_name, int *max_queues, > ifr.ifr_data = (void *)&channels; > strncpy(ifr.ifr_name, if_name, IFNAMSIZ); > ret = ioctl(fd, SIOCETHTOOL, &ifr); >- if (ret && errno != EOPNOTSUPP) { >- ret = -errno; >- goto out; >+ if (ret) { >+ if (errno == EOPNOTSUPP) { >+ ret = 0; >+ } else { >+ ret = -errno; >+ goto out; >+ } > } > > if (channels.max_combined == 0 || errno == EOPNOTSUPP) { >-- >2.21.0 > Reviewed-by: Xiaolong Ye Thanks, Xiaolong