From ba837ff98a87a6dc4acd1d2863a24bb6b73d08d8 Mon Sep 17 00:00:00 2001 From: Mohd Mehdi Date: Fri, 11 Apr 2025 14:47:43 +0000 Subject: [PATCH] qosmngr: unified service and datamodel daemon --- qosmngr/Config.in | 7 ++++++- qosmngr/Makefile | 15 +++++++++------ qosmngr/bbfdm_service.json | 2 +- qosmngr/files/common/lib/qos/ebtables.sh | 6 +++--- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/qosmngr/Config.in b/qosmngr/Config.in index 143f0e3e5..1648c3ee8 100644 --- a/qosmngr/Config.in +++ b/qosmngr/Config.in @@ -3,5 +3,10 @@ if PACKAGE_qosmngr config QOSMNGR_VENDOR_PREFIX string "Package specific datamodel Vendor Prefix for TR181 extensions" default "" -endif +config QOSMNGR_UBUS + bool "qos ubus object support" + default y + help + Enable this option to support the qos ubus object. +endif diff --git a/qosmngr/Makefile b/qosmngr/Makefile index bc38264a4..b31a8be88 100644 --- a/qosmngr/Makefile +++ b/qosmngr/Makefile @@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=qosmngr -PKG_VERSION:=1.0.23 +PKG_VERSION:=1.1.0 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/qosmngr.git -PKG_SOURCE_VERSION:=f03c22f4bae8497bc9c88715ab094e7bef46b59e +PKG_SOURCE_VERSION:=1a15f1da7a1474d29aad77b8ad3272fcf4b4f6d1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_MIRROR_HASH:=skip endif @@ -24,6 +24,8 @@ PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk include ../bbfdm/bbfdm.mk +MAKE_PATH:=src + define Package/qosmngr SECTION:=utils CATEGORY:=Utilities @@ -48,10 +50,13 @@ VENDOR_PREFIX = $(CONFIG_QOSMNGR_VENDOR_PREFIX) endif TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\" +ifeq ($(CONFIG_QOSMNGR_UBUS),y) + TARGET_CFLAGS += -DUBUS_SUPPORT +endif ifeq ($(LOCAL_DEV),1) define Build/Prepare - $(CP) -rf ~/git/qosmngr/* $(PKG_BUILD_DIR)/ + $(CP) -rf ~/git/qosmngr/* $(PKG_BUILD_DIR)/ endef endif @@ -65,10 +70,8 @@ else $(CP) ./files/linux/* $(1)/ endif $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/qosmngr $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/qosmngr $(1)/usr/sbin $(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME) - $(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/libqos_bbf.so $(1) $(PKG_NAME) - $(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libqos_vendor_bbf.so $(1) $(PKG_NAME) 10 endef $(eval $(call BuildPackage,qosmngr)) diff --git a/qosmngr/bbfdm_service.json b/qosmngr/bbfdm_service.json index 01a644553..b4c2c0a2c 100644 --- a/qosmngr/bbfdm_service.json +++ b/qosmngr/bbfdm_service.json @@ -2,7 +2,7 @@ "daemon": { "enable": "1", "service_name": "qosmngr", - "unified_daemon": false, + "unified_daemon": true, "services": [ { "parent_dm": "Device.", diff --git a/qosmngr/files/common/lib/qos/ebtables.sh b/qosmngr/files/common/lib/qos/ebtables.sh index 5049913f8..d07b35673 100755 --- a/qosmngr/files/common/lib/qos/ebtables.sh +++ b/qosmngr/files/common/lib/qos/ebtables.sh @@ -340,11 +340,11 @@ handle_ebtables_rules() { is_l2_rule=1 fi - case $eth_type in - IPv4|IPV4|0800) + case $(echo "$eth_type" | tr 'a-z' 'A-Z') in + IPV4|0800|800|0X0800) ip_version=4 ;; - IPv6|IPV6|86DD) + IPV6|86DD|0X86DD) ip_version=6 ;; *)