[2/2] app/testpmd: use flags from user if it is set
Checks
Commit Message
It's user's responsibility to set correct flags, especially the G bit, to
distinguish the protocols, VXLAN and VXLAN-GBP, sharing the same port 4789.
It will be set to 0x8 if user does not specify the flags.
Fixes: da118115d95c ("app/testpmd: support matching any VXLAN field")
Signed-off-by: Minggang Li(Gavin) <gavinl@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Minggang Li(Gavin) <gavinl@nvidia.com>
> Sent: Tuesday, February 18, 2025 11:33
> To: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-Thomas
> Monjalon (EXTERNAL) <thomas@monjalon.net>; Aman Singh
> <aman.deep.singh@intel.com>; Minggang(Gavin) Li <gavinl@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>
> Subject: [PATCH 2/2] app/testpmd: use flags from user if it is set
>
> External email: Use caution opening links or attachments
>
>
> It's user's responsibility to set correct flags, especially the G bit, to distinguish the
> protocols, VXLAN and VXLAN-GBP, sharing the same port 4789.
>
> It will be set to 0x8 if user does not specify the flags.
>
> Fixes: da118115d95c ("app/testpmd: support matching any VXLAN field")
> Signed-off-by: Minggang Li(Gavin) <gavinl@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Best regards,
Dariusz Sosnowski
@@ -13598,7 +13598,8 @@ update_fields(uint8_t *buf, struct rte_flow_item *item, uint16_t next_proto)
break;
case RTE_FLOW_ITEM_TYPE_VXLAN:
vxlan = (struct rte_vxlan_hdr *)buf;
- vxlan->vx_flags = 0x08;
+ if (!vxlan->flags)
+ vxlan->flags = 0x08;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
gpe = (struct rte_vxlan_gpe_hdr *)buf;