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 C9BEBA00E6 for ; Fri, 12 Jul 2019 09:40:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D33CA1B9A7; Fri, 12 Jul 2019 09:40:51 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 852311B9A6 for ; Fri, 12 Jul 2019 09:40:49 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id k8so18456909iot.1 for ; Fri, 12 Jul 2019 00:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fFshVx/TMPVNB0WRPuz+A2V7Ynmb7EoUa/9Jp2oSe+8=; b=cLLRHVpkNNVMcw/JrLz4Z50kw9abTYjkOlAuI+OiqwLx+wxM2rTvwLvZrYf0uLaYgx 1HzES/0QvsQzi/i1HFk5UY796kpdCiq0MRVDpko2Sz674kKDTDYNuOheX7juYfb7ii6u xVGugwJejjTSKVXNKBacfu6KESYznC76H5ZN2Yy62gwjAwQYQBxVBwut4Hjmx4KL1SaK BO0wuaOycy0xcgPYy2taaMULf4F+a6X+n6NeUx7d8JQfq/Lb5YL+OFr9uT5NYLhEzz1m zqeCwSn4Szn0K+aPlt5hL4yyfeVqEnAmx205yFfxFOePXAChlIex/JVs1mVoeA67PWWJ HQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=fFshVx/TMPVNB0WRPuz+A2V7Ynmb7EoUa/9Jp2oSe+8=; b=CIDfL14culxZYw3URw914lT85D3dclVfqa1OmFt2PX0umCTBJQsoT6vmCqXBF7kHXr l9AcF2FfQxMhocnL0e0ig7IJjQkzf8aTsxkHK6hSVRb7gnAmQso5h+8qF8LzOBBAefSx iXgfvnEE6idk3jzGc+3aXq5IHPEbij9vkvnst1reFE5/mbESz6s2Tx6AbV7lO9sCfOY3 L3XJgWQxRLSIaRGswYL61ztlGDR2vvuyS9cSXXMy/KrzgLl976KpyjvfA88xp6qnMVz0 7pby6vFeXTtbMVBhhp+kMERZm48jNkXqdz/WXxcnofz0jrkE4dIbuezbci2EkcKm0Z9x SHfA== X-Gm-Message-State: APjAAAU8ZrnGiWnPkxTJ9lZCIjs2iCWgWjiNCaDhyoaY0hF3DCkOaNAm +X6nog889wO7j5h0ypJTYJln5h3zSD5hLNRTU0T8c7b1 X-Google-Smtp-Source: APXvYqwkWTgQdR4tmXRwh44xR+s0NXhHZyptmNVs6MNLTC83ZQ/+ejcGeYEhVWOC8pdZ0gA5FKYYajtkfFPVPxVsrPo= X-Received: by 2002:a02:a90a:: with SMTP id n10mr9542066jam.61.1562917248683; Fri, 12 Jul 2019 00:40:48 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?J=C3=BAlius_Milan?= Date: Fri, 12 Jul 2019 09:40:37 +0200 Message-ID: To: dev@dpdk.org, xiaolong.ye@intel.com, qi.z.zhang@intel.com, david.marchand@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [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" Procedure xdp_get_channels_info was returning error code -1 in case of unsupported ioctl command SIOCETHTOOL. 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=C3=BAlius 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_qu= eues, 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; + } } if (channels.max_combined =3D=3D 0 || errno =3D=3D EOPNOTSUPP) { --=20 2.21.0