From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ll/ubp0JyfNqn/V7Nn8T2EPAIICdVLzlw8y/Am8TXjM=; b=Ev5QjnLkHeL1Whkavmcp0hMjfXw6J4w6OAkdNX7/JOztHwo7BuNKD+PjeFyMRjIiGC nTib07Nkx1FPHkR67LJBUDZLBIOCRbIvqOAp8ESAo7Ph79yNkV1osqnwfkciaMj+Z3qj 5ngyb92/uv58GI7kMUYniiPeTF3dmOkQp2WD7he6gTJRnfIXvoghBZBr8fTH8GHUxdn0 9VTvhXGZBPYDSZcGfYjCn+PtzoZzeGOhLuP11b8CPY+LGsYlO1tMJuvQ8lbmGc3tO6Mz mE87PUNYnEMBcSUHHfFtSdLsotBJZ97FkfGJHDLcMOs77HoiGLxmERBZ2Ypcq4kHUtMV Pa+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ll/ubp0JyfNqn/V7Nn8T2EPAIICdVLzlw8y/Am8TXjM=; b=fFMz94tuReia2DIYAjqKBfFni17ZxGLBGKTiaWtBuE6JPqqvVOkw1yyYmNwKPT40xg dxVUzhkNWa+tRAmho2xscZfldmpOaRU6iTP3oRKLtdJad7Tk0k9xWEMi4LZ+Y9ruDM+X 26I+we5V6UqyLJqlIM8EYF+bSf8HaoEzQ8cJ3RnVXaHZ1ZPgZd1MeCVF4WSQ47vm9TFL IDFGrTGYZWJAlGTL/ohrjHeU1oO0bdbxUKh4dCZSmI7WBEU/8z2xlCqV9MkPSk88zzRw OhpikXEYyyvgyhuXOBG82U8GemEnu3Wh/3Y/l9cXMm1XD9OSv7WNtgXlqmt0z8BNrlrU NBAw== X-Gm-Message-State: APf1xPAD9WOOKbD7E48xKLwbItz4KlXZ42wmkD16JTN3fdIOawDJAHW+ 4pmoRjlGm8FFkD7xQIzm4Kl+IA== X-Google-Smtp-Source: AH8x225umULE2gCBcslyYWSN4Dn+K1WvJNUgGuKKZxN3GQ1aJouV6g60oT4PdUrX+4jA0VM9hazYAQ== X-Received: by 10.98.25.210 with SMTP id 201mr1019029pfz.89.1518804186743; Fri, 16 Feb 2018 10:03:06 -0800 (PST) Received: from xeon-e3 (204-195-71-95.wavecable.com. [204.195.71.95]) by smtp.gmail.com with ESMTPSA id g15sm41748128pgu.52.2018.02.16.10.03.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 10:03:06 -0800 (PST) Date: Fri, 16 Feb 2018 10:03:04 -0800 From: Stephen Hemminger To: Nelio Laranjeiro Cc: dev@dpdk.org, Adrien Mazarguil , Yongseok Koh Message-ID: <20180216100304.3335cb65@xeon-e3> In-Reply-To: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> References: <21fb91002768a627d9c7f3d81e0c8a12fbf6811f.1518684427.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: add kernel version function 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: Fri, 16 Feb 2018 18:03:07 -0000 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.