Add support for VXLAN-GPE flags field in flow rule pattern to testpmd.

Signed-off-by: Gavin Li <gav...@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnow...@nvidia.com>
---
 app/test-pmd/cmdline_flow.c                 | 10 ++++++++++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  1 +
 2 files changed, 11 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index ce71818705..deb2d80301 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -401,6 +401,7 @@ enum index {
        ITEM_VXLAN_GPE,
        ITEM_VXLAN_GPE_VNI,
        ITEM_VXLAN_GPE_PROTO,
+       ITEM_VXLAN_GPE_FLAGS,
        ITEM_ARP_ETH_IPV4,
        ITEM_ARP_ETH_IPV4_SHA,
        ITEM_ARP_ETH_IPV4_SPA,
@@ -1789,6 +1790,7 @@ static const enum index item_geneve[] = {
 static const enum index item_vxlan_gpe[] = {
        ITEM_VXLAN_GPE_VNI,
        ITEM_VXLAN_GPE_PROTO,
+       ITEM_VXLAN_GPE_FLAGS,
        ITEM_NEXT,
        ZERO,
 };
@@ -4936,6 +4938,14 @@ static const struct token token_list[] = {
                .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
                                             protocol)),
        },
+       [ITEM_VXLAN_GPE_FLAGS] = {
+               .name = "flags",
+               .help = "VXLAN-GPE flags",
+               .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED),
+                            item_param),
+               .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
+                                            flags)),
+       },
        [ITEM_ARP_ETH_IPV4] = {
                .name = "arp_eth_ipv4",
                .help = "match ARP header for Ethernet/IPv4",
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst 
b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 447e28e694..9c6b04442f 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3703,6 +3703,7 @@ This section lists supported pattern items and their 
attributes, if any.
 - ``vxlan-gpe``: match VXLAN-GPE header.
 
   - ``vni {unsigned}``: VXLAN-GPE identifier.
+  - ``flags {unsigned}``: VXLAN-GPE flags.
 
 - ``arp_eth_ipv4``: match ARP header for Ethernet/IPv4.
 
-- 
2.39.1

Reply via email to