[16/25] net/nfp: add the offload support of IPv6 GENEVE decap action

Message ID 1666063359-34283-17-git-send-email-chaoyong.he@corigine.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series add the extend rte_flow offload support of nfp PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chaoyong He Oct. 18, 2022, 3:22 a.m. UTC
  Add the offload support of decap action for IPv6 GENEVE tunnel.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 doc/guides/rel_notes/release_22_11.rst | 2 +-
 drivers/net/nfp/nfp_flow.c             | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst
index 92a0d64..4adad3c 100644
--- a/doc/guides/rel_notes/release_22_11.rst
+++ b/doc/guides/rel_notes/release_22_11.rst
@@ -185,7 +185,7 @@  New Features
     * Set the TTL
     * Set the DSCP of IPv4 and IPv6
     * Encap and decap of VXLAN tunnel
-    * Encap of GENEVE tunnel
+    * Encap and decap of GENEVE tunnel
 
 * **Updated NXP dpaa2 driver.**
 
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index a8287a1..f42cf77 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -1482,6 +1482,8 @@  struct nfp_pre_tun_entry {
 		tun6 = (struct nfp_flower_ipv6_udp_tun *)*mbuf_off;
 		tun6->tun_id = rte_cpu_to_be_32((geneve->vni[0] << 16) |
 				(geneve->vni[1] << 8) | (geneve->vni[2]));
+		if (!is_mask)
+			ret = nfp_tun_add_ipv6_off(app_fw_flower, tun6->ipv6.ipv6_dst);
 	} else {
 		tun4 = (struct nfp_flower_ipv4_udp_tun *)*mbuf_off;
 		tun4->tun_id = rte_cpu_to_be_32((geneve->vni[0] << 16) |