mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
nft-qos: add new package
This is the nftables implementation for qos on OpenWrt, Currently, it has below features: * Static QoS : setting limit rate for devices or global network. * Dynamic/Auto QoS : setting limit rate according to the network bandwidth and adjust itself automatically (hotplug event). * Traffic Priority : this feature is like traffic shaping under tc, it uses ingress hook to handle to packets here. Signed-off-by: Rosy Song <rosysong@rosinson.com>
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
. /lib/nft-qos/monitor.sh
|
||||
. /lib/nft-qos/dynamic.sh
|
||||
. /lib/nft-qos/static.sh
|
||||
. /lib/nft-qos/priority.sh
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger nft-qos
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load nft-qos
|
||||
|
||||
qosdef_init_env
|
||||
qosdef_flush_static
|
||||
qosdef_flush_dynamic
|
||||
qosdef_remove_priority
|
||||
|
||||
qosdef_init_header
|
||||
qosdef_init_monitor
|
||||
qosdef_init_dynamic
|
||||
qosdef_init_static
|
||||
qosdef_init_priority
|
||||
qosdef_init_done
|
||||
qosdef_start
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
qosdef_flush_dynamic
|
||||
qosdef_flush_static
|
||||
qosdef_remove_priority
|
||||
qosdef_clean_cache
|
||||
}
|
||||
Reference in New Issue
Block a user