From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: DPDK drivers should not use kernel version Date: Wed, 21 Jun 2017 09:28:43 -0700 Message-ID: <20170621092843.72606c72@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Shahaf Shuler , Pascal Mazon Return-path: Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id 531F27CEA for ; Wed, 21 Jun 2017 18:28:51 +0200 (CEST) Received: by mail-pf0-f169.google.com with SMTP id e7so7464376pfk.0 for ; Wed, 21 Jun 2017 09:28:51 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Looking at some other issues, I noticed that both the TAP and MLX5 device drivers are looking at kernel version through uname. Although this may seem like a good way to deal with kernel API changes, it is not reliable. Enterprise kernel distro vendors never change kernel version but do backport features from later kernels. Therefore the behavior expected may change even though kernel version doesn't change. Also kernel version does not dictate that the expected feature (like flower) is in the kernel configuration. I recommend this be looked for in all future submissions. Maybe even flagged as error in DPDK version of checkpatch. $ git blame drivers/net/mlx5/mlx5_ethdev.c | grep uname 3a49ffe38a950 (Shahaf Shuler 2017-02-09 14:29:54 +0200 895) if (uname(&utsname) == -1 || $ git blame drivers/net/tap/rte_eth_tap.c | grep uname de96fe68ae959 (Pascal Mazon 2017-03-23 09:33:57 +0100 1169) if (uname(&utsname) == -1 ||