jool: add hotplug script to disable fraglist GRO
authorFelix Fietkau <[email protected]>
Sun, 22 Sep 2024 08:21:07 +0000 (10:21 +0200)
committerFelix Fietkau <[email protected]>
Fri, 4 Oct 2024 10:03:00 +0000 (12:03 +0200)
The kernel module translation code cannot deal with it

Signed-off-by: Felix Fietkau <[email protected]>
net/jool/Makefile
net/jool/files/jool-disable-fraglist-gro.sh [new file with mode: 0644]

index 14bb9f8adc7ad08eddc9514ce67d003fc40dcc49..fed3f2b0d160807a8732557d4fca69e2e14dbc7d 100644 (file)
@@ -102,7 +102,7 @@ endef
 define Package/jool-tools-netfilter
   $(call Package/jool/Default)
   TITLE:=Jool userspace control programs
-  DEPENDS:=+libnl +libnl-genl +kmod-jool-netfilter
+  DEPENDS:=+libnl +libnl-genl +kmod-jool-netfilter +ethtool
 endef
 
 define Package/jool-tools-netfilter/description
@@ -135,6 +135,9 @@ define Package/jool-tools-netfilter/install
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/jool.init $(1)/etc/init.d/jool
 
+       $(INSTALL_DIR) $(1)/etc/hotplug.d/net
+       $(INSTALL_BIN) ./files/jool-disable-fraglist-gro.sh $(1)/etc/hotplug.d/net/90-jool-disable-fraglist-gro.sh
+
        $(INSTALL_DIR) $(1)/etc/jool
        $(INSTALL_CONF) ./files/jool-nat64.conf.json $(1)/etc/jool/jool-nat64.conf.json
        $(INSTALL_CONF) ./files/jool-siit.conf.json $(1)/etc/jool/jool-siit.conf.json
diff --git a/net/jool/files/jool-disable-fraglist-gro.sh b/net/jool/files/jool-disable-fraglist-gro.sh
new file mode 100644 (file)
index 0000000..2d43c2e
--- /dev/null
@@ -0,0 +1,6 @@
+if [ "$ACTION" = add ]; then
+       for dev in `ls /sys/class/net`; do
+               [ -d "/sys/class/net/$dev" ] || continue
+               ethtool -K $dev rx-gro-list off 2>/dev/null
+       done
+fi