From cf7fa5b9013c51dc87124c8ff2358a5f5384d44d Mon Sep 17 00:00:00 2001
From: Markus Gothe <markus.gothe@genexis.eu>
Date: Tue, 4 Mar 2025 15:06:13 +0100
Subject: [PATCH] airoha proto: Setup VXLAN offloading.

---
 airoha/base-files/etc/hotplug.d/proto/10-vxlan | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100755 airoha/base-files/etc/hotplug.d/proto/10-vxlan

diff --git a/airoha/base-files/etc/hotplug.d/proto/10-vxlan b/airoha/base-files/etc/hotplug.d/proto/10-vxlan
new file mode 100755
index 000000000..23bc38bdb
--- /dev/null
+++ b/airoha/base-files/etc/hotplug.d/proto/10-vxlan
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+[ "$PROTOCOL" = "vxlan" -o "$PROTOCOL" = "vxlan6" ] || exit 0
+[ "$ACTION" = "pre-setup" ] || exit 0
+
+if [ -e /proc/tc3162/hwnat_npu_vxlan_offload_shortcut ]; then
+	echo 1 > /proc/tc3162/hwnat_npu_vxlan_offload_shortcut
+fi
+
+if [ -e /proc/tc3162/hwnat_npu_offload_proto ]; then
+	echo 1 > /proc/tc3162/hwnat_npu_offload_proto
+fi
+
+/userfs/bin/ppemgr vxlan_hash enable
-- 
GitLab