DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	stephen@networkplumber.org, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new offloads API
Date: Mon, 18 Sep 2017 23:08:47 +0200	[thread overview]
Message-ID: <17308371.d9TKsa5cRG@xps> (raw)
In-Reply-To: <VI1PR05MB3149BE27F01F093948631DDFC3630@VI1PR05MB3149.eurprd05.prod.outlook.com>

18/09/2017 20:18, Shahaf Shuler:
> Monday, September 18, 2017 5:45 PM, Bruce Richardson:
> > 
> > On Mon, Sep 18, 2017 at 02:27:25PM +0000, Shahaf Shuler wrote:
> > > Monday, September 18, 2017 2:38 PM, Bruce Richardson
> > > > On Mon, Sep 18, 2017 at 01:32:29PM +0200, Thomas Monjalon wrote:
> > > > > 18/09/2017 13:11, Ananyev, Konstantin:
> > > > > > From: Richardson, Bruce
> > > > > > > >
> > > > > > > > I think we all in favor to have a separate API here.
> > > > > > > > Though from the discussion we had at latest TB, I am not
> > > > > > > > sure it is doable in 17.11 timeframe.
> > > > > > >
> > > > > > > Ok, so does that imply no change in this release, and that the
> > > > > > > existing set is to be ignored?
> > > > > >
> > > > > > No, my understanding the current plan is to go forward with
> > > > > > Shahaf patches, and then apply another one (new set/get API) on top
> > of them.
> > > > >
> > > > > Yes, it is what we agreed (hope to see it in minutes).
> > > > > If someone can do these new patches in 17.11 timeframe, it's great!
> > > > > Bruce, do you want to make it a try?
> > > >
> > > > If I have the chance, I can try, but given how short time is and
> > > > that userspace is on next week, I very much doubt I'll even get it started.
> > >
> > > I wasn't aware to the techboard decision on the extra patchset needed.
> > > I think it will be wrong to introduce an API on 17.11 and change it again on
> > 18.02.
> > > I will do my best to make everything ready for 17.11 so we can have one
> > solid API on top of which all PMDs and application will be converted.
> > Considering some Holidays and the DPDK summit I won't have much time to
> > work on it.
> > >
> > > The plan is as follows:
> > > 1.  complete the last comment on the current series and integrate it.
> > > 2. send a new patchset to convert to the API suggested above.
> > >
> > > Aggregating the different suggestions I come up with the below. if this is
> > agreed, then I will move with the implementation.
> > > (I thought it is good to return error values for the get function).
> > 
> > I'd rather you didn't. :-) The only realistic error I would consider is an invalid
> > port id, and I think returning 0 - no offloads - is fine in those cases. The user
> > will pretty quickly discover it's an invalid port id anyway, so I prefer a get
> > function to just return the value as a return value and be done with it!
> 
> It would be simpler, however am not sure invalid port is the only error to consider. Another possible error can be the PMD is not supporting this function.
> On that case returning 0 is not good enough. The application cannot know why the offload is not set, is it because it is set wrong or the PMD just don't support this API (which leads me to my next point). 

We can skip error reporting on "get" functions
and rely on "set" functions to return error if offload API is not supported
or for other miscellaneous errors.

> Declare:
> API1 = The API being worked so far.
> AP2 = The suggested API being discussed here.
> 
> API1  was designed for easy adoption from both PMDs and application. Application can use either old/new API on top of PMD which support one of them thanks to the convert function. There was no hard demand to force all of the PMDs to support it at once. 
> With API2 this model breaks. Application which moved to the new offloads API cannot work with PMD which supports the old one.

It means the generic applications cannot migrate to the new API
until every PMDs have migrated.
I don't see it like a big issue.

> If I aggregate the pros for API2:
> From Bruce:
> >* allows some settings to be set before start, and others afterwards,
> >  with an appropriate return value if dynamic config not supported.
> >* we can get fine grained error reporting from these - the set calls can
> >  all return the mask indicating what offloads could not be applied -
> >  zero means all ok, 1 means a problem with that setting. This may be
> >  easier for the app to use than feature discovery in some cases.
> 
> For that functionality I think the get function are enough (application set offload and then check which of them is actually set).
> The set function are more for the on the fly configuration. 
> 
> >* for those PMDs which support configuration at a per-queue level, it
> >  can allow the user to specify the per-port settings as a default, and
> >  then override that value at the queue level, if you just want one queue
> >  different from the rest.
> 
> This can be done with API1 as well.  
> 
> From Thomas:
> > make the on the flight vlan offloads configuration more generic.
> 
> The cons:
> 1. hard requirement from the PMDs to support the new API. 
> 
> I can commit for mlx5 and mlx4 PMDs. I know other PMD maintainers plan to convert their PMDs as well. If we take this approach we must make sure they all move.

We can try to get an agreement from more vendors at Dublin summit.
If not, we can wait more than one release cycle for late support.

> There is another possible API (API3):
> 1. keep the per-port, per-queue configuration.
> 2. add the get function for better error reporting and visibility for application.
> 3. keep the current on the flight vlan offloading configuration as an exception. In case there will be a need to configure more offloads on the flight we can move to API2.
> 
> With API1 I am obviously OK.
> I agree API2 is more generic. 
> API3 is a nice compromise, if we don't want to force all PMD to convert. 

The question is: do we want to choose a compromise while breaking this API?

  reply	other threads:[~2017-09-18 21:08 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  7:12 [dpdk-dev] [PATCH 0/4] ethdev " Shahaf Shuler
2017-09-04  7:12 ` [dpdk-dev] [PATCH 1/4] ethdev: rename Rx and Tx configuration structs Shahaf Shuler
2017-09-04 12:06   ` Ananyev, Konstantin
2017-09-04 12:45     ` Shahaf Shuler
2017-09-04  7:12 ` [dpdk-dev] [PATCH 2/4] ethdev: introduce Rx queue offloads API Shahaf Shuler
2017-09-04  7:12 ` [dpdk-dev] [PATCH 3/4] ethdev: introduce Tx " Shahaf Shuler
2017-09-04  7:12 ` [dpdk-dev] [PATCH 4/4] ethdev: add helpers to move to the new " Shahaf Shuler
2017-09-04 12:13   ` Ananyev, Konstantin
2017-09-04 13:25   ` Ananyev, Konstantin
2017-09-04 13:53     ` Thomas Monjalon
2017-09-04 14:18       ` Ananyev, Konstantin
2017-09-05  7:48         ` Thomas Monjalon
2017-09-05  8:09           ` Ananyev, Konstantin
2017-09-05 10:51             ` Shahaf Shuler
2017-09-05 13:50               ` Thomas Monjalon
2017-09-05 15:31               ` Ananyev, Konstantin
2017-09-06  6:01                 ` Shahaf Shuler
2017-09-06  9:33                   ` Ananyev, Konstantin
2017-09-13  9:27                     ` Thomas Monjalon
2017-09-13 11:16                       ` Shahaf Shuler
2017-09-13 12:41                         ` Thomas Monjalon
2017-09-13 12:56                           ` Ananyev, Konstantin
2017-09-13 13:20                             ` Thomas Monjalon
2017-09-13 21:42                               ` Ananyev, Konstantin
2017-09-14  8:02                                 ` Thomas Monjalon
2017-09-18 10:31                                   ` Bruce Richardson
2017-09-18 10:57                                     ` Ananyev, Konstantin
2017-09-18 11:04                                       ` Bruce Richardson
2017-09-18 11:27                                         ` Thomas Monjalon
2017-09-18 11:04                                       ` Bruce Richardson
2017-09-18 11:11                                         ` Ananyev, Konstantin
2017-09-18 11:32                                           ` Thomas Monjalon
2017-09-18 11:37                                             ` Bruce Richardson
2017-09-18 14:27                                               ` Shahaf Shuler
2017-09-18 14:42                                                 ` Thomas Monjalon
2017-09-18 14:44                                                 ` Bruce Richardson
2017-09-18 18:18                                                   ` Shahaf Shuler
2017-09-18 21:08                                                     ` Thomas Monjalon [this message]
2017-09-19  7:33                                                       ` Shahaf Shuler
2017-09-19  7:56                                                         ` Thomas Monjalon
2017-09-13 12:56                           ` Shahaf Shuler
2017-09-04 14:02     ` Shahaf Shuler
2017-09-04 15:55       ` Ananyev, Konstantin
2017-09-10 12:07 ` [dpdk-dev] [PATCH v2 0/2] ethdev " Shahaf Shuler
2017-09-10 12:07   ` [dpdk-dev] [PATCH v2 1/2] ethdev: introduce Rx queue " Shahaf Shuler
2017-09-10 12:07   ` [dpdk-dev] [PATCH v2 2/2] ethdev: introduce Tx " Shahaf Shuler
2017-09-10 17:48     ` Stephen Hemminger
2017-09-11  5:52       ` Shahaf Shuler
2017-09-11  6:21         ` Jerin Jacob
2017-09-11  7:56           ` Shahaf Shuler
2017-09-11  8:06             ` Jerin Jacob
2017-09-11  8:46               ` Shahaf Shuler
2017-09-11  9:05                 ` Jerin Jacob
2017-09-11 11:02                   ` Ananyev, Konstantin
2017-09-12  4:01                     ` Jerin Jacob
2017-09-12  5:25                       ` Shahaf Shuler
2017-09-12  5:51                         ` Jerin Jacob
2017-09-12  6:35                           ` Shahaf Shuler
2017-09-12  6:46                             ` Andrew Rybchenko
2017-09-12  7:17                             ` Jerin Jacob
2017-09-12  8:03                               ` Shahaf Shuler
2017-09-12 10:27                                 ` Andrew Rybchenko
2017-09-12 14:26                                   ` Ananyev, Konstantin
2017-09-12 14:36                                     ` Jerin Jacob
2017-09-12 14:43                                       ` Andrew Rybchenko
2017-09-12  6:43                           ` Andrew Rybchenko
2017-09-12  6:59                             ` Shahaf Shuler
2017-09-11  8:03     ` Andrew Rybchenko
2017-09-11 12:27       ` Shahaf Shuler
2017-09-11 13:10         ` Andrew Rybchenko
2017-09-13  6:37   ` [dpdk-dev] [PATCH v3 0/2] ethdev new " Shahaf Shuler
2017-09-13  6:37     ` [dpdk-dev] [PATCH v3 1/2] ethdev: introduce Rx queue " Shahaf Shuler
2017-09-13  8:13       ` Andrew Rybchenko
2017-09-13 12:49         ` Shahaf Shuler
2017-09-13  8:49       ` Andrew Rybchenko
2017-09-13  9:13         ` Andrew Rybchenko
2017-09-13 12:33           ` Shahaf Shuler
2017-09-13 12:34             ` Andrew Rybchenko
2017-09-13  6:37     ` [dpdk-dev] [PATCH v3 2/2] ethdev: introduce Tx " Shahaf Shuler
2017-09-13  8:40       ` Andrew Rybchenko
2017-09-13 12:51         ` Shahaf Shuler
2017-09-13  9:10     ` [dpdk-dev] [PATCH v3 0/2] ethdev new " Andrew Rybchenko
2017-09-17  6:54     ` [dpdk-dev] [PATCH v4 0/3] " Shahaf Shuler
2017-09-17  6:54       ` [dpdk-dev] [PATCH v4 1/3] ethdev: introduce Rx queue " Shahaf Shuler
2017-09-17  6:54       ` [dpdk-dev] [PATCH v4 2/3] ethdev: introduce Tx " Shahaf Shuler
2017-09-18  7:50         ` Andrew Rybchenko
2017-09-17  6:54       ` [dpdk-dev] [PATCH v4 3/3] doc: add details on ethdev " Shahaf Shuler
2017-09-18  7:51         ` Andrew Rybchenko
2017-09-18 13:40         ` Mcnamara, John
2017-09-18  7:51       ` [dpdk-dev] [PATCH v4 0/3] ethdev new " Andrew Rybchenko
2017-09-28 18:54       ` [dpdk-dev] [PATCH v5 " Shahaf Shuler
2017-09-28 18:54         ` [dpdk-dev] [PATCH v5 1/3] ethdev: introduce Rx queue " Shahaf Shuler
2017-10-03  0:32           ` Ferruh Yigit
2017-10-03  6:25             ` Shahaf Shuler
2017-10-03 19:46               ` Ferruh Yigit
2017-09-28 18:54         ` [dpdk-dev] [PATCH v5 2/3] ethdev: introduce Tx " Shahaf Shuler
2017-10-03 19:50           ` Ferruh Yigit
2017-10-04  8:06             ` Shahaf Shuler
2017-09-28 18:54         ` [dpdk-dev] [PATCH v5 3/3] doc: add details on ethdev " Shahaf Shuler
2017-10-04  8:17         ` [dpdk-dev] [PATCH v6 0/4] ethdev new " Shahaf Shuler
2017-10-04  8:17           ` [dpdk-dev] [PATCH v6 1/4] ethdev: introduce Rx queue " Shahaf Shuler
2017-10-04  8:17           ` [dpdk-dev] [PATCH v6 2/4] ethdev: introduce Tx " Shahaf Shuler
2017-10-04  8:18           ` [dpdk-dev] [PATCH v6 3/4] ethdev: add mbuf fast free Tx offload Shahaf Shuler
2017-10-04  8:18           ` [dpdk-dev] [PATCH v6 4/4] doc: add details on ethdev offloads API Shahaf Shuler
2017-10-04 13:46             ` Mcnamara, John
2018-03-15  1:58             ` Patil, Harish
2018-03-15  6:05               ` Shahaf Shuler
2018-03-16 15:51             ` [dpdk-dev] [PATCH] doc: update new ethdev offload API description Ferruh Yigit
2018-03-17  0:16               ` Patil, Harish
2018-03-18  5:52               ` Shahaf Shuler
2018-03-21  9:47               ` Andrew Rybchenko
2018-03-21 10:54                 ` Ferruh Yigit
2018-03-21 11:08                   ` Andrew Rybchenko
2018-03-21 11:10                     ` Shahaf Shuler
2018-03-21 11:19                       ` Andrew Rybchenko
2018-03-21 11:23                         ` Shahaf Shuler
2018-03-21 11:37                           ` Andrew Rybchenko
2018-03-21 11:40                             ` Shahaf Shuler
2018-03-21 12:52                               ` Ferruh Yigit
2018-03-21 13:06                                 ` Shahaf Shuler
2018-03-21 13:11                                   ` Ananyev, Konstantin
2018-03-21 12:03                             ` Ananyev, Konstantin
2018-03-21 12:29                               ` Shahaf Shuler
2018-03-21 12:34                               ` Andrew Rybchenko
2018-03-21 12:37                                 ` Ananyev, Konstantin
2018-03-21 14:08                   ` Thomas Monjalon
2018-03-21 14:28                     ` Ferruh Yigit
2018-03-21 14:40                       ` Thomas Monjalon
2018-03-21 15:26                         ` Bruce Richardson
2018-03-21 15:29                           ` Shahaf Shuler
2018-03-21 15:44                             ` Bruce Richardson
2018-05-08 12:33               ` Ferruh Yigit
2017-10-04 16:12           ` [dpdk-dev] [PATCH v6 0/4] ethdev new offloads API Ananyev, Konstantin
2017-10-05  0:55             ` Ferruh Yigit

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=17308371.d9TKsa5cRG@xps \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=shahafs@mellanox.com \
    --cc=stephen@networkplumber.org \
    /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).