DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Minggang Li(Gavin)" <gavinl@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
	<thomas@monjalon.net>, Aman Singh <aman.deep.singh@intel.com>,
	"Minggang Li (Gavin)" <gavinl@nvidia.com>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>
Subject: [PATCH 2/2] app/testpmd: use flags from user if it is set
Date: Tue, 18 Feb 2025 12:33:22 +0200	[thread overview]
Message-ID: <20250218103322.166461-3-gavinl@nvidia.com> (raw)
In-Reply-To: <20250218103322.166461-1-gavinl@nvidia.com>

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(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index e1720e54d7..3947304b63 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -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;
-- 
2.34.1


  parent reply	other threads:[~2025-02-18 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 10:33 [PATCH 0/2] " Minggang Li(Gavin)
2025-02-18 10:33 ` [PATCH 1/2] doc: fix mlx5 VXLAN matching limitations Minggang Li(Gavin)
2025-02-18 10:56   ` Dariusz Sosnowski
2025-02-18 10:33 ` Minggang Li(Gavin) [this message]
2025-02-18 10:56   ` [PATCH 2/2] app/testpmd: use flags from user if it is set Dariusz Sosnowski
2025-02-20 20:58 ` [PATCH 0/2] " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250218103322.166461-3-gavinl@nvidia.com \
    --to=gavinl@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).