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 C0695A00E6 for ; Fri, 12 Jul 2019 17:10:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9938C1B9CD; Fri, 12 Jul 2019 17:10:09 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 307B41B9C6 for ; Fri, 12 Jul 2019 17:10:08 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id ay6so4912636plb.9 for ; Fri, 12 Jul 2019 08:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NqFxqKSKiupDSnvZfD8BTqbEgWhJxJc54DARhmiIFMs=; b=Rjtvr+F/zZrYFNKvzF4T48qOajkq7PyVMxnWR0NIzaMxgh0CRWczFSmgrF7eR8hmRl UsJpL5Rho0EEuFiY15qjftOp5bhuRM1mF8/6+zEhGD/51gLhSMkeLNRre9x4v/BQhfOu YxKiL6wca1uAGnDOdPyoNtnf5N80ead9IZfw1AZKRArNPD2HrvXFE0bpXsHbiKlQmO+S NKamd1YzN8Vu6KCbrpdW3Z4T3YtLEZYj1Rv5WL02RzcZAh9w+IhPUEau/qnX4E6RPkQA aH1mkdzZOeGAOxweQW37zTheKt0+hoT2kb587oX7cPPT5e5TmP+Vox0miVcv9T2S5akU MZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NqFxqKSKiupDSnvZfD8BTqbEgWhJxJc54DARhmiIFMs=; b=lhY7gS8p2b1Hw7dsZE92ZsEI1xf8iCcCyO+FFA2P3Eo3d8IXE39DA9HK9bCHJoQumR vpvFRx7OplCOIwDjBiVlFTg5gOfB+aWkLHNbqJ68UYVTAbjHfePJ5zVosfC8r41wmEB1 1WhkE1pXLNeojOI5dz/z3c7CIyUH2kcY3ePbk1NKr1WUS01/BOAvMXNvcxM3UMcDMQkO zFxmJ9zs3MdG6oy0OIePdbB7P6M7cbvsAnxjvoRwrU1oZhGf9ERbhGmrshR3AoyTEiiJ 1qIv93wG2v3mQdYd8eVmjGdA9iU6m5+EQo3E16NdCNhIRG0j+DZDEfYujfH7cUZhaVTw PCng== X-Gm-Message-State: APjAAAUJWX84sU1K9N7H+pDVp51qP5Xoww9iGfdpt2/guaY3h1pMO//7 obUX+vcbk5qpR/i52yLKPLY= X-Google-Smtp-Source: APXvYqx05WqGHyfK91uO6WNbgwDXwfBtNRGZ4PdsLVOB9J4j5Tuj7GsQ2Egx6onRsS6VXhocO/nk0w== X-Received: by 2002:a17:902:7202:: with SMTP id ba2mr12207443plb.266.1562944207445; Fri, 12 Jul 2019 08:10:07 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w187sm10195175pfb.4.2019.07.12.08.10.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 12 Jul 2019 08:10:07 -0700 (PDT) Date: Fri, 12 Jul 2019 08:10:06 -0700 From: Stephen Hemminger To: =?UTF-8?B?SsO6bGl1cw==?= Milan Cc: dev@dpdk.org, xiaolong.ye@intel.com, qi.z.zhang@intel.com, david.marchand@redhat.com Message-ID: <20190712081006.28838e24@hermes.lan> In-Reply-To: <20190712075546.GA20880@localhost.localdomain> References: <20190712075546.GA20880@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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" On Fri, 12 Jul 2019 09:55:46 +0200 J=C3=BAlius 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. >=20 > Fixes: 339b88c6a9 ("net/af_xdp: support multi-queue") >=20 > Signed-off-by: J=C3=BAlius Milan > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > 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 =3D (void *)&channels; > strncpy(ifr.ifr_name, if_name, IFNAMSIZ); > ret =3D ioctl(fd, SIOCETHTOOL, &ifr); > - if (ret && errno !=3D EOPNOTSUPP) { > - ret =3D -errno; > - goto out; > + if (ret) { > + if (errno =3D=3D EOPNOTSUPP) { > + ret =3D 0; > + } else { > + ret =3D -errno; > + goto out; > + } > } > =20 > if (channels.max_combined =3D=3D 0 || errno =3D=3D EOPNOTSUPP) { Still wrong, it doesn't set max_queues/combined_queues if errno =3D=3D EOPN= OTSUPP