forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* 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
Showing
33 changed files
with
5,676 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
ubus call qosify check_devices |
Oops, something went wrong.