qosmngr: move Device.QoS. from bbfdm to qosmngr

qos.c and qos.h are now added as a bbfdm micro service
This commit is contained in:
Mohd Husaam Mehdi 2024-04-03 11:34:24 +05:30
parent f674d32c4e
commit 6518f92be7
3 changed files with 27 additions and 3 deletions

View file

@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qosmngr
PKG_VERSION:=1.0.7
PKG_VERSION:=1.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4179d88a94d8d5989c67504228f9d61ec8a57aac
PKG_SOURCE_VERSION:=c07b4631e42191a45426e3a7dd1e000700c48edc
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/qosmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@ -22,12 +22,13 @@ PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/qosmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=QoS Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
DEPENDS:=+libbbfdm-api +libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
endef
define Package/qosmngr/description
@ -41,6 +42,7 @@ endef
endif
define Package/qosmngr/install
$(INSTALL_DIR) $(1)/etc/qos_bbf
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
@ -51,6 +53,8 @@ else
endif
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qosmngr $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bbf_plugin/libqos_bbf.so $(1)/etc/qos_bbf
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/common/etc/qos_bbf/input.json)
endef
$(eval $(call BuildPackage,qosmngr))

View file

@ -9,13 +9,18 @@ STOP=10
USE_PROCD=1
NAME=qosmngr
PROG=/usr/sbin/qosmngr
QOSMNGR_JSON_INPUT="/etc/qos_bbf/input.json"
. /lib/functions.sh
. /lib/qos/qos.sh
. /etc/bbfdm/bbfdm_services.sh
start_service() {
if [ -f "/etc/config/qos" ]; then
bbfdm_add_service "bbfdm.qosmngr" "${QOSMNGR_JSON_INPUT}"
reload_qos
procd_open_instance qosmngr
procd_set_param command ${PROG}

View file

@ -0,0 +1,15 @@
{
"daemon": {
"input": {
"type": "DotSo",
"name": "/etc/qos_bbf/libqos_bbf.so"
},
"output": {
"type": "UBUS",
"name": "bbfdm.qos.",
"parent_dm": "Device.",
"object": "QoS",
"root_obj": "bbfdm"
}
}
}