All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags
@ 2021-07-30 15:57 Olivier Matz
  2021-07-31 12:15 ` Andrew Rybchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Olivier Matz @ 2021-07-30 15:57 UTC (permalink / raw)
  To: dev; +Cc: Ray Kinsella

The mbuf offload flags do not match the DPDK namespace (they are
not prefixed by RTE_). Announce their rename in 21.11, and the
removal of the old names in 22.11.

A draft coccinelle script is provided to anticipate what the
renaming will be.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 .../cocci/prefix_mbuf_offload_flags.cocci     | 436 ++++++++++++++++++
 doc/guides/rel_notes/deprecation.rst          |   5 +
 2 files changed, 441 insertions(+)
 create mode 100644 devtools/cocci/prefix_mbuf_offload_flags.cocci

diff --git a/devtools/cocci/prefix_mbuf_offload_flags.cocci b/devtools/cocci/prefix_mbuf_offload_flags.cocci
new file mode 100644
index 0000000000..8bfc7c29d1
--- /dev/null
+++ b/devtools/cocci/prefix_mbuf_offload_flags.cocci
@@ -0,0 +1,436 @@
+//
+// Rename mbuf offload flags (and some other defines) to have
+// an RTE_ prefix.
+// This only replaces usages in C code, so it is advised to
+// check for missing occurences with:
+//   for f in $(git ls-tree --full-tree -r --name-only HEAD); do
+//     if [ "$(file -b --mime-encoding $f)" != binary ]; then
+//       sed -i -e 's,PKT_RX_,RTE_MBUF_F_RX_,g' \
+//         -e 's,PKT_TX_,RTE_MBUF_F_TX_,g' \
+//         -e 's,EXT_ATTACHED_MBUF,RTE_MBUF_F_EXTERNAL,g' \
+//         -e 's,IND_ATTACHED_MBUF,RTE_MBUF_F_INDIRECT,g' \
+//         -e 's,PKT_FIRST_FREE,RTE_MBUF_F_FIRST_FREE,g' \
+//         -e 's,PKT_LAST_FREE,RTE_MBUF_F_LAST_FREE,g' $f
+//     fi
+//   done
+//
+@@
+@@
+
+- PKT_RX_VLAN
++ RTE_MBUF_F_RX_VLAN
+
+@@
+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DYNF_METADATA
+
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9584d6bfd7..04cb141de7 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -147,3 +147,8 @@ Deprecation Notices
 * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
   original structure will be kept until DPDK 21.11.
+
+* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
+  A compatibility layer will be kept until DPDK 22.11, except for the flags
+  that are already deprecated (ex: ``PKT_RX_L4_CKSUM_BAD``), which will
+  be removed.
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags
  2021-07-30 15:57 [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags Olivier Matz
@ 2021-07-31 12:15 ` Andrew Rybchenko
  2021-08-02 13:05   ` Jerin Jacob
  2021-08-02 21:31   ` Ajit Khaparde
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Rybchenko @ 2021-07-31 12:15 UTC (permalink / raw)
  To: Olivier Matz, dev; +Cc: Ray Kinsella

On 7/30/21 6:57 PM, Olivier Matz wrote:
> The mbuf offload flags do not match the DPDK namespace (they are
> not prefixed by RTE_). Announce their rename in 21.11, and the
> removal of the old names in 22.11.
> 
> A draft coccinelle script is provided to anticipate what the
> renaming will be.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

[snip]

> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 9584d6bfd7..04cb141de7 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -147,3 +147,8 @@ Deprecation Notices
>   * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
>     content. On Linux and FreeBSD, supported prior to DPDK 20.11,
>     original structure will be kept until DPDK 21.11.
> +
> +* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
> +  A compatibility layer will be kept until DPDK 22.11, except for the flags
> +  that are already deprecated (ex: ``PKT_RX_L4_CKSUM_BAD``), which will
> +  be removed.
> 

I think it is better to be explicit with defines to be removed:
PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, PKT_TX_QINQ_PKT,
PKT_RX_EIP_CKSUM_BAD.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags
  2021-07-31 12:15 ` Andrew Rybchenko
@ 2021-08-02 13:05   ` Jerin Jacob
  2021-08-02 21:31   ` Ajit Khaparde
  1 sibling, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2021-08-02 13:05 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Olivier Matz, dpdk-dev, Ray Kinsella

On Sat, Jul 31, 2021 at 5:45 PM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> On 7/30/21 6:57 PM, Olivier Matz wrote:
> > The mbuf offload flags do not match the DPDK namespace (they are
> > not prefixed by RTE_). Announce their rename in 21.11, and the
> > removal of the old names in 22.11.
> >
> > A draft coccinelle script is provided to anticipate what the
> > renaming will be.
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Acked-by: Jerin Jacob <jerinj@marvell.com>


>
> [snip]
>
> > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > index 9584d6bfd7..04cb141de7 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -147,3 +147,8 @@ Deprecation Notices
> >   * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
> >     content. On Linux and FreeBSD, supported prior to DPDK 20.11,
> >     original structure will be kept until DPDK 21.11.
> > +
> > +* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
> > +  A compatibility layer will be kept until DPDK 22.11, except for the flags
> > +  that are already deprecated (ex: ``PKT_RX_L4_CKSUM_BAD``), which will
> > +  be removed.
> >
>
> I think it is better to be explicit with defines to be removed:
> PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, PKT_TX_QINQ_PKT,
> PKT_RX_EIP_CKSUM_BAD.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags
  2021-07-31 12:15 ` Andrew Rybchenko
  2021-08-02 13:05   ` Jerin Jacob
@ 2021-08-02 21:31   ` Ajit Khaparde
  2021-08-04 14:18     ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Ajit Khaparde @ 2021-08-02 21:31 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Olivier Matz, dpdk-dev, Ray Kinsella

[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]

On Sat, Jul 31, 2021 at 5:15 AM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> On 7/30/21 6:57 PM, Olivier Matz wrote:
> > The mbuf offload flags do not match the DPDK namespace (they are
> > not prefixed by RTE_). Announce their rename in 21.11, and the
> > removal of the old names in 22.11.
> >
> > A draft coccinelle script is provided to anticipate what the
> > renaming will be.
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
>
> [snip]
>
> > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > index 9584d6bfd7..04cb141de7 100644
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > @@ -147,3 +147,8 @@ Deprecation Notices
> >   * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
> >     content. On Linux and FreeBSD, supported prior to DPDK 20.11,
> >     original structure will be kept until DPDK 21.11.
> > +
> > +* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
> > +  A compatibility layer will be kept until DPDK 22.11, except for the flags
> > +  that are already deprecated (ex: ``PKT_RX_L4_CKSUM_BAD``), which will
> > +  be removed.
> >
>
> I think it is better to be explicit with defines to be removed:
> PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, PKT_TX_QINQ_PKT,
> PKT_RX_EIP_CKSUM_BAD.
+1
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags
  2021-08-02 21:31   ` Ajit Khaparde
@ 2021-08-04 14:18     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2021-08-04 14:18 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Andrew Rybchenko, dev, Ray Kinsella, Ajit Khaparde

> > > The mbuf offload flags do not match the DPDK namespace (they are
> > > not prefixed by RTE_). Announce their rename in 21.11, and the
> > > removal of the old names in 22.11.
> > >
> > > A draft coccinelle script is provided to anticipate what the
> > > renaming will be.
> > >
> > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> >
> > Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> >
> > [snip]
> >
> > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> > > index 9584d6bfd7..04cb141de7 100644
> > > --- a/doc/guides/rel_notes/deprecation.rst
> > > +++ b/doc/guides/rel_notes/deprecation.rst
> > > +* mbuf: The mbuf offload flags ``PKT_*`` will be renamed as ``RTE_MBUF_F_*``.
> > > +  A compatibility layer will be kept until DPDK 22.11, except for the flags
> > > +  that are already deprecated (ex: ``PKT_RX_L4_CKSUM_BAD``), which will
> > > +  be removed.
> >
> > I think it is better to be explicit with defines to be removed:
> > PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD, PKT_TX_QINQ_PKT,
> > PKT_RX_EIP_CKSUM_BAD.
> +1
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied with suggested changes.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-04 14:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 15:57 [dpdk-dev] [PATCH] doc: announce renaming of mbuf offload flags Olivier Matz
2021-07-31 12:15 ` Andrew Rybchenko
2021-08-02 13:05   ` Jerin Jacob
2021-08-02 21:31   ` Ajit Khaparde
2021-08-04 14:18     ` Thomas Monjalon

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.