ethdev: add TCP/IP modify field IDs

Message ID 20230808083741.8193-1-suanmingm@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: add TCP/IP modify field IDs |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Suanming Mou Aug. 8, 2023, 8:37 a.m. UTC
  Currently, get TCP/IP header or data length information from traffic
is missing in the modify field IDs. This commit adds the missing
TCP data_offset, IPv4 IHL/total_len, IPv6 payload_len to modify filed
IDs. This allows users be able to manager more TCP/IP fields.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 1 +
 lib/ethdev/rte_flow.h       | 4 ++++
 2 files changed, 5 insertions(+)
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 94827bcc4a..3fe9bafbec 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -937,6 +937,7 @@  static const char *const modify_field_ids[] = {
 	"flex_item",
 	"hash_result",
 	"geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls",
+	"tcp_date_off", "ipv4_ihl", "ipv4_total_len", "ipv6_payload_len",
 	NULL
 };
 
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index 86ed98c562..919556d95b 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3883,6 +3883,10 @@  enum rte_flow_field_id {
 	RTE_FLOW_FIELD_GENEVE_OPT_CLASS,/**< GENEVE option class. */
 	RTE_FLOW_FIELD_GENEVE_OPT_DATA,	/**< GENEVE option data. */
 	RTE_FLOW_FIELD_MPLS,		/**< MPLS header. */
+	RTE_FLOW_FIELD_TCP_DATA_OFFSET,	/**< TCP data offset. */
+	RTE_FLOW_FIELD_IPV4_IHL,	/**< IPv4 IHL. */
+	RTE_FLOW_FIELD_IPV4_TOTAL_LEN,	/**< IPv4 total length. */
+	RTE_FLOW_FIELD_IPV6_PAYLOAD_LEN	/**< IPv6 payload length. */
 };
 
 /**