Feature arc slides

Nitin Saxena nsaxena16 at gmail.com
Fri Jan 3 15:59:15 CET 2025


Sending to DPDK community again

Thanks,
Nitin

---------- Forwarded message ---------
From: Nitin Saxena <nsaxena at marvell.com>
Date: Fri, Jan 3, 2025 at 8:11 PM
Subject: RE: [EXTERNAL] [PATCH v6 0/4] add feature arc in rte_graph
To: Jerin Jacob <jerinj at marvell.com>, Kiran Kumar Kokkilagadda
<kirankumark at marvell.com>, Nithin Kumar Dabilpuram
<ndabilpuram at marvell.com>, Zhirun Yan <yanzhirun_163 at 163.com>, Robin
Jarry <rjarry at redhat.com>, Christophe Fontaine <cfontain at redhat.com>
Cc: dev at dpdk.org <dev at dpdk.org>, Nitin Saxena <nsaxena16 at gmail.com>


Hi,



Please find attached slides explaining feature arc concept and its
usage in graph library



I can also present these slides to community to facilitate this patch
series review process



Thanks,

Nitin



From: Nitin Saxena <nsaxena at marvell.com>
Sent: Friday, January 3, 2025 11:36 AM
To: Jerin Jacob <jerinj at marvell.com>; Kiran Kumar Kokkilagadda
<kirankumark at marvell.com>; Nithin Kumar Dabilpuram
<ndabilpuram at marvell.com>; Zhirun Yan <yanzhirun_163 at 163.com>; Robin
Jarry <rjarry at redhat.com>; Christophe Fontaine <cfontain at redhat.com>
Cc: dev at dpdk.org; Nitin Saxena <nsaxena16 at gmail.com>
Subject: [EXTERNAL] [PATCH v6 0/4] add feature arc in rte_graph



Feature arc represents an ordered list of features/protocols at a
given networking layer. It is a high level abstraction to connect
various rte_graph nodes, as feature nodes, and allow packets steering
across these nodes in a generic manner.

Feature arc represents an ordered list of features/protocols at a given

networking layer. It is a high level abstraction to connect various

rte_graph nodes, as feature nodes, and allow packets steering across

these nodes in a generic manner.



Features (or feature nodes) are nodes which handles partial or complete

handling of a protocol in fast path. Like ipv4-rewrite node, which adds

rewrite data to an outgoing IPv4 packet.



However in above example, outgoing interface(say "eth0") may have

outbound IPsec policy enabled, hence packets must be steered from

ipv4-rewrite node to ipsec-outbound-policy node for outbound IPsec

policy lookup. On the other hand, packets routed to another interface

(eth1) will not be sent to ipsec-outbound-policy node as IPsec feature

is disabled on eth1. Feature-arc allows rte_graph applications to manage

such constraints easily



Feature arc abstraction allows rte_graph based application to



1. Seamlessly steer packets across feature nodes based on whether

feature is enabled or disabled on an interface. Features enabled on one

interface may not be enabled on another interface with in a same feature

arc.



2. Allow enabling/disabling of features on an interface at runtime,

so that if a feature is disabled, packets associated with that interface

won't be steered to corresponding feature node.



3. Provides mechanism to hook custom/user-defined nodes to a feature

node and allow packet steering from feature node to custom node without

changing former's fast path function



4. Allow expressing features in a particular sequential order so that

packets are steered in an ordered way across nodes in fast path. For

eg: if IPsec and IPv4 features are enabled on an ingress interface,

packets must be sent to IPsec inbound policy node first and then to ipv4

lookup node.



This patch series adds feature arc library in rte_graph and also adds

"ipv4-output" feature arc handling in "ipv4-rewrite" node.



Changes in v6:

- Rebased to latest main for DPDK-25.03

- Added constructor based feature arc/feature registration

- Changed design to handle fast path synchronization via RCU mechanism

  when any feature is enabled or disabled

- Added feature arc specific mbuf dynamic field to carry feature data

  across nodes

- Added feature arc example in app/graph

- Programming guide and functional test cases in future versions



Nitin Saxena (4):

  graph: add API to override node process function

  graph: add feature arc abstraction

  ip4: add ip4 output feature arc

  app/graph: add custom feature nodes for ip4 output arc



 app/graph/commands.list                  |    6 +

 app/graph/feature.c                      |  141 ++

 app/graph/feature.h                      |   13 +

 app/graph/graph.c                        |    4 +

 app/graph/ip4_output_hook.c              |  169 ++

 app/graph/main.c                         |   15 +-

 app/graph/meson.build                    |    2 +

 app/graph/module_api.h                   |    2 +

 doc/api/doxy-api-index.md                |    2 +

 doc/guides/rel_notes/release_25_03.rst   |   10 +

 lib/graph/graph_feature_arc.c            | 1780 ++++++++++++++++++++++

 lib/graph/graph_private.h                |   15 +

 lib/graph/meson.build                    |    4 +-

 lib/graph/node.c                         |   23 +

 lib/graph/rte_graph_feature_arc.h        |  552 +++++++

 lib/graph/rte_graph_feature_arc_worker.h |  608 ++++++++

 lib/graph/version.map                    |   20 +

 lib/node/ethdev_ctrl.c                   |    8 +

 lib/node/interface_tx_feature.c          |  133 ++

 lib/node/interface_tx_feature_priv.h     |   33 +

 lib/node/ip4_rewrite.c                   |  298 +++-

 lib/node/meson.build                     |    1 +

 lib/node/node_private.h                  |    1 +

 lib/node/rte_node_ip4_api.h              |    4 +

 24 files changed, 3838 insertions(+), 6 deletions(-)

 create mode 100644 app/graph/feature.c

 create mode 100644 app/graph/feature.h

 create mode 100644 app/graph/ip4_output_hook.c

 create mode 100644 lib/graph/graph_feature_arc.c

 create mode 100644 lib/graph/rte_graph_feature_arc.h

 create mode 100644 lib/graph/rte_graph_feature_arc_worker.h

 create mode 100644 lib/node/interface_tx_feature.c

 create mode 100644 lib/node/interface_tx_feature_priv.h



-- 

2.43.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpdk_graph_feature_arc_v1.pdf
Type: application/pdf
Size: 757136 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/dev/attachments/20250103/c4cfdc82/attachment-0001.pdf>


More information about the dev mailing list