From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/2] net/mlx5: add kernel version function Date: Fri, 16 Feb 2018 10:03:04 -0800 Message-ID: <20180216100304.3335cb65@xeon-e3> References: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Adrien Mazarguil , Yongseok Koh To: Nelio Laranjeiro Return-path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id A0FA57CD8 for ; Fri, 16 Feb 2018 19:03:07 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id o1so2996997pgn.4 for ; Fri, 16 Feb 2018 10:03:07 -0800 (PST) In-Reply-To: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> 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 Thu, 15 Feb 2018 09:47:27 +0100 Nelio Laranjeiro wrote: > Use a function to retrieve the version of the kernel. > > Signed-off-by: Nelio Laranjeiro This type of logic will run into problems with Enterprise and vendor kernels. What about users using older kernels with OFED? What about case where kernel MLX drivers have been backported? In general, it is better to adapt to the environment the code is running in. Try the new feature, if it fails then log a message (at info level) and fallback to the other strategy.