DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/nfp: fix the new solution for tunnel decap action
@ 2023-06-12  3:18 Chaoyong He
  2023-06-12 10:36 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-06-12  3:18 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, niklas.soderlund, Chaoyong He, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/nfp: fix the new solution for tunnel decap action
  2023-06-12  3:18 [PATCH] net/nfp: fix the new solution for tunnel decap action Chaoyong He
@ 2023-06-12 10:36 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-06-12 10:36 UTC (permalink / raw)
  To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund, stable

On 6/12/2023 4:18 AM, Chaoyong He wrote:
> 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>
>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-12 10:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12  3:18 [PATCH] net/nfp: fix the new solution for tunnel decap action Chaoyong He
2023-06-12 10:36 ` Ferruh Yigit

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