Add example l3fwd-regex
cover Add example l3fwd-regex
From: Guy Kaneti <[email protected]>
The L3 Forwarding with Regex application is a simple example of packet processing using DPDK Regex framework.
The application performs L3 LPM based forwarding while using Regex framework for pre-filtering decision.
Guy Kaneti (2):
examples/l3fwd-regex: add regex based l3fwd
doc: add l3fwd-regex application user guide
MAINTAINERS | 3 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++ examples/l3fwd-regex/l3fwd.h | 207 +++ examples/l3fwd-regex/l3fwd_lpm.c | 461 +++++++ examples/l3fwd-regex/l3fwd_lpm.h | 100 ++ examples/l3fwd-regex/l3fwd_regex.c | 487 +++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 +++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 12 files changed, 2664 insertions(+), 1 deletion(-) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_lpm.h create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
Signature · 1 line
2.28.0
PATCH 1/2 examples/l3fwd-regex: add regex based l3fwd
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
--- MAINTAINERS | 2 + examples/l3fwd-regex/l3fwd.h | 207 ++++++ examples/l3fwd-regex/l3fwd_lpm.c | 461 ++++++++++++ examples/l3fwd-regex/l3fwd_lpm.h | 100 +++ examples/l3fwd-regex/l3fwd_regex.c | 487 ++++++++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 ++++++++++++++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 9 files changed, 2423 insertions(+), 1 deletion(-) create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_lpm.h create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
MAINTAINERS +2 -0
@@ -451,6 +451,8 @@ F: lib/librte_regexdev/ F: app/test-regex/ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini +M: Guy Kaneti <[email protected]> +F: examples/l3fwd-regex/ Eventdev API M: Jerin Jacob <[email protected]>
examples/l3fwd-regex/l3fwd.h new file +207 -0
207 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_lpm.c new file +461 -0
461 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_lpm.h new file +100 -0
100 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.c new file +487 -0
487 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2020 Marvell International Ltd. +*/ + +#ifndef __L3FWD_REGEX_H__ +#define __L3FWD_REGEX_H__ + +#define REGEX_NB_OPS (8192) + +int +regex_dev_init (uint32_t dev_id,uint16_t nb_queue_pairs); + +int +regex_lcore_init (uint32_t lcore_id,uint32_t dev_id,uint32_t qp_id); + +uint32_t +regex_enqueue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +uint32_t +regex_dequeue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +int +regex_read_rule_db_file (char *filename); +void +regex_debug_enable (void ); +void +regex_drop_on_match (void ); + +void +regex_stats_print (uint32_t lcore); +void +regex_dev_uninit (uint32_t dev_id); +void +regex_lcore_uninit (uint32_t lcore_id); +void +regex_mem_free (void ); + +#endif /* __L3FWD_REGEX_H__ */
examples/l3fwd-regex/main.c new file +1117 -0
1,117 lines not on this page · raw message
examples/l3fwd-regex/meson.build new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(C) 2020 Marvell International Ltd. + +# meson file, for building this example as part of a main DPDK build. + +allow_experimental_apis = true +deps += ['lpm', 'regexdev'] +sources = files( + 'l3fwd_lpm.c', 'l3fwd_regex.c', 'main.c' +)
examples/meson.build +1 -1
@@ -23,7 +23,7 @@ all_examples = [ 'l2fwd', 'l2fwd-cat', 'l2fwd-event', 'l2fwd-crypto', 'l2fwd-jobstats', 'l2fwd-keepalive', 'l3fwd', - 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', + 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', 'l3fwd-regex', 'link_status_interrupt', 'multi_process/client_server_mp/mp_client', 'multi_process/client_server_mp/mp_server',
Signature · 1 line
2.28.0
Re: [dpdk-dev] [PATCH 1/2] examples/l3fwd-regex: add regex based l3fwd
08/09/2020 14:31, [email protected]:
Quoted 4 lines
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
The trend is to reduce the number of example applications. Do you think regex could be an option in the original l3fwd?
Re: [dpdk-dev] [EXT] Re: [PATCH 1/2] examples/l3fwd-regex: add regex based l3fwd
Sorry for the delayed response
Quoted 17 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, October 14, 2020 11:47 AM
To: Guy Kaneti <[email protected]>
Cc: [email protected]; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Smadar Fuks <[email protected]>; Dovrat Zifroni <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [dpdk-dev] [PATCH 1/2] examples/l3fwd-regex: add regex based l3fwdExternal Email
----------------------------------------------------------------------
08/09/2020 14:31, [email protected]:
Quoted 8 lines
Quoted 4 lines
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.The trend is to reduce the number of example applications. Do you think regex could be an option in the original l3fwd?
The regex operation is not a direct networking functionality and is not a type of forwarding. The purpose of the application was to show an example of regex operation with networking. I think it should stand by itself.
Re: [dpdk-dev] [EXT] Re: [PATCH 1/2] examples/l3fwd-regex: add regex based l3fwd
18/10/2020 13:53, Guy Kaneti:
Quoted 6 lines
From: Thomas Monjalon <[email protected]>
Quoted 5 lines
Quoted 4 lines
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
Quoted 6 lines
Quoted 2 lines
The trend is to reduce the number of example applications. Do you think regex could be an option in the original l3fwd?
The regex operation is not a direct networking functionality and is not a type of forwarding. The purpose of the application was to show an example of regex operation with networking. I think it should stand by itself.
If it was only regex, yes it would make sense as standalone. But mixing with networking forwarding could be in the same app.
PATCH 2/2 doc: add l3fwd-regex application user guide
In reply to [email protected]From: Guy Kaneti <[email protected]>
Adding the user guide for l3fwd regex application.
--- MAINTAINERS | 1 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++++++++++++++++ 4 files changed, 241 insertions(+) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst
MAINTAINERS +1 -0
@@ -453,6 +453,7 @@ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini M: Guy Kaneti <[email protected]> F: examples/l3fwd-regex/ +F: doc/guides/sample_app_ug/l3_forward_regex.rst Eventdev API M: Jerin Jacob <[email protected]>
doc/guides/sample_app_ug/index.rst +1 -0
@@ -32,6 +32,7 @@ Sample Applications User Guides l3_forward_graph l3_forward_power_man l3_forward_access_ctrl + l3_forward_regex link_status_intr server_node_efd service_cores
doc/guides/sample_app_ug/intro.rst +4 -0
@@ -58,6 +58,10 @@ examples are highlighted below. forwarding Graph, or ``l3fwd_graph`` application does forwarding based on IPv4 like a simple router with DPDK Graph framework. +* :doc:`Network Layer 3 forwarding Regex<l3_forward_regex>`: The Network Layer3 + forwarding Regex, or ``l3fwd-regex`` application does forwarding based on IPv4 + like a simple router with DPDK Regex framework. + * :doc:`Hardware packet copying<ioat>`: The Hardware packet copying, or ``ioatfwd`` application demonstrates how to use IOAT rawdev driver for copying packets between two threads.
doc/guides/sample_app_ug/l3_forward_regex.rst new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.28.0
v2 cover Add example l3fwd-regex
From: Guy Kaneti <[email protected]>
The L3 Forwarding with Regex application is a simple example of packet processing using DPDK Regex framework.
The application performs L3 LPM based forwarding while using Regex framework for pre-filtering decision.
v2:
* Rebase.
* Add release notes.
* fix spelling mistake
* fix build error
Guy Kaneti (2):
examples/l3fwd-regex: add regex based l3fwd
doc: add l3fwd-regex application user guide
MAINTAINERS | 3 + doc/guides/rel_notes/release_20_11.rst | 4 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++ examples/l3fwd-regex/l3fwd.h | 207 +++ examples/l3fwd-regex/l3fwd_lpm.c | 484 +++++++ examples/l3fwd-regex/l3fwd_regex.c | 487 +++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 +++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 12 files changed, 2591 insertions(+), 1 deletion(-) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
Signature · 1 line
2.28.0
PATCH v2 1/2 examples/l3fwd-regex: add regex based l3fwd
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
--- MAINTAINERS | 2 + examples/l3fwd-regex/l3fwd.h | 207 ++++++ examples/l3fwd-regex/l3fwd_lpm.c | 484 ++++++++++++ examples/l3fwd-regex/l3fwd_regex.c | 487 ++++++++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 ++++++++++++++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 8 files changed, 2346 insertions(+), 1 deletion(-) create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
MAINTAINERS +2 -0
@@ -433,6 +433,8 @@ F: lib/librte_regexdev/ F: app/test-regex/ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini +M: Guy Kaneti <[email protected]> +F: examples/l3fwd-regex/ Eventdev API M: Jerin Jacob <[email protected]>
examples/l3fwd-regex/l3fwd.h new file +207 -0
207 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_lpm.c new file +484 -0
484 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.c new file +487 -0
487 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2020 Marvell International Ltd. +*/ + +#ifndef __L3FWD_REGEX_H__ +#define __L3FWD_REGEX_H__ + +#define REGEX_NB_OPS (8192) + +int +regex_dev_init (uint32_t dev_id,uint16_t nb_queue_pairs); + +int +regex_lcore_init (uint32_t lcore_id,uint32_t dev_id,uint32_t qp_id); + +uint32_t +regex_enqueue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +uint32_t +regex_dequeue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +int +regex_read_rule_db_file (char *filename); +void +regex_debug_enable (void ); +void +regex_drop_on_match (void ); + +void +regex_stats_print (uint32_t lcore); +void +regex_dev_uninit (uint32_t dev_id); +void +regex_lcore_uninit (uint32_t lcore_id); +void +regex_mem_free (void ); + +#endif /* __L3FWD_REGEX_H__ */
examples/l3fwd-regex/main.c new file +1117 -0
1,117 lines not on this page · raw message
examples/l3fwd-regex/meson.build new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(C) 2020 Marvell International Ltd. + +# meson file, for building this example as part of a main DPDK build. + +allow_experimental_apis = true +deps += ['lpm', 'regexdev'] +sources = files( + 'l3fwd_lpm.c', 'l3fwd_regex.c', 'main.c' +)
examples/meson.build +1 -1
@@ -23,7 +23,7 @@ all_examples = [ 'l2fwd', 'l2fwd-cat', 'l2fwd-event', 'l2fwd-crypto', 'l2fwd-jobstats', 'l2fwd-keepalive', 'l3fwd', - 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', + 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', 'l3fwd-regex', 'link_status_interrupt', 'multi_process/client_server_mp/mp_client', 'multi_process/client_server_mp/mp_server',
Signature · 1 line
2.28.0
Re: [dpdk-dev] [PATCH v2 1/2] examples/l3fwd-regex: add regex based l3fwd
Hi Guy,
Sorry for late reply.
Quoted 5 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, September 9, 2020 3:09 PM
Subject: [PATCH v2 1/2] examples/l3fwd-regex: add regex based l3fwd
Quoted 7 lines
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.Signed-off-by Guy Kaneti <[email protected]>---
Thanks,
Ori
Re: [dpdk-dev] [PATCH v2 1/2] examples/l3fwd-regex: add regex based l3fwd
In reply to [email protected](repeating question asked on v1 by mistake)
09/09/2020 14:08, [email protected]:
Quoted 2 lines
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
The trend is to reduce the number of example applications. Do you think regex could be an option in the original l3fwd?
PATCH v2 2/2 doc: add l3fwd-regex application user guide
In reply to [email protected]From: Guy Kaneti <[email protected]>
Adding the user guide for l3fwd regex application.
--- MAINTAINERS | 1 + doc/guides/rel_notes/release_20_11.rst | 4 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++++++++++++++++ 5 files changed, 245 insertions(+) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst
MAINTAINERS +1 -0
@@ -435,6 +435,7 @@ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini M: Guy Kaneti <[email protected]> F: examples/l3fwd-regex/ +F: doc/guides/sample_app_ug/l3_forward_regex.rst Eventdev API M: Jerin Jacob <[email protected]>
doc/guides/rel_notes/release_20_11.rst +4 -0
@@ -55,6 +55,10 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added new l3fwd-regex sample application.** + + Added an example application ``l3fwd-regex``. This demonstrates the usage of + packet processing using DPDK Regex libraries. Removed Items -------------
doc/guides/sample_app_ug/index.rst +1 -0
@@ -32,6 +32,7 @@ Sample Applications User Guides l3_forward_graph l3_forward_power_man l3_forward_access_ctrl + l3_forward_regex link_status_intr server_node_efd service_cores
doc/guides/sample_app_ug/intro.rst +4 -0
@@ -58,6 +58,10 @@ examples are highlighted below. forwarding Graph, or ``l3fwd_graph`` application does forwarding based on IPv4 like a simple router with DPDK Graph framework. +* :doc:`Network Layer 3 forwarding Regex<l3_forward_regex>`: The Network Layer3 + forwarding Regex, or ``l3fwd-regex`` application does forwarding based on IPv4 + like a simple router with DPDK Regex framework. + * :doc:`Hardware packet copying<ioat>`: The Hardware packet copying, or ``ioatfwd`` application demonstrates how to use IOAT rawdev driver for copying packets between two threads.
doc/guides/sample_app_ug/l3_forward_regex.rst new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [dpdk-dev] [PATCH v2 2/2] doc: add l3fwd-regex application user guide
Hi Guy,
Quoted 11 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, September 9, 2020 3:09 PM
Subject: [PATCH v2 2/2] doc: add l3fwd-regex application user guideFrom: Guy Kaneti <[email protected]>
Adding the user guide for l3fwd regex application.
Signed-off-by Guy Kaneti <[email protected]>---
Thanks,
Ori
v3 cover Add example l3fwd-regex
In reply to [email protected]From: Guy Kaneti <[email protected]>
The L3 Forwarding with Regex application is a simple example of packet processing using DPDK Regex framework.
The application performs L3 LPM based forwarding while using Regex framework for pre-filtering decision.
v3:
* Rebase.
* fix typo
v2:
* Rebase.
* Add release notes.
* fix spelling mistake
* fix build error
Guy Kaneti (2):
examples/l3fwd-regex: add regex based l3fwd
doc: add l3fwd-regex application user guide
MAINTAINERS | 3 + doc/guides/rel_notes/release_20_11.rst | 5 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++ examples/l3fwd-regex/l3fwd.h | 207 +++ examples/l3fwd-regex/l3fwd_lpm.c | 484 +++++++ examples/l3fwd-regex/l3fwd_regex.c | 487 +++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 +++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 12 files changed, 2592 insertions(+), 1 deletion(-) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
Signature · 1 line
2.28.0
PATCH v3 1/2 examples/l3fwd-regex: add regex based l3fwd
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.
--- MAINTAINERS | 2 + examples/l3fwd-regex/l3fwd.h | 207 ++++++ examples/l3fwd-regex/l3fwd_lpm.c | 484 ++++++++++++ examples/l3fwd-regex/l3fwd_regex.c | 487 ++++++++++++ examples/l3fwd-regex/l3fwd_regex.h | 38 + examples/l3fwd-regex/main.c | 1117 ++++++++++++++++++++++++++++ examples/l3fwd-regex/meson.build | 10 + examples/meson.build | 2 +- 8 files changed, 2346 insertions(+), 1 deletion(-) create mode 100644 examples/l3fwd-regex/l3fwd.h create mode 100644 examples/l3fwd-regex/l3fwd_lpm.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.c create mode 100644 examples/l3fwd-regex/l3fwd_regex.h create mode 100644 examples/l3fwd-regex/main.c create mode 100644 examples/l3fwd-regex/meson.build
MAINTAINERS +2 -0
@@ -431,6 +431,8 @@ F: lib/librte_regexdev/ F: app/test-regex/ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini +M: Guy Kaneti <[email protected]> +F: examples/l3fwd-regex/ Eventdev API M: Jerin Jacob <[email protected]>
examples/l3fwd-regex/l3fwd.h new file +207 -0
207 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_lpm.c new file +484 -0
484 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.c new file +487 -0
487 lines not on this page · raw message
examples/l3fwd-regex/l3fwd_regex.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2020 Marvell International Ltd. +*/ + +#ifndef __L3FWD_REGEX_H__ +#define __L3FWD_REGEX_H__ + +#define REGEX_NB_OPS (8192) + +int +regex_dev_init (uint32_t dev_id,uint16_t nb_queue_pairs); + +int +regex_lcore_init (uint32_t lcore_id,uint32_t dev_id,uint32_t qp_id); + +uint32_t +regex_enqueue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +uint32_t +regex_dequeue_burst_ops (int dev_id,uint32_t lcore_id,uint16_t qp_id, +struct rte_mbuf **pkts_burst,uint16_t nb_pkts); +int +regex_read_rule_db_file (char *filename); +void +regex_debug_enable (void ); +void +regex_drop_on_match (void ); + +void +regex_stats_print (uint32_t lcore); +void +regex_dev_uninit (uint32_t dev_id); +void +regex_lcore_uninit (uint32_t lcore_id); +void +regex_mem_free (void ); + +#endif /* __L3FWD_REGEX_H__ */
examples/l3fwd-regex/main.c new file +1117 -0
1,117 lines not on this page · raw message
examples/l3fwd-regex/meson.build new file +10 -0
@@ -0,0 +1,10 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(C) 2020 Marvell International Ltd. + +# meson file, for building this example as part of a main DPDK build. + +allow_experimental_apis = true +deps += ['lpm', 'regexdev'] +sources = files( + 'l3fwd_lpm.c', 'l3fwd_regex.c', 'main.c' +)
examples/meson.build +1 -1
@@ -23,7 +23,7 @@ all_examples = [ 'l2fwd', 'l2fwd-cat', 'l2fwd-event', 'l2fwd-crypto', 'l2fwd-jobstats', 'l2fwd-keepalive', 'l3fwd', - 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', + 'l3fwd-acl', 'l3fwd-power', 'l3fwd-graph', 'l3fwd-regex', 'link_status_interrupt', 'multi_process/client_server_mp/mp_client', 'multi_process/client_server_mp/mp_server',
Signature · 1 line
2.28.0
Re: [dpdk-dev] [PATCH v3 1/2] examples/l3fwd-regex: add regex based l3fwd
Hi Guy,
Quoted 9 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Sunday, October 18, 2020 3:04 PM
To: NBU-Contact-Thomas Monjalon <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH v3 1/2] examples/l3fwd-regex: add regex based l3fwd
Quoted 7 lines
From: Guy Kaneti <[email protected]>
Add regex based l3fwd application
inline with normal l3fwd. only LPM is supported.Signed-off-by Guy Kaneti <[email protected]>---
Best,
Ori
PATCH v3 2/2 doc: add l3fwd-regex application user guide
In reply to [email protected]From: Guy Kaneti <[email protected]>
Adding the user guide for l3fwd regex application.
--- MAINTAINERS | 1 + doc/guides/rel_notes/release_20_11.rst | 5 + doc/guides/sample_app_ug/index.rst | 1 + doc/guides/sample_app_ug/intro.rst | 4 + doc/guides/sample_app_ug/l3_forward_regex.rst | 235 ++++++++++++++++++ 5 files changed, 246 insertions(+) create mode 100644 doc/guides/sample_app_ug/l3_forward_regex.rst
MAINTAINERS +1 -0
@@ -433,6 +433,7 @@ F: doc/guides/prog_guide/regexdev.rst F: doc/guides/regexdevs/features/default.ini M: Guy Kaneti <[email protected]> F: examples/l3fwd-regex/ +F: doc/guides/sample_app_ug/l3_forward_regex.rst Eventdev API M: Jerin Jacob <[email protected]>
doc/guides/rel_notes/release_20_11.rst +5 -0
@@ -285,6 +285,11 @@ New Features * Added scatter gather support. * Added NIST GCMVS complaint GMAC test method support. +* **Added new l3fwd-regex sample application.** + + Added an example application ``l3fwd-regex``. This demonstrates the usage of + packet processing using DPDK Regex libraries. + Removed Items -------------
doc/guides/sample_app_ug/index.rst +1 -0
@@ -32,6 +32,7 @@ Sample Applications User Guides l3_forward_graph l3_forward_power_man l3_forward_access_ctrl + l3_forward_regex link_status_intr server_node_efd service_cores
doc/guides/sample_app_ug/intro.rst +4 -0
@@ -58,6 +58,10 @@ examples are highlighted below. forwarding Graph, or ``l3fwd_graph`` application does forwarding based on IPv4 like a simple router with DPDK Graph framework. +* :doc:`Network Layer 3 forwarding Regex<l3_forward_regex>`: The Network Layer3 + forwarding Regex, or ``l3fwd-regex`` application does forwarding based on IPv4 + like a simple router with DPDK Regex framework. + * :doc:`Hardware packet copying<ioat>`: The Hardware packet copying, or ``ioatfwd`` application demonstrates how to use IOAT rawdev driver for copying packets between two threads.
doc/guides/sample_app_ug/l3_forward_regex.rst new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.28.0
Re: [dpdk-dev] [PATCH v3 2/2] doc: add l3fwd-regex application user guide
Hi Guy,
Quoted 11 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Sunday, October 18, 2020 3:04 PM
Subject: [PATCH v3 2/2] doc: add l3fwd-regex application user guideFrom: Guy Kaneti <[email protected]>
Adding the user guide for l3fwd regex application.
Signed-off-by Guy Kaneti <[email protected]>---
Best,
Ori
18/10/2020 14:03, [email protected]:
Quoted 6 lines
From: Guy Kaneti <[email protected]>
The L3 Forwarding with Regex application is a simple example of packet processing using DPDK Regex framework.
The application performs L3 LPM based forwarding while using Regex framework for pre-filtering decision.
The techboard decision is a bit different of this l3fwd-regex:
"
- TB agreed to have an example application that exercises the regex device and network device as a separate application.
- The example shall be used for both Benchmark and functional verification of regex in the forwarding path.
- Based on the discussions, it is agreed that l3fwd might not be the real use case to consider as regex + network application
- Instead, TB recommends having the Deep packet inspection style application to showcase the regex + networking use case.
- Following is the simple DPI style application definition, which can be considered as a candidate, as an example of regex + network application
1) Create or import a rule database.
- Rule database will have an index as rule_id and pattern to search
2) Create or import rule_id to the action table
- Action could be -1 for the drop, 0 .. N for a specific port to forward upon the match
3) Enqueue all the packet from ethdev to regexdev
4) If there is a match, then do the action based on the table created in step 2 using struct rte_regexdev_match::rule_id
5) If there is no match, forward back to the source port
"
http://mails.dpdk.org/archives/dev/2020-November/191301.html
Quoted 24 lines · On Sun, 15 Nov 2020 15:07:37 +0100 Thomas Monjalon <[email protected]> wrote:
18/10/2020 14:03, [email protected]:
Quoted 6 lines
From: Guy Kaneti <[email protected]>
The L3 Forwarding with Regex application is a simple example of packet processing using DPDK Regex framework.
The application performs L3 LPM based forwarding while using Regex framework for pre-filtering decision.The techboard decision is a bit different of this l3fwd-regex:
"
- TB agreed to have an example application that exercises the regex device and network device as a separate application.
- The example shall be used for both Benchmark and functional verification of regex in the forwarding path.
- Based on the discussions, it is agreed that l3fwd might not be the real use case to consider as regex + network application
- Instead, TB recommends having the Deep packet inspection style application to showcase the regex + networking use case.
- Following is the simple DPI style application definition, which can be considered as a candidate, as an example of regex + network application
1) Create or import a rule database.
- Rule database will have an index asrule_idand pattern to search
2) Create or importrule_idto the action table
- Action could be -1 for the drop, 0 .. N for a specific port to forward upon the match
3) Enqueue all the packet from ethdev to regexdev
4) If there is a match, then do the action based on the table created in step 2 using structrte_regexdev_match::rule_id
5) If there is no match, forward back to the source port
"
Marking original example as "Changes requested" Please resubmit example based on the above feedback.