mbox series

[v2,00/10] ethdev: datapath-focused flow rules management

Message ID 20220118153027.3947448-1-akozyrev@nvidia.com (mailing list archive)
Headers
Series ethdev: datapath-focused flow rules management |

Message

Alexander Kozyrev Jan. 18, 2022, 3:30 p.m. UTC
  Three major changes to a generic RTE Flow API were implemented in order
to speed up flow rule insertion/destruction and adapt the API to the
needs of a datapath-focused flow rules management applications:

1. Pre-configuration hints.
Application may give us some hints on what type of resources are needed.
Introduce the configuration routine to prepare all the needed resources
inside a PMD/HW before any flow rules are created at the init stage.

2. Flow grouping using templates.
Use the knowledge about which flow rules are to be used in an application
and prepare item and action templates for them in advance. Group flow rules
with common patterns and actions together for better resource management.

3. Queue-based flow management.
Perform flow rule insertion/destruction asynchronously to spare the datapath
from blocking on RTE Flow API and allow it to continue with packet processing.
Enqueue flow rules operations and poll for the results later.

testpmd examples are part of the patch series. PMD changes will follow.

RFC: https://patchwork.dpdk.org/project/dpdk/cover/20211006044835.3936226-1-akozyrev@nvidia.com/

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>

---
v2: fixed patch series thread

Alexander Kozyrev (10):
  ethdev: introduce flow pre-configuration hints
  ethdev: add flow item/action templates
  ethdev: bring in async queue-based flow rules operations
  app/testpmd: implement rte flow configure
  app/testpmd: implement rte flow item/action template
  app/testpmd: implement rte flow table
  app/testpmd: implement rte flow queue create flow
  app/testpmd: implement rte flow queue drain
  app/testpmd: implement rte flow queue dequeue
  app/testpmd: implement rte flow queue indirect action

 app/test-pmd/cmdline_flow.c                   | 1484 ++++++++++++++++-
 app/test-pmd/config.c                         |  731 ++++++++
 app/test-pmd/testpmd.h                        |   61 +
 doc/guides/prog_guide/img/rte_flow_q_init.svg |   71 +
 .../prog_guide/img/rte_flow_q_usage.svg       |   60 +
 doc/guides/prog_guide/rte_flow.rst            |  319 ++++
 doc/guides/rel_notes/release_22_03.rst        |   19 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  350 +++-
 lib/ethdev/rte_flow.c                         |  332 ++++
 lib/ethdev/rte_flow.h                         |  680 ++++++++
 lib/ethdev/rte_flow_driver.h                  |  103 ++
 lib/ethdev/version.map                        |   16 +
 12 files changed, 4203 insertions(+), 23 deletions(-)
 create mode 100644 doc/guides/prog_guide/img/rte_flow_q_init.svg
 create mode 100644 doc/guides/prog_guide/img/rte_flow_q_usage.svg
  

Comments

Suanming Mou Jan. 19, 2022, 7:16 a.m. UTC | #1
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Tuesday, January 18, 2022 11:30 PM
> To: dev@dpdk.org
> Cc: Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> <thomas@monjalon.net>; ivan.malov@oktetlabs.ru;
> andrew.rybchenko@oktetlabs.ru; ferruh.yigit@intel.com;
> mohammad.abdul.awal@intel.com; qi.z.zhang@intel.com; jerinj@marvell.com;
> ajit.khaparde@broadcom.com
> Subject: [PATCH v2 00/10] ethdev: datapath-focused flow rules management
> 
> Three major changes to a generic RTE Flow API were implemented in order to
> speed up flow rule insertion/destruction and adapt the API to the needs of a
> datapath-focused flow rules management applications:
> 
> 1. Pre-configuration hints.
> Application may give us some hints on what type of resources are needed.
> Introduce the configuration routine to prepare all the needed resources inside a
> PMD/HW before any flow rules are created at the init stage.
> 
> 2. Flow grouping using templates.
> Use the knowledge about which flow rules are to be used in an application and
> prepare item and action templates for them in advance. Group flow rules with
> common patterns and actions together for better resource management.
> 
> 3. Queue-based flow management.
> Perform flow rule insertion/destruction asynchronously to spare the datapath
> from blocking on RTE Flow API and allow it to continue with packet processing.
> Enqueue flow rules operations and poll for the results later.
> 
> testpmd examples are part of the patch series. PMD changes will follow.
> 
> RFC:
> https://patchwork.dpdk.org/project/dpdk/cover/20211006044835.3936226-1-
> akozyrev@nvidia.com/
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
> 
> ---
> v2: fixed patch series thread
> 
> Alexander Kozyrev (10):
>   ethdev: introduce flow pre-configuration hints
>   ethdev: add flow item/action templates
>   ethdev: bring in async queue-based flow rules operations
>   app/testpmd: implement rte flow configure
>   app/testpmd: implement rte flow item/action template
>   app/testpmd: implement rte flow table
>   app/testpmd: implement rte flow queue create flow
>   app/testpmd: implement rte flow queue drain
>   app/testpmd: implement rte flow queue dequeue
>   app/testpmd: implement rte flow queue indirect action
> 
>  app/test-pmd/cmdline_flow.c                   | 1484 ++++++++++++++++-
>  app/test-pmd/config.c                         |  731 ++++++++
>  app/test-pmd/testpmd.h                        |   61 +
>  doc/guides/prog_guide/img/rte_flow_q_init.svg |   71 +
>  .../prog_guide/img/rte_flow_q_usage.svg       |   60 +
>  doc/guides/prog_guide/rte_flow.rst            |  319 ++++
>  doc/guides/rel_notes/release_22_03.rst        |   19 +
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  350 +++-
>  lib/ethdev/rte_flow.c                         |  332 ++++
>  lib/ethdev/rte_flow.h                         |  680 ++++++++
>  lib/ethdev/rte_flow_driver.h                  |  103 ++
>  lib/ethdev/version.map                        |   16 +
>  12 files changed, 4203 insertions(+), 23 deletions(-)  create mode 100644
> doc/guides/prog_guide/img/rte_flow_q_init.svg
>  create mode 100644 doc/guides/prog_guide/img/rte_flow_q_usage.svg
> 
> --
> 2.18.2
  
Ori Kam Jan. 24, 2022, 3:10 p.m. UTC | #2
Hi Alex,

> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Subject: RE: [PATCH v2 00/10] ethdev: datapath-focused flow rules management
> 
> 
> 
> > -----Original Message-----
> > From: Alexander Kozyrev <akozyrev@nvidia.com>
> > Sent: Tuesday, January 18, 2022 11:30 PM
> > To: dev@dpdk.org
> > Cc: Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas Monjalon (EXTERNAL)
> > <thomas@monjalon.net>; ivan.malov@oktetlabs.ru;
> > andrew.rybchenko@oktetlabs.ru; ferruh.yigit@intel.com;
> > mohammad.abdul.awal@intel.com; qi.z.zhang@intel.com; jerinj@marvell.com;
> > ajit.khaparde@broadcom.com
> > Subject: [PATCH v2 00/10] ethdev: datapath-focused flow rules management
> >
> > Three major changes to a generic RTE Flow API were implemented in order to
> > speed up flow rule insertion/destruction and adapt the API to the needs of a
> > datapath-focused flow rules management applications:
> >
> > 1. Pre-configuration hints.
> > Application may give us some hints on what type of resources are needed.
> > Introduce the configuration routine to prepare all the needed resources inside a
> > PMD/HW before any flow rules are created at the init stage.
> >
> > 2. Flow grouping using templates.
> > Use the knowledge about which flow rules are to be used in an application and
> > prepare item and action templates for them in advance. Group flow rules with
> > common patterns and actions together for better resource management.
> >
> > 3. Queue-based flow management.
> > Perform flow rule insertion/destruction asynchronously to spare the datapath
> > from blocking on RTE Flow API and allow it to continue with packet processing.
> > Enqueue flow rules operations and poll for the results later.
> >
> > testpmd examples are part of the patch series. PMD changes will follow.
> >
> > RFC:
> > https://patchwork.dpdk.org/project/dpdk/cover/20211006044835.3936226-1-
> > akozyrev@nvidia.com/
> >
> > Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
> >
> > ---
> > v2: fixed patch series thread
> >
> > Alexander Kozyrev (10):
> >   ethdev: introduce flow pre-configuration hints
> >   ethdev: add flow item/action templates
> >   ethdev: bring in async queue-based flow rules operations
> >   app/testpmd: implement rte flow configure
> >   app/testpmd: implement rte flow item/action template
> >   app/testpmd: implement rte flow table
> >   app/testpmd: implement rte flow queue create flow
> >   app/testpmd: implement rte flow queue drain
> >   app/testpmd: implement rte flow queue dequeue
> >   app/testpmd: implement rte flow queue indirect action
> >
> >  app/test-pmd/cmdline_flow.c                   | 1484 ++++++++++++++++-
> >  app/test-pmd/config.c                         |  731 ++++++++
> >  app/test-pmd/testpmd.h                        |   61 +
> >  doc/guides/prog_guide/img/rte_flow_q_init.svg |   71 +
> >  .../prog_guide/img/rte_flow_q_usage.svg       |   60 +
> >  doc/guides/prog_guide/rte_flow.rst            |  319 ++++
> >  doc/guides/rel_notes/release_22_03.rst        |   19 +
> >  doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  350 +++-
> >  lib/ethdev/rte_flow.c                         |  332 ++++
> >  lib/ethdev/rte_flow.h                         |  680 ++++++++
> >  lib/ethdev/rte_flow_driver.h                  |  103 ++
> >  lib/ethdev/version.map                        |   16 +
> >  12 files changed, 4203 insertions(+), 23 deletions(-)  create mode 100644
> > doc/guides/prog_guide/img/rte_flow_q_init.svg
> >  create mode 100644 doc/guides/prog_guide/img/rte_flow_q_usage.svg
> >
> > --
> > 2.18.2
Series-acked-by:  Ori Kam <orika@nvidia.com>

Thanks,
Ori