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 <suanmi...@nvidia.com> --- v3: add modify_field description. v2: fix typo tcp_date_off -> tcp_data_off --- app/test-pmd/cmdline_flow.c | 1 + lib/ethdev/rte_flow.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 10b9b25a3c..cf757d4c96 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -950,6 +950,7 @@ static const char *const modify_field_ids[] = { "flex_item", "hash_result", "geneve_opt_type", "geneve_opt_class", "geneve_opt_data", "mpls", + "tcp_data_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 b79bb9968b..3b0485fcde 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3921,6 +3921,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. */ }; /** -- 2.34.1