From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 953335593 for ; Mon, 12 Mar 2018 14:44:39 +0100 (CET) Received: by mail-wr0-f193.google.com with SMTP id h2so8447595wre.12 for ; Mon, 12 Mar 2018 06:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=It4xErEKlObRDLnCm5ETu+8AOdcCf/YTYl7odNgVZAw=; b=jSqpEn72trHzLJCu+83xZqml19ccmFa+cyMbAXL3cZI4odJX3te/BOg0Z0jLlZG2hI 0IV/iUfx1/AONtYDYguRnh1ELvlQAcciKOrfN81gQh2RzuTJEZYeW0oSKQVTLH9jinNV nGqvbQ1U4RBPAR/qUf63HesNu/5zJqOFAu286B9Fa7x1sfhNDYmYqEpkwVDdi+EW3LyF qODMFn/xn7FBwfDnjepuxcUpoKIe2neomqr/+N5vfweuh2eXcdY8tYGhizhatBFfcLzl Dn+2SH0kMLCRLtkGXT8jDtZ4Um38SWWbG2/l7yKPXFDCIcBkqvk486IzzySZMpRus8j/ +Zjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=It4xErEKlObRDLnCm5ETu+8AOdcCf/YTYl7odNgVZAw=; b=NWKmpy+MZdf2sSMiCL9AQelFaxusQi6DZnDGzqe9z2kJaS0UcJp48Gs7ZQqB8MM4Lv YmrPJ8pu2neaP/HRBhbMkz03gtK77wWUD6p1RlVGFM7m39Oq50C8UJJjyZEcU+PQbfxi zub8dU22PP3wTjEHWxKqP797+ZQ2Ow6cx5EEBm5kRmXgXweJNsv3t5MfzObgTnMdeOwR dEcIFbwVdkfdI7O6cP/2sT8u2vPpi29IPxMc216IM4Clpsxg8AxJ3odkKkAmLxkhCuNa qlpdp1eoQV69ZPAW8xxKYpnH9KrppWoE0V4jhLzyD6Sh+C2cVqmHPHSCdnmpAhfx5G/M ZuNQ== X-Gm-Message-State: AElRT7G+JxbTZqDylnaPjZTa6g8UgIrowkoTxp0bzb7fMu3sjdXepVmH 62Cv5+98K7VLTRxMi8xQS+3BaXZHCg== X-Google-Smtp-Source: AG47ELthEssP87siJ7jt+p57qn2UgnS/wK3B/lbhcD0dclZVz3lFOM10AXrf1PAFga2/lVRwfcZ+kQ== X-Received: by 10.223.153.230 with SMTP id y93mr6144520wrb.215.1520862279116; Mon, 12 Mar 2018 06:44:39 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id y1sm6569198wrh.80.2018.03.12.06.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 06:44:38 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Cc: Adrien Mazarguil , Yongseok Koh Date: Mon, 12 Mar 2018 14:43:17 +0100 Message-Id: <3e8709786512b811e7386c3cf615b5d34767cd45.1520862100.git.nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH v2 1/3] net/mlx5: remove kernel version check 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: , X-List-Received-Date: Mon, 12 Mar 2018 13:44:39 -0000 Kernel version check was introduced in commit 3a49ffe38a95 ("net/mlx5: fix link status query") due to a bug fixed by commit ef09a7fc7620 ("net/mlx5: fix inconsistent link status query") This patch restore the previous behavior as described in Linux API. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_ethdev.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index dd46124ec..26f13fb1b 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -18,11 +18,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -734,20 +732,15 @@ mlx5_force_link_status_change(struct rte_eth_dev *dev, int status) int mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused) { - struct utsname utsname; - int ver[3]; int ret; struct rte_eth_link dev_link = dev->data->dev_link; - if (uname(&utsname) == -1 || - sscanf(utsname.release, "%d.%d.%d", - &ver[0], &ver[1], &ver[2]) != 3 || - KERNEL_VERSION(ver[0], ver[1], ver[2]) < KERNEL_VERSION(4, 9, 0)) - ret = mlx5_link_update_unlocked_gset(dev); - else + ret = mlx5_link_update_unlocked_gset(dev); + if (ret) { ret = mlx5_link_update_unlocked_gs(dev); - if (ret) - return ret; + if (ret) + return ret; + } /* If lsc interrupt is disabled, should always be ready for traffic. */ if (!dev->data->dev_conf.intr_conf.lsc) { mlx5_link_start(dev); -- 2.11.0