Skip to content

RDKB-65730: Integrate Dynamic Table Support - Build Time Disabled#396

Open
yogeswaransky wants to merge 4 commits into
developfrom
feature/RDKB-65730
Open

RDKB-65730: Integrate Dynamic Table Support - Build Time Disabled#396
yogeswaransky wants to merge 4 commits into
developfrom
feature/RDKB-65730

Conversation

@yogeswaransky

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Copilot AI review requested due to automatic review settings July 16, 2026 10:04
@yogeswaransky
yogeswaransky requested a review from a team as a code owner July 16, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a build-time toggle for Dynamic Table (TR-181 table traversal) support, defaulting the feature to disabled, and gates the related code paths behind ENABLE_DYNAMIC_TABLE_SUPPORT.

Changes:

  • Introduces --enable-dynamic-table-support in configure.ac, defining -DENABLE_DYNAMIC_TABLE_SUPPORT when enabled.
  • Wraps Dynamic Table structs/APIs and related logic in #ifdef ENABLE_DYNAMIC_TABLE_SUPPORT across parser/reportgen/profile/util code.
  • Adjusts runtime behavior to ignore dataModelTable parameters when the feature is disabled.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
configure.ac Adds configure-time option and defines ENABLE_DYNAMIC_TABLE_SUPPORT macro via CPPFLAGS.
source/utils/t2common.h Conditionally exposes DataModelParam/DataModelTable and related APIs only when enabled.
source/utils/t2common.c Conditionally compiles Dynamic Table free helpers and matchesParameter().
source/t2parser/t2parser.c Conditionally compiles DataModelTable parsing helpers and ignores dataModelTable when disabled.
source/reportgen/reportgen.c Conditionally compiles Dynamic Table JSON encoding helpers/branch.
source/bulkdata/profile.h Makes Profile::dataModelTableList conditional on the feature flag.
source/bulkdata/profile.c Conditionally frees/uses dataModelTableList when enabled.

Comment thread source/bulkdata/profile.h
Comment on lines +97 to +99
#ifdef ENABLE_DYNAMIC_TABLE_SUPPORT
Vector *dataModelTableList; // List of DataModelTable
#endif
Comment thread source/utils/t2common.h
Comment on lines 150 to +164
@@ -160,12 +161,15 @@ typedef struct _DataModelTable
char *index;
Vector *paramList; // List of DataModelParam
} DataModelTable;
#endif
Comment thread configure.ac
Comment on lines +222 to +239
ENABLE_DYNAMIC_TABLE_SUPPORT=false
AC_ARG_ENABLE([dynamic-table-support],
AS_HELP_STRING([--enable-dynamic-table-support],[enable dynamic TR-181 table traversal support (default is no)]),
[
case "${enableval}" in
yes) ENABLE_DYNAMIC_TABLE_SUPPORT=true ;;
no) ENABLE_DYNAMIC_TABLE_SUPPORT=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-table-support]) ;;
esac
],
[echo "dynamic table support is disabled"])
AM_CONDITIONAL([ENABLE_DYNAMIC_TABLE_SUPPORT], [test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue])

if test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue; then
CPPFLAGS="$CPPFLAGS -DENABLE_DYNAMIC_TABLE_SUPPORT"
fi

AC_MSG_NOTICE([Dynamic table support: $ENABLE_DYNAMIC_TABLE_SUPPORT])
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Copilot AI review requested due to automatic review settings July 17, 2026 07:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread source/bulkdata/profile.h
Comment on lines +97 to +99
#ifdef ENABLE_DYNAMIC_TABLE_SUPPORT
Vector *dataModelTableList; // List of DataModelTable
#endif
Comment thread configure.ac
Comment on lines +222 to +240
ENABLE_DYNAMIC_TABLE_SUPPORT=false
AC_ARG_ENABLE([dynamic-table-support],
AS_HELP_STRING([--enable-dynamic-table-support],[enable dynamic TR-181 table traversal support (default is no)]),
[
case "${enableval}" in
yes) ENABLE_DYNAMIC_TABLE_SUPPORT=true ;;
no) ENABLE_DYNAMIC_TABLE_SUPPORT=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-table-support]) ;;
esac
],
[echo "dynamic table support is disabled"])
AM_CONDITIONAL([ENABLE_DYNAMIC_TABLE_SUPPORT], [test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue])

if test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue; then
CPPFLAGS="$CPPFLAGS -DENABLE_DYNAMIC_TABLE_SUPPORT"
fi

AC_MSG_NOTICE([Dynamic table support: $ENABLE_DYNAMIC_TABLE_SUPPORT])

Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Copilot AI review requested due to automatic review settings July 17, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread configure.ac
Comment on lines +222 to +239
ENABLE_DYNAMIC_TABLE_SUPPORT=false
AC_ARG_ENABLE([dynamic-table-support],
AS_HELP_STRING([--enable-dynamic-table-support],[enable dynamic TR-181 table traversal support (default is no)]),
[
case "${enableval}" in
yes) ENABLE_DYNAMIC_TABLE_SUPPORT=true ;;
no) ENABLE_DYNAMIC_TABLE_SUPPORT=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-table-support]) ;;
esac
],
[echo "dynamic table support is disabled"])
AM_CONDITIONAL([ENABLE_DYNAMIC_TABLE_SUPPORT], [test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue])

if test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue; then
CPPFLAGS="$CPPFLAGS -DENABLE_DYNAMIC_TABLE_SUPPORT"
fi

AC_MSG_NOTICE([Dynamic table support: $ENABLE_DYNAMIC_TABLE_SUPPORT])
Comment on lines 112 to 115
if(profile->dataModelTableList)
{
Vector_Destroy(profile->dataModelTableList, NULL);
}
Comment on lines +252 to 254
#ifdef ENABLE_DYNAMIC_TABLE_SUPPORT
//Function to get the basePath like Device.WiFi.AccessPoint.
int getBasePath(const char *input, char *basePath, size_t maxLength)
Copilot AI review requested due to automatic review settings July 18, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

configure.ac:239

  • With dynamic table support disabled by default, build-time hiding of DataModelTable/Profile::dataModelTableList causes the existing *_dynamictable_gtest.bin test sources (e.g., source/test/t2parser/t2parser_dynamictable_Test.cpp, source/test/reportgen/reportgen_dynamictable_Test.cpp) to fail to compile because they reference these symbols without #ifdef guards. The new AM_CONDITIONAL is defined here but those test binaries are still built unconditionally in their Makefile.am files; they should be wrapped in if ENABLE_DYNAMIC_TABLE_SUPPORT (or the test sources should be made to compile/skip like profile_dynamictable_Test.cpp).
ENABLE_DYNAMIC_TABLE_SUPPORT=false
AC_ARG_ENABLE([dynamic-table-support],
        AS_HELP_STRING([--enable-dynamic-table-support],[enable dynamic TR-181 table traversal support (default is no)]),
        [
          case "${enableval}" in
           yes) ENABLE_DYNAMIC_TABLE_SUPPORT=true ;;
           no)  ENABLE_DYNAMIC_TABLE_SUPPORT=false ;;
          *) AC_MSG_ERROR([bad value ${enableval} for --enable-dynamic-table-support]) ;;
           esac
           ],
        [echo "dynamic table support is disabled"])
AM_CONDITIONAL([ENABLE_DYNAMIC_TABLE_SUPPORT], [test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue])

if test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue; then
    CPPFLAGS="$CPPFLAGS -DENABLE_DYNAMIC_TABLE_SUPPORT"
fi

AC_MSG_NOTICE([Dynamic table support: $ENABLE_DYNAMIC_TABLE_SUPPORT])

source/test/mocks/profileStub.c:115

  • When dynamic table support is enabled, dataModelTableList elements are DataModelTable allocations (with nested paramList). Destroying the vector with a NULL element free function leaks those allocations and can break valgrind-based tests; use freeDataModelTable here to match production cleanup.
    if(profile->dataModelTableList)
    {
        Vector_Destroy(profile->dataModelTableList, NULL);
    }

Comment thread configure.ac
esac
],
[echo "dynamic table support is disabled"])
AM_CONDITIONAL([ENABLE_DYNAMIC_TABLE_SUPPORT], [test x$ENABLE_DYNAMIC_TABLE_SUPPORT = xtrue])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants