Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  bcm53xx: PHICOMM K3 add k3screenctrl by default
  Config.in: disable LLVM default building
  x86: add Aquantia AQtion 5/2.5GbE USB-to-Ethernet by default
  kernel: bump 5.19 to 5.19.9 (coolsnowwolf#10125)
  rockchip: fix NanoPi R4SE has unique MAC address when boot from emmc
  kernel: add and enable MGLRU for Linux 5.15
  rockchip: ensure NanoPi R4S has unique MAC address
  Revert "rockchip: default smp tune on"
  uboot-rockchip:fix r4se uboot sd card not bootable (coolsnowwolf#10117)
  bridger: add bridge forwarding accelerator for target
  bpftools: update to standalone bpftools + libbpf, use the latest version
  • Loading branch information
github-actions[bot] committed Sep 15, 2022
2 parents 542018e + 83903ed commit c6619a5
Show file tree
Hide file tree
Showing 33 changed files with 5,676 additions and 141 deletions.
4 changes: 2 additions & 2 deletions include/kernel-5.19
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.19 = .8
LINUX_KERNEL_HASH-5.19.8 = 616308795a952a6a39b4c74807c33916850eb7166d8ed7c9a87a1ba55d7487ce
LINUX_VERSION-5.19 = .9
LINUX_KERNEL_HASH-5.19.9 = 0ad5b5986693adc1962be807bc3a64423a24b6a9da9df39b259d7e3bfd927f37
2 changes: 1 addition & 1 deletion include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DEFAULT_PACKAGES.router:=\
iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci luci-newapi \
ddns-scripts_aliyun ddns-scripts_dnspod luci-app-ddns luci-app-upnp luci-app-autoreboot \
luci-app-arpbind luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-vlmcsd \
luci-app-ramfree luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol ca-certificates
luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol curl ca-certificates

ifneq ($(DUMP),)
all: dumpinfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
rk3399-puma-haikou.dtb \
--- /dev/null
+++ b/arch/arm/dts/rk3399-nanopi-r4se.dts
@@ -0,0 +1,29 @@
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * FriendlyElec NanoPC-T4 board device tree source
Expand Down Expand Up @@ -40,6 +40,9 @@
+ non-removable;
+ status = "okay";
+};
+&sdmmc {
+ pinctrl-0 = <&sdmmc_cd>;
+};
--- /dev/null
+++ b/configs/nanopi-r4se-rk3399_defconfig
@@ -0,0 +1,65 @@
Expand Down
1 change: 0 additions & 1 deletion package/kernel/bpf-headers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ KERNEL_MAKE := \
LLVM=1 CC="$(CLANG)" LD="$(TARGET_CROSS)ld" \
HOSTCC="$(HOSTCC)" \
HOSTCXX="$(HOSTCXX)" \
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
CONFIG_SHELL="$(BASH)" \
INSTALL_HDR_PATH="$(PKG_BUILD_DIR)/user_headers"
Expand Down
76 changes: 76 additions & 0 deletions package/network/config/qosify/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# Copyright (C) 2021 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=qosify
PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2022-04-08
PKG_SOURCE_VERSION:=ef82defaae26619e5b2ebddfdd86e9de61c399f1
PKG_MIRROR_HASH:=8e4ca65d23a85aad774af51dc62cfaa4615111ffd2c7922258ac8f026a62b013
PKG_RELEASE:=$(AUTORELEASE)

PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Felix Fietkau <[email protected]>

PKG_BUILD_DEPENDS:=bpf-headers
PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include $(INCLUDE_DIR)/bpf.mk
include $(INCLUDE_DIR)/nls.mk

define Package/qosify
SECTION:=utils
CATEGORY:=Base system
TITLE:=A simple QoS solution based eBPF + CAKE
DEPENDS:=+libbpf +libubox +libubus +libnl-tiny +kmod-sched-cake +kmod-sched-bpf +kmod-ifb +tc $(BPF_DEPENDS)
endef

TARGET_CFLAGS += \
-Wno-error=deprecated-declarations \
-I$(STAGING_DIR)/usr/include/libnl-tiny \
-I$(STAGING_DIR)/usr/include

CMAKE_OPTIONS += \
-DLIBNL_LIBS=-lnl-tiny

define Build/Compile
$(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
$(Build/Compile/Default)
endef

define Package/qosify/conffiles
/etc/config/qosify
/etc/qosify/00-defaults.conf
endef

define Package/qosify/install
$(INSTALL_DIR) \
$(1)/lib/bpf \
$(1)/usr/sbin \
$(1)/etc/init.d \
$(1)/etc/config \
$(1)/etc/qosify \
$(1)/etc/hotplug.d/net \
$(1)/etc/hotplug.d/iface
$(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/qosify \
./files/qosify-status \
$(1)/usr/sbin/
$(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
$(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify/00-defaults.conf
$(INSTALL_DATA) ./files/qosify.conf $(1)/etc/config/qosify
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/net/10-qosify
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/iface/10-qosify
endef

$(eval $(call BuildPackage,qosify))
17 changes: 17 additions & 0 deletions package/network/config/qosify/files/qosify-defaults.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# DNS
tcp:53 voice
tcp:5353 voice
udp:53 voice
udp:5353 voice

# NTP
udp:123 voice

# SSH
tcp:22 +video

# HTTP/QUIC
tcp:80 +besteffort
tcp:443 +besteffort
udp:80 +besteffort
udp:443 +besteffort
70 changes: 70 additions & 0 deletions package/network/config/qosify/files/qosify-status
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh

dev_status() {
tc -s qdisc sh dev "$1" root
echo
}

common_status() {
json_get_vars ifname ingress egress

[ -n "$ifname" ] || return

[ "$egress" -gt 0 ] && {
echo "egress status:"
dev_status "$ifname"
}
[ "$ingress" -gt 0 ] && {
echo "ingress status:"
dev_status "$(printf %.16s "ifb-$ifname")"
}
}

is_active() {
json_get_vars active

[ "${active:-0}" -gt 0 ]
}

device_status() {
local name="$2"

json_select "$name"

if is_active; then
status="active"
else
status="not found"
fi

echo "===== device $name: $status ====="

is_active && common_status

json_select ..
}

interface_status() {
local name="$2"

json_select "$name"

if is_active; then
status="active"
elif ubus -S -t 0 wait_for "network.interface.$name"; then
status="down"
else
status="not found"
fi

echo "===== interface $name: $status ====="

is_active && common_status

json_select ..
}

json_load "$(ubus call qosify status)"
json_for_each_item device_status devices
json_for_each_item interface_status interfaces
48 changes: 48 additions & 0 deletions package/network/config/qosify/files/qosify.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
config defaults
list defaults /etc/qosify/*.conf
option dscp_prio video
option dscp_icmp +besteffort
option dscp_default_udp besteffort
option prio_max_avg_pkt_len 500

config class besteffort
option ingress CS0
option egress CS0

config class bulk
option ingress LE
option egress LE

config class video
option ingress AF41
option egress AF41

config class voice
option ingress CS6
option egress CS6
option bulk_trigger_pps 100
option bulk_trigger_timeout 5
option dscp_bulk CS0

config interface wan
option name wan
option disabled 1
option bandwidth_up 100mbit
option bandwidth_down 100mbit
option overhead_type none
# defaults:
option ingress 1
option egress 1
option mode diffserv4
option nat 1
option host_isolate 1
option autorate_ingress 0
option ingress_options ""
option egress_options ""
option options ""

config device wandev
option disabled 1
option name wan
option bandwidth 100mbit

2 changes: 2 additions & 0 deletions package/network/config/qosify/files/qosify.hotplug
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
ubus call qosify check_devices
Loading

0 comments on commit c6619a5

Please sign in to comment.