DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>,
	Pascal Mazon <pascal.mazon@6wind.com>, <dev@dpdk.org>
Subject: Re: [dpdk-dev] DPDK drivers should not use kernel version
Date: Fri, 23 Jun 2017 10:55:22 -0700	[thread overview]
Message-ID: <20170623105522.0cd95de1@xeon-e3> (raw)
In-Reply-To: <4376741f-cece-8086-eddb-c35ee9ef06a4@nxp.com>

On Fri, 23 Jun 2017 13:03:55 +0530
Hemant Agrawal <hemant.agrawal@nxp.com> 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.

  reply	other threads:[~2017-06-23 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 16:28 Stephen Hemminger
2017-06-23  7:33 ` Hemant Agrawal
2017-06-23 17:55   ` Stephen Hemminger [this message]
2017-06-25  6:03   ` Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170623105522.0cd95de1@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=pascal.mazon@6wind.com \
    --cc=shahafs@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).