DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com,
	Chaoyong He <chaoyong.he@corigine.com>,
	stable@dpdk.org
Subject: [PATCH] net/nfp: fix the new solution for tunnel decap action
Date: Mon, 12 Jun 2023 11:18:32 +0800	[thread overview]
Message-ID: <20230612031832.1832984-1-chaoyong.he@corigine.com> (raw)

Add the missing data endian convert operations, the former logic of
processing the 'vlan_tpid' field will cause the tunnel decap action
don't work as expect in some case.

Fixes: 9082336048e8 ("net/nfp: support new solution for tunnel decap action")
Cc: stable@dpdk.org

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 41b722f4d8..8be2d03de1 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2474,10 +2474,10 @@ nfp_flower_add_tun_neigh_v4_decap(struct nfp_app_fw_flower *app_fw_flower,
 	if (nfp_flower_support_decap_v2(app_fw_flower)) {
 		if (meta_tci->tci != 0) {
 			payload.ext.vlan_tci = meta_tci->tci;
-			payload.ext.vlan_tpid = 0x88a8;
+			payload.ext.vlan_tpid = RTE_BE16(0x88a8);
 		} else {
-			payload.ext.vlan_tci = 0xffff;
-			payload.ext.vlan_tpid = 0xffff;
+			payload.ext.vlan_tci = RTE_BE16(0xffff);
+			payload.ext.vlan_tpid = RTE_BE16(0xffff);
 		}
 		payload.ext.host_ctx = nfp_flow_meta->host_ctx_id;
 	}
@@ -2601,10 +2601,10 @@ nfp_flower_add_tun_neigh_v6_decap(struct nfp_app_fw_flower *app_fw_flower,
 	if (nfp_flower_support_decap_v2(app_fw_flower)) {
 		if (meta_tci->tci != 0) {
 			payload.ext.vlan_tci = meta_tci->tci;
-			payload.ext.vlan_tpid = 0x88a8;
+			payload.ext.vlan_tpid = RTE_BE16(0x88a8);
 		} else {
-			payload.ext.vlan_tci = 0xffff;
-			payload.ext.vlan_tpid = 0xffff;
+			payload.ext.vlan_tci = RTE_BE16(0xffff);
+			payload.ext.vlan_tpid = RTE_BE16(0xffff);
 		}
 		payload.ext.host_ctx = nfp_flow_meta->host_ctx_id;
 	}
-- 
2.39.1


             reply	other threads:[~2023-06-12  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12  3:18 Chaoyong He [this message]
2023-06-12 10:36 ` Ferruh Yigit

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=20230612031832.1832984-1-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=niklas.soderlund@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=stable@dpdk.org \
    /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).