From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id 4597AF94 for ; Fri, 23 Jun 2017 19:55:25 +0200 (CEST) Received: by mail-pf0-f172.google.com with SMTP id c73so26609562pfk.2 for ; Fri, 23 Jun 2017 10:55:25 -0700 (PDT) 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=1E/nL2YC6DrqL5ydS4tTrxs1aPIfDdkbuCMb8WIz30c=; b=MEaccttZEG2hYmTqiOBgLi2GqW3hjoE9pM0s209jlN6qXRBCx1KUYYslM+uQj4Azex RGJakKuV241SXyvZjNJln5Nqtym4AYF4wr4U3Fjp4AxqzuEPpgIlu5Y29VHY4Jj8pcRo p2r5My69LYMdbYkkodZoMr9KAPvV0T5i8ZF9JOJzuIw1F4+C8dfixCkXKL5VSRP/R+L5 CffCow1dTWlc0mdnmK15inNOBXPTSOGdGLXDDtbBGj2B3EM5Vbncp7vpB2EEIYo4MqdL ansEZRqq691emwTMZ6oOqLqAO7473S9VZsGEIYukUQeFSWoK6xdP08wYFtmoDzovg64L OXng== 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=1E/nL2YC6DrqL5ydS4tTrxs1aPIfDdkbuCMb8WIz30c=; b=s1ZK2FEFVWNJbmJPo3rLkJmDSbdEag9b2EtXlpAia7uxpOLlWhxg/ODeWwPD67YBrl t81Aby4UTWbbLxgBsFTLE+GtQPmbNG7a6xKEaq3HdcRhiR4MPvjW78+jL9+H0hkw0BcQ Zmvk+MPA5rtdr4UQ7aJsVWSM+GhltZrZpsbeM8DPZpmfmZr0alyDPMdrT8IxcachOkU0 RPR5bpPSJuy2CmrLS1RnJaWknHinJgzZg1/xArk/IiTMPWrtPaSjd7t8GSa/VcmrQr8s MAqcxU+woChrcxSsN+3nYEX0N/xLt6OcBC96ozAo2jydMaYqe4KFPgDZzR+ajBIP5eL8 FJxQ== X-Gm-Message-State: AKS2vOz5PWgfvFezA5In/fU25w0NYc+yPIyzaxfRrA7yI548p1oRaAHt E2SsosVrqQjJGymr X-Received: by 10.84.217.150 with SMTP id p22mr10314666pli.270.1498240524507; Fri, 23 Jun 2017 10:55:24 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id t77sm11306188pfg.102.2017.06.23.10.55.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Jun 2017 10:55:24 -0700 (PDT) Date: Fri, 23 Jun 2017 10:55:22 -0700 From: Stephen Hemminger To: Hemant Agrawal Cc: Shahaf Shuler , Pascal Mazon , Message-ID: <20170623105522.0cd95de1@xeon-e3> In-Reply-To: <4376741f-cece-8086-eddb-c35ee9ef06a4@nxp.com> References: <20170621092843.72606c72@xeon-e3> <4376741f-cece-8086-eddb-c35ee9ef06a4@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] DPDK drivers should not use kernel version 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, 23 Jun 2017 17:55:25 -0000 On Fri, 23 Jun 2017 13:03:55 +0530 Hemant Agrawal wrote: > On 6/21/2017 9:58 PM, Stephen Hemminger wrote: > > 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. > > what is the alternative than? > > There are many legitimate cases, where userspace code need to make > decision on the basis underlying kernel version. > > In some cases, user space code can add error handling and fallback, but > it is not possible in all cases. Userspace code should test for the specific feature it wants. I.e is the flow qdisc available. Then report missing feature as error if necessary.