ethdev: add async flow connection tracking configuration
RFC 1/1 ethdev: add async flow connection tracking configuration
In queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
--- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+)
app/test-pmd/cmdline_flow.c +10 -0
@@ -219,6 +219,7 @@ enum index {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,/* Indirect action arguments */ INDIRECT_ACTION_CREATE,
@@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,END , ZERO, };
@@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next =NEXT (next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + },/* Top-level command. */ [PATTERN_TEMPLATE] = { .name = "pattern_template",
doc/guides/rel_notes/release_22_11.rst +6 -0
@@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to ``rte_flow_configure`` + and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources accroding to the hint. + Removed Items -------------
lib/ethdev/rte_flow.h +10 -0
@@ -4902,6 +4902,11 @@ struct rte_flow_port_info {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; +/** +* Maximum number connection trackings. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t max_nb_conn_tracks; };/**
@@ -4971,6 +4976,11 @@ struct rte_flow_port_attr {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; +/** +* Number of connection trackings to configure. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t nb_conn_tracks; };/**
Signature · 1 line
2.25.1
Quoted 105 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, 9 August 2022 16:26
Subject: [RFC] ethdev: add async flow connection tracking configurationIn queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
Signed-off-by Suanming Mou <[email protected]>--- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+)app/test-pmd/cmdline_flow.c +10
-0@@ -219,6 +219,7 @@ enum index {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,/* Indirect action arguments */ INDIRECT_ACTION_CREATE,@@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,END , ZERO, };@@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next =NEXT (next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + },/* Top-level command. */ app/test-pmd/cmdline_flow.c +0
-0[PATTERN_TEMPLATE] = { .name = "pattern_template",doc/guides/rel_notes/release_22_11.rst +6
-0@@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to ``rte_flow_configure`` + and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources accroding to the hint. + Removed Items -------------lib/ethdev/rte_flow.h +10
-1@@ -4902,6 +4902,11 @@ struct rte_flow_port_info {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; +/** +* Maximum number connection trackings. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t max_nb_conn_tracks; };/** @@ -4971,6 +4976,11 @@ struct rte_flow_port_attr {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; +/** +* Number of connection trackings to configure. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t nb_conn_tracks; };/** --
Quoted 1 line
2.25.1
Best,
Ori
Ping...
Quoted 108 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, August 9, 2022 9:26 PM
To: [email protected]
Cc: Ori Kam <[email protected]>; Xiaoyun Li <[email protected]>; Aman Singh <[email protected]>; Yuying Zhang <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; Ferruh Yigit <[email protected]>; Andrew Rybchenko <[email protected]>
Subject: [RFC] ethdev: add async flow connection tracking configurationIn queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
Signed-off-by Suanming Mou <[email protected]>--- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+)app/test-pmd/cmdline_flow.c index renamed from app/test-pmd/cmdline_flow.c +0
-0
7f50028eb7..c9cbf381c4100644app/test-pmd/cmdline_flow.c +10
-0@@ -219,6 +219,7 @@ enum index {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,/* Indirect action arguments */ INDIRECT_ACTION_CREATE,@@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,END , ZERO, };@@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next =NEXT (next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + },/* Top-level command. */ [PATTERN_TEMPLATE] = {app/test-pmd/cmdline_flow.c +0
-0.name = "pattern_template",doc/guides/rel_notes/release_22_11.rst +6
-0@@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to + ``rte_flow_configure`` and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources accroding to the hint. + Removed Items -------------lib/ethdev/rte_flow.h index renamed from lib/ethdev/rte_flow.h +0
-0
a79f1e7ef0..c2747abc55100644lib/ethdev/rte_flow.h +10
-1@@ -4902,6 +4902,11 @@ struct rte_flow_port_info {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; +/** +* Maximum number connection trackings. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t max_nb_conn_tracks; };/** @@ -4971,6 +4976,11 @@ struct rte_flow_port_attr {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; +/** +* Number of connection trackings to configure. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t nb_conn_tracks; };/** -- 2.25.1
Ori Kam
Acked-byHi Suanming
Quoted 118 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Cc: [email protected]; Ori Kam <[email protected]>
Subject: RE: [RFC] ethdev: add async flow connection tracking configurationPing...
Quoted 6 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, August 9, 2022 9:26 PM
To: [email protected]
Cc: Ori Kam <[email protected]>; Xiaoyun Li <[email protected]>; Aman Singh <[email protected]>; Yuying ZhangQuoted 1 line
NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>;
Ferruh
Quoted 5 lines
Yigit <[email protected]>; Andrew Rybchenko <[email protected]>
Subject: [RFC] ethdev: add async flow connection tracking configurationIn queue based async flow engine, in order to optimize the flow insertion
rate,
Quoted 1 line
PMD can use the hints from application to have resources pre-allocate
during
app/test-pmd/cmdline_flow.c
Quoted 12 lines
initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
Signed-off-by Suanming Mou <[email protected]>--- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+)app/test-pmd/cmdline_flow.c +0
-0index
Quoted 41 lines
7f50028eb7..c9cbf381c4100644app/test-pmd/cmdline_flow.c +10
-0@@ -219,6 +219,7 @@ enum index {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,/* Indirect action arguments */ INDIRECT_ACTION_CREATE,@@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,END , ZERO, };@@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next =NEXT (next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + },/* Top-level command. */ [PATTERN_TEMPLATE] = {app/test-pmd/cmdline_flow.c +0
-0.name = "pattern_template",doc/guides/rel_notes/release_22_11.rst +0
-0doc/guides/rel_notes/release_22_11.rst New Features · line 62
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +5
-0@@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to + ``rte_flow_configure`` and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources accroding to thehint.
Quoted 31 lines
doc/guides/rel_notes/release_22_11.rst +1
-0+ Removed Items -------------lib/ethdev/rte_flow.h index renamed from lib/ethdev/rte_flow.h +0
-0
a79f1e7ef0..c2747abc55100644lib/ethdev/rte_flow.h +10
-0@@ -4902,6 +4902,11 @@ struct rte_flow_port_info {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; +/** +* Maximum number connection trackings. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t max_nb_conn_tracks; };/** @@ -4971,6 +4976,11 @@ struct rte_flow_port_attr {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; +/** +* Number of connection trackings to configure. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t nb_conn_tracks; };
Quoted 3 lines
Quoted 3 lines
lib/ethdev/rte_flow.h +0
-1/** -- 2.25.1
Thanks,
Ori
PATCH 1/1 ethdev: add async flow connection tracking configuration
In reply to Suanming MouIn queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
--- app/test-pmd/cmdline_flow.c | 10 ++++++++++ doc/guides/rel_notes/release_22_11.rst | 6 ++++++ lib/ethdev/rte_flow.h | 10 ++++++++++ 3 files changed, 26 insertions(+)
app/test-pmd/cmdline_flow.c +10 -0
@@ -219,6 +219,7 @@ enum index {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,/* Indirect action arguments */ INDIRECT_ACTION_CREATE,
@@ -1081,6 +1082,7 @@ static const enum index next_config_attr[] = {CONFIG_COUNTERS_NUMBER ,CONFIG_AGING_OBJECTS_NUMBER ,CONFIG_METERS_NUMBER , +CONFIG_CONN_TRACK_NUMBER ,END , ZERO, };
@@ -2667,6 +2669,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct buffer, args.configure.port_attr.nb_meters)), }, + [CONFIG_CONN_TRACK_NUMBER] = { + .name = "conn_tracks_number", + .help = "number of connection trackings", + .next =NEXT (next_config_attr, + NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct buffer, + args.configure.port_attr.nb_conn_tracks)), + },/* Top-level command. */ [PATTERN_TEMPLATE] = { .name = "pattern_template",
doc/guides/rel_notes/release_22_11.rst +6 -0
@@ -55,6 +55,12 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added configuration for asynchronous flow connection tracking.** + + Added connection tracking action number hint to ``rte_flow_configure`` + and ``rte_flow_info_get``. + PMD can prepare the connection tracking resources according to the hint. + Removed Items -------------
lib/ethdev/rte_flow.h +10 -0
@@ -4902,6 +4902,11 @@ struct rte_flow_port_info {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t max_nb_meters; +/** +* Maximum number connection trackings. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t max_nb_conn_tracks; };/**
@@ -4971,6 +4976,11 @@ struct rte_flow_port_attr {* @see RTE_FLOW_ACTION_TYPE_METER */ uint32_t nb_meters; +/** +* Number of connection trackings to configure. +* @see RTE_FLOW_ACTION_TYPE_CONNTRACK +*/ +uint32_t nb_conn_tracks; };/**
Signature · 1 line
2.25.1
Andrew Rybchenko
AppliedQuoted 9 lines · Suanming Mou
In queue based async flow engine, in order to optimize the flow insertion rate, PMD can use the hints from application to have resources pre-allocate during initialization phase for actions such as count/meter/aging.
This commit adds the connection tracking action hints.
Signed-off-by Suanming Mou <[email protected]>Acked-by Ori Kam <[email protected]>
Applied to dpdk-next-net/main, thanks.