This patch series adds two inbuilt nodes ip4_lookup_fib and
ip6_lookup_fib in graph library. These nodes uses the existing
Forwarding Information Base (FIB) library to create FIB, to do
route addition and route lookup.

Two new commands (for ipv4 and ipv6) for providing the lookup mode
is added in the dpdk-graph application. fib or lpm can be given as
lookup mode. If these new lookup mode commands are not given, the
dpdk-graph uses lpm (Longest Prefix Match) or lpm6 by default.
If fib is given as lookup mode then the ip4_lookup_fib or ip6_lookup_fib
nodes are used by the application.

v2:
- Fixed build failure in DPDK CI.
- Changed the prefetch code in process functions. Also removed the
  prefetch of mbuf obj as it was not improving performance.
- Added code to control fib configuration from dpdk-graph application.
- Added the packet classification next nodes id in public header file,
  so that they can be used by library and application.
- Changed the macro FIB_DEFAULT_NH to point to pkt drop node.

Ankur Dwivedi (13):
  fib: move macro to header file
  node: add IP4 lookup FIB node
  node: add IP4 FIB route add
  node: add process callback for IP4 FIB
  node: move next nodes to public header file
  node: add next node in packet classification
  app/graph: add IP4 lookup mode command
  fib: move macro to header file
  node: add IP6 lookup FIB node
  node: add IP6 FIB route add
  node: add process callback for IP6 FIB
  node: add next node in packet classification
  app/graph: add IP6 lookup mode command

 app/graph/commands.list         |   2 +
 app/graph/ip4_route.c           |  34 +++-
 app/graph/ip6_route.c           |  33 +++-
 app/graph/l3fwd.c               |  70 +++++++
 app/graph/module_api.h          |  13 ++
 doc/guides/tools/graph.rst      |  24 ++-
 lib/fib/rte_fib.c               |   3 -
 lib/fib/rte_fib.h               |   3 +
 lib/fib/rte_fib6.c              |  11 +-
 lib/fib/rte_fib6.h              |   3 +
 lib/node/ip4_lookup_fib.c       | 332 ++++++++++++++++++++++++++++++++
 lib/node/ip6_lookup_fib.c       | 322 +++++++++++++++++++++++++++++++
 lib/node/meson.build            |   5 +-
 lib/node/pkt_cls.c              |  35 ++--
 lib/node/pkt_cls_priv.h         |   7 -
 lib/node/rte_node_ip4_api.h     |  34 ++++
 lib/node/rte_node_ip6_api.h     |  34 ++++
 lib/node/rte_node_pkt_cls_api.h |  39 ++++
 18 files changed, 954 insertions(+), 50 deletions(-)
 create mode 100644 lib/node/ip4_lookup_fib.c
 create mode 100644 lib/node/ip6_lookup_fib.c
 create mode 100644 lib/node/rte_node_pkt_cls_api.h

-- 
2.25.1

Reply via email to