From 92b607bd0ee7b1b2122fd2ad10b9dfa16de77840 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Fri, 18 Oct 2024 18:34:08 +0530 Subject: [PATCH] obuspa: reduce IPC cost for get calls --- obuspa/Config.in | 2 - obuspa/Makefile | 4 +- .../patches/0022-use-datamodel-caching.patch | 38 +++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 obuspa/patches/0022-use-datamodel-caching.patch diff --git a/obuspa/Config.in b/obuspa/Config.in index 259efb7ac..e13a59930 100644 --- a/obuspa/Config.in +++ b/obuspa/Config.in @@ -1,4 +1,3 @@ -if PACKAGE_obuspa config OBUSPA_MTP_ENABLE_MQTT bool "Enable MQTT as mtp protocol" default y @@ -56,4 +55,3 @@ config OBUSPA_SESSION_EXTENSION Adds Device.LocalAgent.X_IOPSYS_EU_Session. object to simulate a CWMP like session -endif diff --git a/obuspa/Makefile b/obuspa/Makefile index 3393ab291..2d745d4bb 100644 --- a/obuspa/Makefile +++ b/obuspa/Makefile @@ -5,13 +5,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=obuspa -PKG_VERSION:=9.0.0.10 +PKG_VERSION:=9.0.0.11 LOCAL_DEV:=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git -PKG_SOURCE_VERSION:=4aba89c67ba57322d112d11e038bc6071252cbd8 +PKG_SOURCE_VERSION:=83784445e5254238aef38c9b27f182cc504f395a PKG_MAINTAINER:=Vivek Dutta PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_MIRROR_HASH:=skip diff --git a/obuspa/patches/0022-use-datamodel-caching.patch b/obuspa/patches/0022-use-datamodel-caching.patch new file mode 100644 index 000000000..d6b12c66e --- /dev/null +++ b/obuspa/patches/0022-use-datamodel-caching.patch @@ -0,0 +1,38 @@ +diff --git a/src/core/cli_server.c b/src/core/cli_server.c +index d45555a..c65e96a 100644 +--- a/src/core/cli_server.c ++++ b/src/core/cli_server.c +@@ -753,6 +753,10 @@ int ExecuteCli_Get(char *arg1, char *arg2, char *usage) + } + #endif + ++ char *path[2] = {0}; ++ path[0] = arg1; ++ vendor_create_dm_cache(path, 1); ++ + // Exit if unable to get a list of all parameters referenced by the expression + STR_VECTOR_Init(¶ms); + INT_VECTOR_Init(&group_ids); +diff --git a/src/core/data_model.h b/src/core/data_model.h +index b9dc686..0767d02 100755 +--- a/src/core/data_model.h ++++ b/src/core/data_model.h +@@ -371,5 +371,6 @@ bool DM_PRIV_IsChildOf(char *path, dm_node_t *parent_node); + bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node); + bool DM_PRIV_AreAllChildrenGroupId(dm_node_t *parent, int group_id); + ++int vendor_create_dm_cache(char *paths[], int num_paths); + #endif + +diff --git a/src/core/handle_get.c b/src/core/handle_get.c +index 170d27d..de3a755 100644 +--- a/src/core/handle_get.c ++++ b/src/core/handle_get.c +@@ -143,6 +143,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp, char *controller_endpoint, mtp_conn_t + ExpandGetPathExpression(i, path_exprs[i], (int)depth, &get_expr_info[i], &ggv); + } + ++ vendor_create_dm_cache(path_exprs, num_path_expr); + // Get all parameters + GROUP_GET_VECTOR_GetValues(&ggv); +