mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
mediatek: hnat: set default ppe num to 2
This commit is contained in:
parent
f518559c0f
commit
31c2a045db
@ -20,10 +20,7 @@ if [ -e "/lib/modules/$kernel_ver/mtkhnat.ko" ]; then
|
||||
uci -q set "turboacc.config.fastpath_mh_eth_hnat_v6"="1"
|
||||
uci -q set "turboacc.config.fastpath_mh_eth_hnat_macvlan"="0"
|
||||
uci -q set "turboacc.config.fastpath_mh_eth_hnat_bind_rate"="30"
|
||||
local mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)"
|
||||
if [ "$mem" -gt 262144 ]; then
|
||||
uci -q set "turboacc.config.fastpath_mh_eth_hnat_ppenum"="2"
|
||||
fi
|
||||
uci -q set "turboacc.config.fastpath_mh_eth_hnat_ppenum"="2"
|
||||
elif [ -e "/lib/modules/$kernel_ver/fast-classifier.ko" ]; then
|
||||
uci -q set "turboacc.config.fastpath"="fast_classifier"
|
||||
uci -q set "turboacc.config.fastpath_fc_br"="1"
|
||||
|
@ -1,7 +1,7 @@
|
||||
do_setup_ppenum() {
|
||||
if [ -f "/etc/modules.d/20-mediatek_hnat" ]; then
|
||||
PPE_NUM="$(uci -q get turboacc.config.fastpath_mh_eth_hnat_ppenum)"
|
||||
echo "mtkhnat ppe_cnt=${PPE_NUM:-1}" > /etc/modules.d/20-mediatek_hnat
|
||||
echo "mtkhnat ppe_cnt=${PPE_NUM:-2}" > /etc/modules.d/20-mediatek_hnat
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ EXPORT_SYMBOL(ppe_dev_register_hook);
|
||||
void (*ppe_dev_unregister_hook)(struct net_device *dev) = NULL;
|
||||
EXPORT_SYMBOL(ppe_dev_unregister_hook);
|
||||
|
||||
static int ppe_cnt = 1;
|
||||
static int ppe_cnt = 2;
|
||||
module_param(ppe_cnt, int, 0);
|
||||
|
||||
static void hnat_sma_build_entry(struct timer_list *t)
|
||||
|
@ -44,7 +44,7 @@ define KernelPackage/mediatek_hnat
|
||||
TITLE:=Mediatek HNAT module
|
||||
DEPENDS:=@TARGET_mediatek +kmod-nf-conntrack
|
||||
AUTOLOAD:=$(call AutoLoad,20,mtkhnat)
|
||||
MODPARAMS.mtkhnat:=ppe_cnt=1
|
||||
MODPARAMS.mtkhnat:=ppe_cnt=2
|
||||
KCONFIG:= \
|
||||
CONFIG_BRIDGE_NETFILTER=y \
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y \
|
||||
|
Loading…
x
Reference in New Issue
Block a user