From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50055.outbound.protection.outlook.com [40.107.5.55]) by dpdk.org (Postfix) with ESMTP id E09522A6C for ; Sun, 6 May 2018 08:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bUKpBTYnpvsCKE8Ysdu9KVLDpzbKrRERxP6XIa9jzoU=; b=jOUOCnlJFBFaRME3RHmNRuX7gJ4/NReVAgp0rssHSkq1tg7Plq7lx2hN71An7Q6IYCMEcQWFVu18zVczunXatW+LV0GBBJykCe7/NunaCrwkhiZVSMGkkeWvCPJg3iBtBSVU3GkJ5GnczrVZXW9Qv3WxxHxWSqcwbBJLWFu3cLc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Sun, 6 May 2018 06:06:49 +0000 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Date: Sun, 6 May 2018 09:05:47 +0300 Message-Id: <450b1f88dbbb74510233c408cebb48480916e51b.1525586526.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: LO2P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::20) To AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4422; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 3:PMEQIlYNkXhC11TmxRZEBDGP7u/OJs1VnTi3+ZXdodSQGtDjTt5nPHYfOhTsEFD7Rm6yoGagMVzjDQNQHz/13M8AZiJgO4lgTvuETKfoFyKUb8JFhCAvOZ9F4wuMKQGxiGAoKcV3PNtVrGcccQUGGsOG8LSawxfpggCXg904pYKSP1jWONoW0jiueo/dGbrz+Pr1auBXHeVeCB8DVlshjvSu8f/bOGG1z0Cix0QEGVWVTGtSajoZ+9xI4GwMS1ID; 25:p7/ARCH56k8QvaB+bYAuqjTwC9SSdxk9R6luavcKdUBdBqS8KjNpcA82Kebf14dW9qixsyPqpZw2aSMhX5Z5p9/jlHXfUlaChAV9r8QwvD4eLFQFKn/xYNXsVH6gWUoef5LeSJqSQWctHEbyF5ejHglwcIfp8wPwdwyNlIL6cM4dgkBnxavNEmfWvwm4DhopR/ygnKiq5hmD1LlLoaIQHEBzEqyBsNfkiP6WJjRIJ1vy6PAWjx6Rd/FCMlysr/MMsBC9CXbUzTS4FGu+byi8o0a7AG77oc6Q/920rBpn3WlJq1J6fFJEr9JjtIFS0NZcW+mqLOlJpSN+KRwHr/ql/Q==; 31:IcddO8chQZozKlz+OQtqzTfDVREMdBp+qydxD+Sqz1aoVicZV579hy3eyiDQU1WhNbarCvtZA9ZxY+RMO3WTclqnh3/2GySsKmxhwJ3UQSPaZ9aIeejwNNrKWQQ66mYjSyx8AAv/gso8eOWKmMGi6DX+vh7ePV/TUhdgzHBv3k/yN/SomBfPnbLkNSV0Ea+dccjWwwUjNQJ6Xkajm7oieRc70ViqJEFhFRe1tNlnyHA= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:nJdpEtpzNFVv6Uu/Ge/LJ7hktPcpD/3s3emOwZDWhPJZaZhg8caDzy9cfN5mUM6Og6fGQRgEKDCUbIVAXDR70Hggu9LgJjHfxZyl+CVmVHRuCNg4YVu986Jud2OW5VQUZ6x8rhxNWcunVdMUpG6u8bun95C6bKlPxsD5ByfrteT/OEZIYqSGc5+u2wMA4GPfsHQqxz+wmS3FSYKqr3iu7SHoFjaTRyJO08FekpiuD7JiWuu96r7mvdsp9TY7oVgCmpxJO3ecnM7ChwbvjURpvvSxYvhapbqryxtPe9ugJcyb7s7B2yrkg8aYySU1xV3Kt4LhKYE9UihtjQjWqZbJSTlsVv8BSal5Izl1x8f2fzVMI5n3Y95ruvzdcDLEo1NcNJcYefrFpdwnP2UMofxyrxHXvaZPaqvgsc2/ha/Ie/I2hOd1uhyVbkQkP6RWgpCmzHhVqEJPg6Cv2OE8SSkzHt6nmEkCbbsZQodF1dF9R2pJjZyak122FK+Tn1insMgT; 4:EICXX1I+dxzezogXSj2zZG8LSQx4MSHsQcVc+0QV1MxNnf1DRE00RZ0bFVRN4WVSlnzk2TdN7fv9KCZwvD+l+JPv36DOzZaeRjC1yC4zJ3UGv8wek/KWvWqqcSqDnyjiiKW3IODnCut0eNlMwyAMrdgyUHsvpXi/W6Z024SIuyHf3n3Pbil31S/+eG5rut8q4mv7Mri57q9jHbGe+r66BAWh2+ire/t9/n5qh5mo16jZI6HMIxRQHK3oKyiseEXpnX1gwkQTTV5B1EHLw4op2Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR05MB4422; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4422; X-Forefront-PRVS: 06640999CA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(8936002)(316002)(2351001)(53936002)(86362001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(2870700001)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(69596002)(16526019)(26005)(59450400001)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(23676004)(6916009)(21086003)(446003)(11346002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4422; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOkhpTmhUQ0RBdm1UanYrUWdKMmxyenRURGVW?= =?utf-8?B?T1RhTjdoYjBZUDY2dURNMUVTaVZ6b3RPRXU1SnBic1pFUzMycDZ1Sy9MOTNH?= =?utf-8?B?dityRllvSFNuTThyMitOUzVnams5dENuK2hhQW04SWgzRCs1djgvc1A3dkJo?= =?utf-8?B?QnhrU0NIRngvcXFJK2dwUXRTbTdUMGZNS091V21sN3BHSTBsK2tqY0sxcGZU?= =?utf-8?B?Ynh4TWlVd043bk1td2tKNE9wYlkwZUlGQnZuamkwSWtjZ0lyanpBcEFHOVdZ?= =?utf-8?B?VWNST0NsMGptazVFazMxSGVpZzE5UGFuWi9tZmtiR3ZpTkwxNDU3a2d3dDJy?= =?utf-8?B?K2V2YVNoTDcwQldSV3FiUXUyMXN6TUpuSHBUY1pBOXhWNGlpS0ZFcG9DM0Ra?= =?utf-8?B?K1FDQmllVjNDRm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ouwMZl6Ag/kYVqk/ciUFoUMBRcWPxttP4fwiPpJsZIUS8hcCSqnsx/utm1v3oMRjv2hEZn7TSXBbU4YWojwdPxcZPdsYEoZdm/OQbXYLKlJK87lr3TcQuz63/ujK0g==; 5:73pX4A28DmFFGS7MpsNbNda5XvfYOJsem4OJYuMWx82CW66RpcqH/3ntINGZG/B5YeK3gvY5IcNmCpQJPq4vb6YtIytkJ7hnEH2hTAsRipcbXrE+gFxeJF1BzJBbce3oyJQ+fC2Wn4VIyx4XxuLkwqudC0GPyD5MXZe0k0gGU0g=; 24:UNo1RyNfEWmv/V/qrp3XD+/HDPPGwIA75pFn2ypgH2/U48nt+KqRRqKZvoLwgdi5GNttnIzzVDblzmXZQJIM1brKZIOz4eyLMSwOIqXmCr4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:lwGYrJZRbDSfyneu/UI8/fUmPNlW/XzC0QVxGE24vP0EUG5VyQaer1dvDvJlE13cVNX6eVOnghFePZnW4u6g79vEde5lkbL8hij6z4RxAL70IDDmunZWzaGCtC9DU9nU9avZ9o5fxNiRU3mKLM5lD5BwtVxhAU02ou1b9S2i/3V4tRynwxhv5pBcOxxps6p50vMJNSqhB+sJ7Dg9kjuuRQ6Zp8phnOf+gGhgyMedOXi09M0NglwmXEGGveKE88kN X-MS-Office365-Filtering-Correlation-Id: 6450cb1a-8e9c-4e43-55fe-08d5b3178e67 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:49.2081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6450cb1a-8e9c-4e43-55fe-08d5b3178e67 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4422 Subject: [dpdk-stable] [PATCH 18/33] net/mlx5: remove kernel version check X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:06:51 -0000 From: NĂ©lio Laranjeiro [ upstream commit f47ba80080ab81ad513f843407bec7178fed8857 ] 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 d7e85577f8..37b20c09a1 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 @@ -721,20 +719,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.12.0