mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 04:20:09 +08:00
jool: add hotplug script to disable fraglist GRO
This commit is contained in:
parent
1c38018ec0
commit
7b5a8f41fa
@ -8,16 +8,16 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=jool
|
||||
PKG_VERSION:=4.1.8
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=4.1.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/NICMx/Jool.git
|
||||
PKG_SOURCE_VERSION:=6822bdee4ec63467e82d723a3381b3116c1853d9
|
||||
PKG_MIRROR_HASH:=6ef000459858a87e206c903828f428d469c18221789cb65fec91a8d822b0178f
|
||||
PKG_SOURCE_VERSION:=39ca69f8717a83733548bea3b7bfad2a4799572a
|
||||
PKG_MIRROR_HASH:=9846ec0766cf00f56628a2ae57bef066e7a723c9afa9f27ce1d2e2bfaa7c37ee
|
||||
|
||||
PKG_BUILD_DIR=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
@ -67,7 +67,7 @@ endef
|
||||
define Package/jool/Default
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://www.jool.mx
|
||||
URL:=https://nicmx.github.io/Jool/
|
||||
endef
|
||||
|
||||
define Package/jool/Default/description
|
||||
@ -102,7 +102,7 @@ endef
|
||||
define Package/jool-tools-netfilter
|
||||
$(call Package/jool/Default)
|
||||
TITLE:=Jool userspace control programs
|
||||
DEPENDS:=+libnl +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
|
||||
|
6
net/jool/files/jool-disable-fraglist-gro.sh
Normal file
6
net/jool/files/jool-disable-fraglist-gro.sh
Normal file
@ -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
|
@ -1,28 +1,35 @@
|
||||
# [Jool](https://www.jool.mx)
|
||||
# [Jool](https://nicmx.github.io/Jool/en/index.html)
|
||||
|
||||
## Documentation
|
||||
|
||||
[See here](https://www.jool.mx/en/documentation.html).
|
||||
[See here](https://nicmx.github.io/Jool/en/documentation.html).
|
||||
|
||||
You might also want to see [contact info](https://www.jool.mx/en/contact.html).
|
||||
You might also want to see [contact info](https://nicmx.github.io/Jool/en/contact.html).
|
||||
|
||||
## Usage
|
||||
|
||||
### Start script
|
||||
|
||||
This package includes a start script that will:
|
||||
1. Read the configuration file `/etc/config/jool`
|
||||
2. Determine what services are active
|
||||
3. Run jool with procd
|
||||
|
||||
For now this means that:
|
||||
* The services will be disabled by default in the uci config `(/etc/config/jool)`
|
||||
* The only uci configuration support available for the package is to enable or disable each instance or the entire deamon
|
||||
* There is no uci support and configuration will be saved at `/etc/jool/*
|
||||
* Only one instance of jool(nat64) can run with the boot script
|
||||
* Only one instance of jool(siit) can run with the boot script
|
||||
* For now there is no way of overriding of the configuration file's paths
|
||||
1. Read the configuration file `/etc/config/jool`
|
||||
2. Determine what services are active
|
||||
3. Run `jool` with procd
|
||||
|
||||
The configuration files the startup script useses for each jool instance are:
|
||||
* jool(nat64): `/etc/jool/jool-nat64.conf.json`
|
||||
* jool(siit): `/etc/jool/jool-siit.conf.json`
|
||||
### For now this means that
|
||||
|
||||
- The services will be disabled by default in the uci config `(/etc/config/jool)`
|
||||
- The only uci configuration support available for the package is to enable or disable each instance or the entire deamon
|
||||
- There is no uci support and configuration will be saved at `/etc/jool/`
|
||||
- Only one instance of jool(nat64) can run with the boot script
|
||||
- Only one instance of jool(siit) can run with the boot script
|
||||
- For now there is no way of overriding of the configuration file's paths
|
||||
|
||||
The configuration files the startup script uses for each jool instance are:
|
||||
|
||||
- jool(nat64): `/etc/jool/jool-nat64.conf.json`
|
||||
- jool(siit): `/etc/jool/jool-siit.conf.json`
|
||||
|
||||
### OpenWrt tutorial
|
||||
|
||||
For a more detailed tutorial refer to this [wiki page](https://openwrt.org/docs/guide-user/network/ipv6/nat64).
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5,7 +5,7 @@ AC_PREREQ([2.68])
|
||||
AC_INIT([Jool], [4.1.8], [jool@nic.mx])
|
||||
AC_INIT([Jool], [4.1.6], [jool@nic.mx])
|
||||
AC_CONFIG_SRCDIR([src/common/xlat.h])
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
-LT_PREREQ([2.4.6])
|
||||
|
@ -0,0 +1,22 @@
|
||||
--- a/src/mod/common/xlator.c
|
||||
+++ b/src/mod/common/xlator.c
|
||||
@@ -891,7 +891,7 @@ void xlator_put(struct xlator *jool)
|
||||
static bool offset_equals(struct instance_entry_usr *offset,
|
||||
struct jool_instance *instance)
|
||||
{
|
||||
- return (offset->ns == ((PTR_AS_UINT_TYPE)instance->jool.ns & 0xFFFFFFFF))
|
||||
+ return (offset->ns == ((uintptr_t)instance->jool.ns & 0xFFFFFFFF))
|
||||
&& (strcmp(offset->iname, instance->jool.iname) == 0);
|
||||
}
|
||||
|
||||
--- a/src/mod/common/nl/instance.c
|
||||
+++ b/src/mod/common/nl/instance.c
|
||||
@@ -38,7 +38,7 @@ static int serialize_instance(struct xla
|
||||
if (!root)
|
||||
return 1;
|
||||
|
||||
- error = nla_put_u32(skb, JNLAIE_NS, ((PTR_AS_UINT_TYPE)entry->ns) & 0xFFFFFFFF);
|
||||
+ error = nla_put_u32(skb, JNLAIE_NS, ((uintptr_t)entry->ns) & 0xFFFFFFFF);
|
||||
if (error)
|
||||
goto cancel;
|
||||
error = nla_put_u8(skb, JNLAIE_XF, xlator_flags2xf(entry->flags));
|
Loading…
Reference in New Issue
Block a user