mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-12-17 17:27:54 +00:00
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
f8624db86c
@ -74,6 +74,11 @@ menuconfig DEVEL
|
|||||||
Store ccache in this directory.
|
Store ccache in this directory.
|
||||||
If not set, uses './.ccache'
|
If not set, uses './.ccache'
|
||||||
|
|
||||||
|
config KERNEL_CFLAGS
|
||||||
|
string "Kernel extra CFLAGS" if DEVEL
|
||||||
|
default "-falign-functions=32" if TARGET_bcm53xx
|
||||||
|
default ""
|
||||||
|
|
||||||
config EXTERNAL_KERNEL_TREE
|
config EXTERNAL_KERNEL_TREE
|
||||||
string "Use external kernel tree" if DEVEL
|
string "Use external kernel tree" if DEVEL
|
||||||
default ""
|
default ""
|
||||||
|
|||||||
@ -101,7 +101,7 @@ endif
|
|||||||
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
|
||||||
|
|
||||||
KERNEL_MAKE_FLAGS = \
|
KERNEL_MAKE_FLAGS = \
|
||||||
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \
|
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
|
||||||
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
|
||||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||||
ARCH="$(LINUX_KARCH)" \
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
|||||||
1
rules.mk
1
rules.mk
@ -62,7 +62,6 @@ ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
|
|||||||
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
||||||
SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
|
SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
|
||||||
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
||||||
export EXTRA_OPTIMIZATION:=$(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))
|
|
||||||
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
||||||
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
|
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
|
||||||
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
|
||||||
|
|||||||
44
target/linux/bcm53xx/base-files/etc/init.d/fastnetwork
Executable file
44
target/linux/bcm53xx/base-files/etc/init.d/fastnetwork
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=25
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
reload_service
|
||||||
|
}
|
||||||
|
|
||||||
|
service_triggers() {
|
||||||
|
procd_add_reload_trigger "network"
|
||||||
|
procd_add_reload_trigger "firewall"
|
||||||
|
procd_add_reload_interface_trigger "lan"
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
local packet_steering="$(uci -q get network.@globals[0].packet_steering)"
|
||||||
|
local num_cpus="$(grep -c "^processor.*:" /proc/cpuinfo)"
|
||||||
|
local flow_offloading="$(uci -q get firewall.@defaults[0].flow_offloading)"
|
||||||
|
local flow_offloading_hw="$(uci -q get firewall.@defaults[0].flow_offloading_hw)"
|
||||||
|
|
||||||
|
# Any steering on 1 CPU (BCM47081) worsens network performance
|
||||||
|
[ "$num_cpus" != 2 ] && return
|
||||||
|
|
||||||
|
[ "$packet_steering" != 1 ] && {
|
||||||
|
echo 0 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||||
|
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ${flow_offloading_hw:-0} -gt 0 ]; then
|
||||||
|
# HW offloading
|
||||||
|
echo 0 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||||
|
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||||
|
elif [ ${flow_offloading:-0} -gt 0 ]; then
|
||||||
|
# SW offloading
|
||||||
|
# br-lan setup doesn't seem to matter for offloading case
|
||||||
|
echo 2 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||||
|
else
|
||||||
|
# Default
|
||||||
|
echo 2 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||||
|
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||||
|
fi
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
uci set network.@globals[0].packet_steering="1"
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||||
|
Date: Mon, 20 Jun 2022 10:01:18 +0200
|
||||||
|
Subject: [PATCH] net: disable GRO by default
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
In many cases GRO improves network performance however it comes at a
|
||||||
|
cost of chacksums calculations. In case of slow CPU and missing hardware
|
||||||
|
csum calculation support GRO can actually decrease network speed.
|
||||||
|
|
||||||
|
On BCM4708 *disabling* GRO results in following NAT masquarade speed
|
||||||
|
changes:
|
||||||
|
1. 364 Mb/s → 396 Mb/s (packet steering disabled)
|
||||||
|
2. 341 Mb/s → 566 Mb/s (packet steering enabled)
|
||||||
|
|
||||||
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||||
|
---
|
||||||
|
include/linux/netdev_features.h | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/include/linux/netdev_features.h
|
||||||
|
+++ b/include/linux/netdev_features.h
|
||||||
|
@@ -224,7 +224,7 @@ static inline int find_next_netdev_featu
|
||||||
|
#define NETIF_F_UPPER_DISABLES NETIF_F_LRO
|
||||||
|
|
||||||
|
/* changeable features with no special hardware requirements */
|
||||||
|
-#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
|
||||||
|
+#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO)
|
||||||
|
|
||||||
|
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
|
||||||
|
NETIF_F_HW_VLAN_CTAG_RX | \
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From: Felix Fietkau <nbd@nbd.name>
|
|
||||||
Subject: Upgrade to Linux 2.6.19
|
|
||||||
|
|
||||||
- Includes large parts of the patch from #1021 by dpalffy
|
|
||||||
- Includes RB532 NAND driver changes by n0-1
|
|
||||||
|
|
||||||
[john@phrozen.org: feix will add this to his upstream queue]
|
|
||||||
|
|
||||||
lede-commit: bff468813f78f81e36ebb2a3f4354de7365e640f
|
|
||||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
||||||
---
|
|
||||||
Makefile | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -719,11 +719,11 @@ KBUILD_CFLAGS += $(call cc-disable-warni
|
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
|
||||||
|
|
||||||
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
|
||||||
-KBUILD_CFLAGS += -O2
|
|
||||||
+KBUILD_CFLAGS += -O2 $(EXTRA_OPTIMIZATION)
|
|
||||||
else ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
||||||
-KBUILD_CFLAGS += -O3
|
|
||||||
+KBUILD_CFLAGS += -O3 $(EXTRA_OPTIMIZATION)
|
|
||||||
else ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
|
||||||
-KBUILD_CFLAGS += -Os
|
|
||||||
+KBUILD_CFLAGS += -Os -fno-reorder-blocks -fno-tree-ch $(EXTRA_OPTIMIZATION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Tell gcc to never replace conditional load with a non-conditional one
|
|
||||||
Loading…
Reference in New Issue
Block a user