From: Alexander Kozyrev <akozyrev@nvidia.com>
To: Jerin Jacob <jerinjacobk@gmail.com>, Ori Kam <orika@nvidia.com>
Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
"aboyer@pensando.io" <aboyer@pensando.io>,
dpdk-dev <dev@dpdk.org>, Slava Ovsiienko <viacheslavo@nvidia.com>,
NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow action
Date: Fri, 15 Jan 2021 15:33:11 +0000 [thread overview]
Message-ID: <BN7PR12MB2707455B5FAC06A2D5AE67EEAFA70@BN7PR12MB2707.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CALBAE1PLvcyDGL78KpABnMTwniy87JNefTm50_bRQKRvtVKbcw@mail.gmail.com>
> From: Jerin Jacob <jerinjacobk@gmail.com> on Friday, January 15, 2021 9:01
> Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow
> action
>
> On Thu, Jan 14, 2021 at 8:32 PM Ori Kam <orika@nvidia.com> wrote:
> >
> > Hi Jerin,
> >
> > > -----Original Message-----
> > > From: Jerin Jacob <jerinjacobk@gmail.com>
> > > Sent: Thursday, January 14, 2021 4:00 PM
> > > Subject: Re: [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow
> action
> > >
> > > On Fri, Jan 8, 2021 at 12:02 PM Alexander Kozyrev
> <akozyrev@nvidia.com>
> > > wrote:
> > > >
> > > > Implement a generic copy flow API to allow copying of an arbitrary
> > > > header field (as well as mark, metadata or tag) to another item.
> > > >
> > > > This generic copy mechanism removes the necessity to implement a
> > > > separate RTE Flow action every time we need to modify a new packet
> > > > field in the future. A user-provided value can be used from a
> > > > specified tag/metadata or directly copied from other packet field.
> > > >
> > > > The number of bits to copy as well as the offset to start from can
> > > > be specified to allow a partial copy or copy into an arbitrary
> > > > place in a packet for greater flexibility.
> > > >
> > > > RFC:
> > >
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> es.d
> > >
> pdk.org%2Fpatch%2F85384%2F&data=04%7C01%7Corika%40nvidia.com
> %
> > >
> 7C62ab41b9ed5948d056c308d8b894af02%7C43083d15727340c1b7db39efd9cc
> > >
> c17a%7C0%7C0%7C637462296023413253%7CUnknown%7CTWFpbGZsb3d8ey
> J
> > >
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
> 7C
> > >
> 1000&sdata=ovpEss3%2B7TgZRYFiDkrvuMFW52747Gno5oOIeDLwrBQ%
> 3D
> > > &reserved=0
> > > >
> > > > Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> > > > ---
> > >
> > > >
> > > > +Action: ``COPY_ITEM``
> > > > +^^^^^^^^^^^^^^^^^^^^^
> > > > +
> > > > +Copy ``width`` bits from ``src`` item to ``dst`` item.
> > > > +
> > > > +An arbitrary header field (as well as mark, metadata or tag values)
> > > > +can be used as both source and destination items as set by ``item``.
> > > > +
> > > > +Inner packet header fields can be accessed using the ``index`` and
> > > > +it is possible to start the copy from the ``offset`` bits in an item.
> > > > +
> > > > +.. _table_rte_flow_action_copy_item:
> > > > +
> > > > +.. table:: COPY_ITEM
> > > > +
> > > > + +-----------------------------------------+
> > > > + | Field | Value |
> > > > + +===============+=========================+
> > > > + | ``dst`` | destination item |
> > > > + | ``src`` | source item |
> > > > + | ``width`` | number of bits to copy |
> > >
> > >
> > >
> > > Overall it is a good improvement.
> > >
> > > I think, if we add transform "op" here then it can be more generic. In
> > > other words, A generic packet transform and copy operation is just one
> > > of the operations.
> > > ie.. making it as rte_flow_action_xform_item and introduce COPY, ADD,
> > > SUB, etc transform along with existing rte_flow_action_copy_item
> > > fields.
> > >
> > > It may useful for expressing P4 packet transforms to rte_flow.
> > >
> > > The current generation of Marvell HW does not have COPY transform so I
> > > am leaving suggestions to vendors with this HW capablity.
> > >
> > >
> >
> > +1
> > Lest have dst, src, width, op members,
> > and change the action name to rte_flow_action_modify_field()
> >
> > also lest add new field name immediate so the copy can be used as set.
> > (copy of an immediate value is a set)
> >
> > Possible op = copy / add / sub
>
> +1
Thank you, Jerin, for a great idea. I'm issuing a v4 patch with generic modify_field design.
>
> >
> > > > + +---------------+-------------------------+
> > >
> > >
> > >
> > >
> > > > +
> > > > +.. _table_rte_flow_action_copy_data:
> > > > +
> > > > +.. table:: destination/source item definition
> > > > +
> > > > + +----------------------------------------------------------+
> > > > + | Field | Value |
> > > > +
> +===============+=========================================
> =+
> > > > + | ``item`` | ID of a packet field/mark/metadata/tag |
> > > > + | ``index`` | index of outer/inner header or tag array |
> > > > + | ``offset`` | number of bits to skip during the copy |
> > > > + +---------------+------------------------------------------+
> > > > +
prev parent reply other threads:[~2021-01-15 15:33 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 6:32 Alexander Kozyrev
2021-01-10 8:00 ` Ori Kam
2021-01-10 9:36 ` Asaf Penso
2021-01-12 14:15 ` Alexander Kozyrev
2021-01-12 14:52 ` Ori Kam
2021-01-12 15:13 ` Ori Kam
2021-01-12 17:19 ` Alexander Kozyrev
2021-01-12 5:01 ` [dpdk-dev] [PATCH v2 0/2] generic copy rte flow action support Alexander Kozyrev
2021-01-12 5:01 ` [dpdk-dev] [PATCH v2 1/2] ethdev: introduce generic copy rte flow action Alexander Kozyrev
2021-01-12 5:01 ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: add support for " Alexander Kozyrev
2021-01-12 14:58 ` Ori Kam
2021-01-13 3:38 ` [dpdk-dev] [PATCH v3 0/2] generic copy rte flow action support Alexander Kozyrev
2021-01-13 3:38 ` [dpdk-dev] [PATCH v3 1/2] ethdev: introduce generic copy rte flow action Alexander Kozyrev
2021-01-13 11:12 ` Ori Kam
2021-01-13 3:38 ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: add support for " Alexander Kozyrev
2021-01-13 17:07 ` [dpdk-dev] [PATCH v4 0/2] generic copy rte flow action support Alexander Kozyrev
2021-01-13 17:07 ` [dpdk-dev] [PATCH v4 1/2] ethdev: introduce generic copy rte flow action Alexander Kozyrev
2021-01-14 12:22 ` Ori Kam
2021-01-13 17:07 ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: add support for " Alexander Kozyrev
2021-01-14 15:18 ` Ori Kam
2021-01-15 15:37 ` Alexander Kozyrev
2021-01-15 15:42 ` [dpdk-dev] [PATCH v5 0/2] generic modify rte flow action support Alexander Kozyrev
2021-01-15 15:42 ` [dpdk-dev] [PATCH v5 1/2] ethdev: introduce generic modify rte flow action Alexander Kozyrev
2021-01-15 18:03 ` Ori Kam
2021-01-17 9:23 ` Slava Ovsiienko
2021-01-15 15:42 ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: add support for modify field " Alexander Kozyrev
2021-01-15 18:04 ` Ori Kam
2021-01-16 4:44 ` [dpdk-dev] [PATCH v6 0/2] generic modify rte flow action support Alexander Kozyrev
2021-01-16 4:44 ` [dpdk-dev] [PATCH v6 1/2] ethdev: introduce generic modify rte flow action Alexander Kozyrev
2021-01-16 4:44 ` [dpdk-dev] [PATCH v6 2/2] app/testpmd: add support for modify field " Alexander Kozyrev
2021-01-16 4:50 ` [dpdk-dev] [PATCH v7 0/2] generic modify rte flow action support Alexander Kozyrev
2021-01-16 4:50 ` [dpdk-dev] [PATCH v7 1/2] ethdev: introduce generic modify rte flow action Alexander Kozyrev
2021-01-17 23:15 ` Thomas Monjalon
2021-01-18 16:03 ` Alexander Kozyrev
2021-01-16 4:50 ` [dpdk-dev] [PATCH v7 2/2] app/testpmd: add support for modify field " Alexander Kozyrev
2021-01-18 16:18 ` [dpdk-dev] [PATCH v8 0/2] generic modify rte flow action support Alexander Kozyrev
2021-01-18 16:18 ` [dpdk-dev] [PATCH v8 1/2] ethdev: introduce generic modify rte flow action Alexander Kozyrev
2021-01-18 17:51 ` Thomas Monjalon
2021-01-18 16:18 ` [dpdk-dev] [PATCH v8 2/2] app/testpmd: add support for modify field " Alexander Kozyrev
2021-01-18 20:05 ` [dpdk-dev] [PATCH v8 0/2] generic modify rte flow action support Ajit Khaparde
2021-01-18 21:40 ` [dpdk-dev] [PATCH v9 " Alexander Kozyrev
2021-01-18 21:40 ` [dpdk-dev] [PATCH v9 1/2] ethdev: introduce generic modify rte flow action Alexander Kozyrev
2021-01-18 21:40 ` [dpdk-dev] [PATCH v9 2/2] app/testpmd: add support for modify field " Alexander Kozyrev
2021-01-19 1:21 ` [dpdk-dev] [PATCH v9 0/2] generic modify rte flow action support Ferruh Yigit
2021-01-14 13:59 ` [dpdk-dev] [PATCH] ethdev: introduce generic copy rte flow action Jerin Jacob
2021-01-14 15:02 ` Ori Kam
2021-01-15 14:00 ` Jerin Jacob
2021-01-15 15:33 ` Alexander Kozyrev [this message]
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=BN7PR12MB2707455B5FAC06A2D5AE67EEAFA70@BN7PR12MB2707.namprd12.prod.outlook.com \
--to=akozyrev@nvidia.com \
--cc=aboyer@pensando.io \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinjacobk@gmail.com \
--cc=orika@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).