All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: dev@dpdk.org, wenzhuo.lu@intel.com, wei.dai@intel.com,
	xiao.w.wang@intel.com, olivier.matz@6wind.com,
	thomas.monjalon@6wind.com, konstantin.ananyev@intel.com,
	helin.zhang@intel.com
Subject: Re: [PATCH v3 0/6] Add MACsec offload support for ixgbe
Date: Tue, 27 Dec 2016 15:37:46 +0100	[thread overview]
Message-ID: <20161227143746.GC3737@6wind.com> (raw)
In-Reply-To: <20161227013330.GA145018@dpdk19>

Hi Tiwei,

On Tue, Dec 27, 2016 at 09:33:31AM +0800, Tiwei Bie wrote:
> Hi Adrien,
> 
> On Mon, Dec 26, 2016 at 04:15:37PM +0100, Adrien Mazarguil wrote:
> > Hi Tiwei,
> > 
> > On Sun, Dec 25, 2016 at 10:57:54PM +0800, Tiwei Bie wrote:
> > > This patch set adds the MACsec offload support for ixgbe.
> > > The testpmd is also updated to support MACsec cmds.
> > 
> > I'm not commenting on any specific patch from this series, however I'm
> > noticing this new trend of working around ethdev to add PMD-specific APIs.
> > I would like to make sure it's not getting out of hand.
> > 
> > To use the "rte_pmd_ixgbe_macsec_*()" API, applications must be linked with
> > librte_pmd_ixgbe directly and have the related code under #ifdef
> > RTE_LIBRTE_IXGBE_PMD like testpmd.
> > 
> > Here we can see this ixgbe-specific API affects rte_mbuf.h and rte_ethdev.h
> > (new PKT_TX_MACSEC, RTE_ETH_EVENT_MACSEC, DEV_RX_OFFLOAD_MACSEC_STRIP and
> > DEV_TX_OFFLOAD_MACSEC_INSERT flags).
> > 
> > - Shouldn't these flags have "IXGBE" somewhere in their name and/or be
> >   defined under #ifdef RTE_LIBRTE_IXGBE_PMD? 
> > 
> 
> I think those flags are very generic, simple and innocent, so we could just
> define them in the normal way. And currently it seems that we lack a way to
> define the PMD-specific flags for mbuf, ethdev, etc.

Yes, this is probably the least intrusive approach. I'm just pointing out
that in the meantime, assigned values are not available for other generic
uses which is a problem unless there is a plan to make this API available
globally.

Missing flags and bits could also be defined directly by rte_pmd_ixgbe.h.

> > - Why can't the MACsec API be defined globally, for instance won't i40e
> >   implement it as well someday?
> 
> I think currently we prefer to implement some PMD features based on the
> PMD-specific APIs at first to avoid the bloating of the ethdev APIs. And
> when it proves to be generic (which means many people really need it and
> care about it, and more drivers are really going to implement it), then
> we make it as the global ethdev API.

Understandable, but then unless the global API remains exactly the same
including the "rte_ixgbe_macsec" prefix (which I think won't happen),
applications need to be rewritten, it's not convenient, and as a result may
prevent adoption due to the following cycle:

- Applications wait for the API to evolve before using MACsec.
- DPDK waits for applications to use the ixgbe MACsec API to improve it.

In the end, flags tied to a single PMD remain allocated in the global
namespace while the API is kept in this temporary state forever.

I think doing the extra work to make it global from the start is worth the
trouble. This step could perhaps be made easier if people agreed that
struct eth_dev_ops (and friends) must be opaque to applications.

> > - Why bothering with TX/RX offload capabilities if applications know the
> >   underlying PMD anyway?
> > 
> 
> Not every NIC supported by IXGBE supports the MACsec offload. So even
> if the application knows it's using IXGBE PMD, it still needs to check
> whether the MACsec offload capabilities are supported.

OK, I assumed they all did.

> > Assuming these patches are kept as-is, I suggest we define a reserved space
> > documented as such for PMD-specific flags wherever they are used.
> > 
> 
> It sounds good to me. But it may involve many pieces of the lib, such
> as the mbuf ol_flags, ethdev event type, ethdev offload capabilities,
> and so on. So maybe it can be done as another work.

Right, that was just an idea from the top of my head, we could define
reserved values only when they become necessary for a PMD as in this case,
e.g. instead of defining PKT_TX_MACSEC, one would define PKT_TX_RESERVED_0
which would be interpreted as MACSEC by ixgbe until this API is exposed
globally.

Other PMDs could implement other unrelated PMD-specific APIs through
RESERVED_0 in the meantime, so we preserve the precious space we have
for global APIs (especially inside mbufs).

Thoughts?

Best regards,

-- 
Adrien Mazarguil
6WIND

  reply	other threads:[~2016-12-27 14:37 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 14:59 [PATCH 0/3] Add MACsec offload support for ixgbe Tiwei Bie
2016-12-03 14:59 ` [PATCH 1/3] lib: add MACsec offload flags Tiwei Bie
2016-12-03 14:59 ` [PATCH 2/3] net/ixgbe: add MACsec offload support Tiwei Bie
2016-12-03 14:59 ` [PATCH 3/3] app/testpmd: add ixgbe " Tiwei Bie
2016-12-16  1:43 ` [PATCH v2 0/4] Add MACsec offload support for ixgbe Tiwei Bie
2016-12-16  1:43   ` [PATCH v2 1/4] lib: add MACsec offload flags Tiwei Bie
2016-12-16  1:43   ` [PATCH v2 2/4] net/ixgbe: add MACsec offload support Tiwei Bie
2016-12-16  1:43   ` [PATCH v2 3/4] app/testpmd: add ixgbe " Tiwei Bie
2016-12-16  1:43   ` [PATCH v2 4/4] doc: add ixgbe specific APIs Tiwei Bie
2016-12-16 10:29     ` Mcnamara, John
2016-12-25 14:57   ` [PATCH v3 0/6] Add MACsec offload support for ixgbe Tiwei Bie
2016-12-25 14:57     ` [PATCH v3 1/6] mbuf: add flag for MACsec Tiwei Bie
2016-12-25 14:57     ` [PATCH v3 2/6] ethdev: add event type " Tiwei Bie
2016-12-25 14:57     ` [PATCH v3 3/6] ethdev: add MACsec offload capability flags Tiwei Bie
2016-12-25 14:57     ` [PATCH v3 4/6] net/ixgbe: add MACsec offload support Tiwei Bie
2016-12-25 14:57     ` [PATCH v3 5/6] app/testpmd: add MACsec offload commands Tiwei Bie
2016-12-25 14:58     ` [PATCH v3 6/6] doc: add ixgbe specific APIs Tiwei Bie
2016-12-26 15:15     ` [PATCH v3 0/6] Add MACsec offload support for ixgbe Adrien Mazarguil
2016-12-27  1:33       ` Tiwei Bie
2016-12-27 14:37         ` Adrien Mazarguil [this message]
2016-12-27 17:42           ` Tiwei Bie
2016-12-28 15:41     ` [PATCH v4 0/7] " Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 1/7] mbuf: reserve a Tx offload flag for PMD-specific API Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 2/7] ethdev: reserve an event type " Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 3/7] ethdev: reserve capability flags " Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 4/7] net/ixgbe: add MACsec offload support Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 5/7] app/testpmd: add MACsec offload commands Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 6/7] doc: add ixgbe specific APIs Tiwei Bie
2016-12-28 15:41       ` [PATCH v4 7/7] doc: update the release notes for the reserved flags Tiwei Bie
2017-01-03  6:15       ` [PATCH v4 0/7] Add MACsec offload support for ixgbe Lu, Wenzhuo
2017-01-04  7:21       ` [PATCH v5 0/8] " Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 1/8] mbuf: reserve a Tx offload flag for PMD-specific API Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 2/8] ethdev: reserve an event type " Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 3/8] ethdev: reserve capability flags " Tiwei Bie
2017-01-04 14:21           ` Ananyev, Konstantin
2017-01-04 14:39             ` Tiwei Bie
2017-01-04 15:14               ` Ananyev, Konstantin
2017-01-04 17:00                 ` Tiwei Bie
2017-01-04 17:44                   ` Ananyev, Konstantin
2017-01-04 23:56                     ` Tiwei Bie
2017-01-05  8:33                       ` Adrien Mazarguil
2017-01-05 10:05                         ` Tiwei Bie
2017-01-05 11:32                         ` Ananyev, Konstantin
2017-01-05 18:21                           ` Adrien Mazarguil
2017-01-08 12:39                             ` Ananyev, Konstantin
2017-01-09  3:57                               ` Tiwei Bie
2017-01-09 11:26                                 ` Thomas Monjalon
2017-01-10  2:08                                   ` Tiwei Bie
2017-01-11 17:32                                   ` Olivier MATZ
2017-01-12  2:08                                     ` Tiwei Bie
2017-01-12  2:42                                     ` Yuanhan Liu
2017-01-09 14:41                               ` Adrien Mazarguil
2017-01-04  7:21         ` [PATCH v5 4/8] net/ixgbe: add MACsec offload support Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 5/8] app/testpmd: add MACsec offload commands Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 6/8] doc: add ixgbe specific APIs Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 7/8] doc: update the release notes for the reserved flags Tiwei Bie
2017-01-04  7:21         ` [PATCH v5 8/8] doc: add MACsec offload into NIC feature list Tiwei Bie
2017-01-04  8:29         ` [PATCH v5 0/8] Add MACsec offload support for ixgbe Peng, Yuan
2017-01-11  4:31         ` [PATCH v6 0/6] " Tiwei Bie
2017-01-11  4:31           ` [PATCH v6 1/6] mbuf: add flag for MACsec Tiwei Bie
2017-01-11 17:41             ` Olivier MATZ
2017-01-11  4:31           ` [PATCH v6 2/6] ethdev: add event type " Tiwei Bie
2017-01-11  4:31           ` [PATCH v6 3/6] ethdev: add MACsec offload capability flags Tiwei Bie
2017-01-11  4:31           ` [PATCH v6 4/6] net/ixgbe: add MACsec offload support Tiwei Bie
2017-01-11  4:31           ` [PATCH v6 5/6] app/testpmd: add MACsec offload commands Tiwei Bie
2017-01-13  9:07             ` Thomas Monjalon
2017-01-13  9:16               ` Tiwei Bie
2017-01-11  4:31           ` [PATCH v6 6/6] doc: add ixgbe specific APIs Tiwei Bie
2017-01-13 11:21           ` [PATCH v7 0/6] Add MACsec offload support for ixgbe Tiwei Bie
2017-01-13 11:21             ` [PATCH v7 1/6] mbuf: add flag for MACsec Tiwei Bie
2017-01-13 11:21             ` [PATCH v7 2/6] ethdev: add event type " Tiwei Bie
2017-01-16  2:31               ` Ananyev, Konstantin
2017-01-13 11:21             ` [PATCH v7 3/6] ethdev: add MACsec offload capability flags Tiwei Bie
2017-01-16  2:33               ` Ananyev, Konstantin
2017-01-13 11:21             ` [PATCH v7 4/6] net/ixgbe: add MACsec offload support Tiwei Bie
2017-01-13 11:21             ` [PATCH v7 5/6] app/testpmd: add MACsec offload commands Tiwei Bie
2017-01-13 11:21             ` [PATCH v7 6/6] doc: add ixgbe specific APIs Tiwei Bie
2017-01-15 18:19             ` [PATCH v7 0/6] Add MACsec offload support for ixgbe Thomas Monjalon
2017-01-23  2:30             ` Peng, Yuan

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=20161227143746.GC3737@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=tiwei.bie@intel.com \
    --cc=wei.dai@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.