examples/ipsec-secgw: add support for event vector
PATCH 1/1 examples/ipsec-secgw: add support for event vector
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.
Depends-on: series-18262 ("security: Improve inline fast path routines")
Depends-on: series-18322 ("eventdev: simplify Rx adapter event vector config")
--- doc/guides/sample_app_ug/ipsec_secgw.rst | 18 +- examples/ipsec-secgw/event_helper.c | 78 +++++- examples/ipsec-secgw/event_helper.h | 8 + examples/ipsec-secgw/ipsec-secgw.c | 41 ++- examples/ipsec-secgw/ipsec-secgw.h | 2 + examples/ipsec-secgw/ipsec_worker.c | 330 ++++++++++++++++++++++- 6 files changed, 472 insertions(+), 5 deletions(-)
doc/guides/sample_app_ug/ipsec_secgw.rst +17 -1
@@ -86,6 +86,15 @@ The application supports two modes of operation: poll mode and event mode. threads and supports inline protocol only.** It also provides infrastructure for non-internal port however does not define any worker threads. + Event mode also supports event vectorization. The event devices, ethernet device + pairs which support the capability ``RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR`` can + aggregate packets based on flow characteristics and generate a ``rte_event`` + containing ``rte_event_vector``. + The aggregation size and timeout can be given using command line options vector-size + (default vector-size is 16) and vector-tmo (default vector-tmo is 102400ns). + By default event vectorization is disabled and it can be enabled using event-vector + option. + Additionally the event mode introduces two submodes of processing packets: * Driver submode: This submode has bare minimum changes in the application to support
@@ -293,7 +302,8 @@ event app mode:: ./<build_dir>/examples/dpdk-ipsec-secgw -c 0x3 -- -P -p 0x3 -u 0x1 \ -f /path/to/config_file --transfer-mode event \ - --event-schedule-type parallel \ + --event-schedule-type parallel --event-vector --vector-size 32 \ + --vector-tmo 102400 \ where each option means:
@@ -312,6 +322,12 @@ where each option means: * The ``--event-schedule-type`` option selects parallel ordering of event queues. +* The ``--event-vector`` option enables event vectorization. + +* The ``--vector-size`` option specifies max vector size. + +* The ``--vector-tmo`` option specifies max timeout in nanoseconds for vectorization. + Refer to the *DPDK Getting Started Guide* for general information on running applications and the Environment Abstraction Layer (EAL) options.
examples/ipsec-secgw/event_helper.c +77 -1
115 lines not on this page · raw message
examples/ipsec-secgw/event_helper.h +8 -0
@@ -171,10 +171,18 @@ struct eventmode_conf {* When enabled, all event queues need to be mapped to * each event port */ + uint64_t event_vector : 1; +/**< +* Enable event vector, when enabled application can +* receive vector of events. +*/ + uint64_t vector_size : 16; };uint64_t u64; } ext_params;/**< 64 bit field to specify extended params */ +uint64_t vector_tmo_ns; +/**< Max vector timeout in nanoseconds */ };/**
examples/ipsec-secgw/ipsec-secgw.c +40 -1
89 lines not on this page · raw message
examples/ipsec-secgw/ipsec-secgw.h +2 -0
@@ -106,6 +106,8 @@ extern uint32_t single_sa_idx;extern volatile bool force_quit; +extern uint32_t nb_bufs_in_pool; +static inline uint8_t is_unprotected_port (uint16_t port_id) {
examples/ipsec-secgw/ipsec_worker.c +328 -2
356 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 1/1 examples/ipsec-secgw: add support for event vector
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.
---
Depends-on: series-18262 ("security: Improve inline fast path routines")
Depends-on: series-18322 ("eventdev: simplify Rx adapter event vector config")
v2:
* Set rte_event_vector::attr_valid if all packets in the vector uses same port.
doc/guides/sample_app_ug/ipsec_secgw.rst | 18 +- examples/ipsec-secgw/event_helper.c | 78 ++++- examples/ipsec-secgw/event_helper.h | 8 + examples/ipsec-secgw/ipsec-secgw.c | 41 ++- examples/ipsec-secgw/ipsec-secgw.h | 2 + examples/ipsec-secgw/ipsec_worker.c | 350 ++++++++++++++++++++++- 6 files changed, 492 insertions(+), 5 deletions(-)
doc/guides/sample_app_ug/ipsec_secgw.rst +17 -1
@@ -86,6 +86,15 @@ The application supports two modes of operation: poll mode and event mode. threads and supports inline protocol only.** It also provides infrastructure for non-internal port however does not define any worker threads. + Event mode also supports event vectorization. The event devices, ethernet device + pairs which support the capability ``RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR`` can + aggregate packets based on flow characteristics and generate a ``rte_event`` + containing ``rte_event_vector``. + The aggregation size and timeout can be given using command line options vector-size + (default vector-size is 16) and vector-tmo (default vector-tmo is 102400ns). + By default event vectorization is disabled and it can be enabled using event-vector + option. + Additionally the event mode introduces two submodes of processing packets: * Driver submode: This submode has bare minimum changes in the application to support
@@ -293,7 +302,8 @@ event app mode:: ./<build_dir>/examples/dpdk-ipsec-secgw -c 0x3 -- -P -p 0x3 -u 0x1 \ -f /path/to/config_file --transfer-mode event \ - --event-schedule-type parallel \ + --event-schedule-type parallel --event-vector --vector-size 32 \ + --vector-tmo 102400 \ where each option means:
@@ -312,6 +322,12 @@ where each option means: * The ``--event-schedule-type`` option selects parallel ordering of event queues. +* The ``--event-vector`` option enables event vectorization. + +* The ``--vector-size`` option specifies max vector size. + +* The ``--vector-tmo`` option specifies max timeout in nanoseconds for vectorization. + Refer to the *DPDK Getting Started Guide* for general information on running applications and the Environment Abstraction Layer (EAL) options.
examples/ipsec-secgw/event_helper.c +77 -1
115 lines not on this page · raw message
examples/ipsec-secgw/event_helper.h +8 -0
@@ -171,10 +171,18 @@ struct eventmode_conf {* When enabled, all event queues need to be mapped to * each event port */ + uint64_t event_vector : 1; +/**< +* Enable event vector, when enabled application can +* receive vector of events. +*/ + uint64_t vector_size : 16; };uint64_t u64; } ext_params;/**< 64 bit field to specify extended params */ +uint64_t vector_tmo_ns; +/**< Max vector timeout in nanoseconds */ };/**
examples/ipsec-secgw/ipsec-secgw.c +40 -1
89 lines not on this page · raw message
examples/ipsec-secgw/ipsec-secgw.h +2 -0
@@ -106,6 +106,8 @@ extern uint32_t single_sa_idx;extern volatile bool force_quit; +extern uint32_t nb_bufs_in_pool; +static inline uint8_t is_unprotected_port (uint16_t port_id) {
examples/ipsec-secgw/ipsec_worker.c +348 -2
382 lines not on this page · raw message
Signature · 1 line
2.25.1
Hi Konstantin/Radu,
Quoted 8 lines
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.Signed-off-by Srujana Challa <[email protected]>
Quoted 8 lines
---
Depends-on: series-18262 ("security: Improve inline fast path routines")
Depends-on: series-18322 ("eventdev: simplify Rx adapter event vector config")v2:
* Setrte_event_vector::attr_validif all packets in the vector uses same port.
Any comments on this patch. It has been in patchworks from quite some time.
Regards,
Akhil
Hi Akhil,
Quoted 15 lines
Hi Konstantin/Radu,
Quoted 13 lines
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.Signed-off-by Srujana Challa <[email protected]>---
Depends-on: series-18262 ("security: Improve inline fast path routines")
Depends-on: series-18322 ("eventdev: simplify Rx adapter event vector config")
Quoted 5 lines
Quoted 3 lines
v2:
* Setrte_event_vector::attr_validif all packets in the vector uses same port.Any comments on this patch. It has been in patchworks from quite some time.
As I understand it affects only event mode for ipsec-secgw, right? I am not really familiar with that part, so no comments from me. Thanks
Konstantin
Hi Akhil, I'm even less familiar with this section, so no objection from me neither.
Quoted 29 lines · Konstantin
Hi Akhil,
Quoted 15 lines
Hi Konstantin/Radu,
Quoted 13 lines
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.Signed-off-by Srujana Challa <[email protected]>---
Depends-on: series-18262 ("security: Improve inline fast path routines")
Depends-on: series-18322 ("eventdev: simplify Rx adapter event vector config")Quoted 5 lines
Quoted 3 lines
v2:
* Setrte_event_vector::attr_validif all packets in the vector uses same port.Any comments on this patch. It has been in patchworks from quite some time.
As I understand it affects only event mode for ipsec-secgw, right? I am not really familiar with that part, so no comments from me. Thanks
Konstantin
PATCH v3 1/1 examples/ipsec-secgw: add support for event vector
In reply to Srujana ChallaFrom: Srujana Challa <[email protected]>
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.
---
v3:
* Rebased and updated PKT_* mbuf flags to RTE_MBUF_F*.
v2:
* Set rte_event_vector::attr_valid if all packets in the vector uses same port.
doc/guides/sample_app_ug/ipsec_secgw.rst | 18 +-
examples/ipsec-secgw/event_helper.c | 78 ++++++- examples/ipsec-secgw/event_helper.h | 8 + examples/ipsec-secgw/ipsec-secgw.c | 41 +++- examples/ipsec-secgw/ipsec-secgw.h | 2 + examples/ipsec-secgw/ipsec_worker.c | 350 ++++++++++++++++++++++++++++++- 6 files changed, 492 insertions(+), 5 deletions(-)
doc/guides/sample_app_ug/ipsec_secgw.rst +17 -1
@@ -86,6 +86,15 @@ The application supports two modes of operation: poll mode and event mode. threads and supports inline protocol only.** It also provides infrastructure for non-internal port however does not define any worker threads. + Event mode also supports event vectorization. The event devices, ethernet device + pairs which support the capability ``RTE_EVENT_ETH_RX_ADAPTER_CAP_EVENT_VECTOR`` can + aggregate packets based on flow characteristics and generate a ``rte_event`` + containing ``rte_event_vector``. + The aggregation size and timeout can be given using command line options vector-size + (default vector-size is 16) and vector-tmo (default vector-tmo is 102400ns). + By default event vectorization is disabled and it can be enabled using event-vector + option. + Additionally the event mode introduces two submodes of processing packets: * Driver submode: This submode has bare minimum changes in the application to support
@@ -293,7 +302,8 @@ event app mode:: ./<build_dir>/examples/dpdk-ipsec-secgw -c 0x3 -- -P -p 0x3 -u 0x1 \ -f /path/to/config_file --transfer-mode event \ - --event-schedule-type parallel \ + --event-schedule-type parallel --event-vector --vector-size 32 \ + --vector-tmo 102400 \ where each option means:
@@ -312,6 +322,12 @@ where each option means: * The ``--event-schedule-type`` option selects parallel ordering of event queues. +* The ``--event-vector`` option enables event vectorization. + +* The ``--vector-size`` option specifies max vector size. + +* The ``--vector-tmo`` option specifies max timeout in nanoseconds for vectorization. + Refer to the *DPDK Getting Started Guide* for general information on running applications and the Environment Abstraction Layer (EAL) options.
examples/ipsec-secgw/event_helper.c +77 -1
115 lines not on this page · raw message
examples/ipsec-secgw/event_helper.h +8 -0
@@ -171,10 +171,18 @@ struct eventmode_conf {* When enabled, all event queues need to be mapped to * each event port */ + uint64_t event_vector : 1; +/**< +* Enable event vector, when enabled application can +* receive vector of events. +*/ + uint64_t vector_size : 16; };uint64_t u64; } ext_params;/**< 64 bit field to specify extended params */ +uint64_t vector_tmo_ns; +/**< Max vector timeout in nanoseconds */ };/**
examples/ipsec-secgw/ipsec-secgw.c +40 -1
89 lines not on this page · raw message
examples/ipsec-secgw/ipsec-secgw.h +2 -0
@@ -106,6 +106,8 @@ extern uint32_t single_sa_idx;extern volatile bool force_quit; +extern uint32_t nb_bufs_in_pool; +static inline uint8_t is_unprotected_port (uint16_t port_id) {
examples/ipsec-secgw/ipsec_worker.c +348 -2
382 lines not on this page · raw message
Signature · 1 line
2.8.4
Quoted 11 lines
From: Srujana Challa <[email protected]>
Adds event vector support to inline protocol offload mode. By default vector support is disabled, it can be enabled by using the option --event-vector.
Additional options to configure vector size and vector timeout are also implemented and can be used by specifying --vector-size and --vector-tmo.Signed-off-by Srujana Challa <[email protected]>---
Added release notes.
Applied to dpdk-next-crypto
Thanks.