DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jay Rolette <rolette@infinite.io>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	"Qiu, Michael" <michael.qiu@intel.com>,
	Kyle Larose <eomereadig@gmail.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] DPDK and HW offloads
Date: Tue, 22 Mar 2016 10:17:21 -0700	[thread overview]
Message-ID: <20160322101721.4e6775fe@xeon-e3> (raw)
In-Reply-To: <CADNuJVrHqzsy_5-vj96RO_s5oC0zRnjnY+89ua3fVYp2TdpKOg@mail.gmail.com>

On Tue, 22 Mar 2016 07:19:01 -0500
Jay Rolette <rolette@infinite.io> wrote:

> On Tue, Mar 22, 2016 at 5:19 AM, Bruce Richardson <
> bruce.richardson@intel.com> wrote:
> 
> > On Tue, Mar 22, 2016 at 05:50:28AM +0000, Qiu, Michael wrote:
> > >
> > > Why not to implement one simple API with variable arguments, just like
> > > syscall ioctl() does. And drivers implement it's specific hardware
> > > features with a feature bit param, and other needed variable arguments.
> > >
> > > Thanks,
> > > Michael
> >
> > A very much dislike that idea.
> > * It makes the code much harder to read as you have to closely examine all
> > the
> >   parameters to work out what a function call is actually meant to do.
> > * It makes it much harder to see that you have an implicit dependency on a
> >   specific device. Having to include a driver specific header file e.g.
> > i40e.h,
> >   and call a function named e.g. i40e_do_magic_stuff(), makes it pretty
> > explicit
> >   that you have a dependency on i40e-based hardware
> > * It prevents the compiler from doing type-checking on parameters and
> > informing
> >   you of little inconsistencies.
> >
> > For all these reasons, I prefer the device-specific functions option.
> > However,
> > at the same time, we also need to ensure we have a reasonable set of
> > generic
> > APIs so that the cases where users are forced to drop down to the
> > lower-level
> > device-specific primitives are reduced.
> >
> 
> +1

I prefer the OO model where there is a generic network interface that provides
a uniform set of features, and if a specific hw device provides a more efficient
implementation of a feature, that is hidden (inheritance?) such that there
is no difference API.

The DPDK has been hardware vendor driven up until this point.
But from a software point of view, it is more important to provide good API than
use DPDK as a hardware POC environment.

  reply	other threads:[~2016-03-22 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 17:16 Stephen Hemminger
2016-03-18 18:00 ` Thomas Monjalon
2016-03-20 14:17   ` Zhang, Helin
2016-03-20 19:18     ` Thomas Monjalon
2016-03-21 14:52       ` Bruce Richardson
2016-03-21 15:26         ` Kyle Larose
2016-03-22  5:50           ` Qiu, Michael
2016-03-22 10:19             ` Bruce Richardson
2016-03-22 12:19               ` Jay Rolette
2016-03-22 17:17                 ` Stephen Hemminger [this message]
2016-03-22 17:41                   ` Jerin Jacob
2016-03-23  2:47               ` Qiu, Michael

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=20160322101721.4e6775fe@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=eomereadig@gmail.com \
    --cc=helin.zhang@intel.com \
    --cc=michael.qiu@intel.com \
    --cc=rolette@infinite.io \
    --cc=thomas.monjalon@6wind.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).