From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH 1/2] net/mlx5: add kernel version function Date: Mon, 19 Feb 2018 08:42:47 +0100 Message-ID: <20180219074247.ntu4xysufkekjrgl@laranjeiro-vm.dev.6wind.com> References: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> <20180216100304.3335cb65@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, Adrien Mazarguil , Yongseok Koh To: Stephen Hemminger Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 470F11B16C for ; Mon, 19 Feb 2018 08:41:51 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id k87so13253219wmi.0 for ; Sun, 18 Feb 2018 23:41:51 -0800 (PST) Content-Disposition: inline In-Reply-To: <20180216100304.3335cb65@xeon-e3> 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 Fri, Feb 16, 2018 at 10:03:04AM -0800, Stephen Hemminger wrote: > 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. We have already discussed it, this new API in the kernel is buggee between v4.5 to v4.9. As there is now way in between those version to detect if the API is the buggee one or not, we don't have any other solution. It is better to not use at all this new API than using a buggee one. -- Nélio Laranjeiro 6WIND