-
Notifications
You must be signed in to change notification settings - Fork 20
RDK-60318 [POC][T2] Evaluate Rbus IPC Alternatives for T2 Component Integration #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
ac8a292
e66495d
432070d
313d69b
cf44dad
8dd2ffe
fbc6847
14a9c3d
787397a
adfa20c
e5c84d8
e187146
08d9433
31fbac5
0eef33e
f15b73c
b847138
b1e8760
6c4202c
d15e625
3f8f32f
318c40f
837c4ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ autoreconf --install | |||||||||||||||||||||
| # FLags to print compiler warnings | ||||||||||||||||||||||
| DEBUG_CFLAGS="-Wall -Werror -Wextra" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | ||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lglib-2.0" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Comment on lines
+30
to
33
|
||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | |
| export LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lglib-2.0" | |
| DBUS_CFLAGS="$(pkg-config --cflags dbus-1 2>/dev/null || echo '-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0')" | |
| GLIB_CFLAGS="$(pkg-config --cflags glib-2.0 2>/dev/null || echo '-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include')" | |
| export CFLAGS=" ${DEBUG_CFLAGS} ${DBUS_CFLAGS} ${GLIB_CFLAGS} -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | |
| GLIB_LDFLAGS="$(pkg-config --libs glib-2.0 2>/dev/null || echo '-L/usr/lib/x86_64-linux-gnu -lglib-2.0')" | |
| export LDFLAGS="${GLIB_LDFLAGS}" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -315,7 +315,9 @@ T2ERROR ReportProfiles_setProfileXConf(ProfileXConf *profile) | |||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||
| unregisterDEforCompEventList(); | ||||||||||||||||||||||||||||||||
| createComponentDataElements(); | ||||||||||||||||||||||||||||||||
| publishEventsProfileUpdates(); | ||||||||||||||||||||||||||||||||
| //publishEventsProfileUpdates(); | ||||||||||||||||||||||||||||||||
| publishDBUSEventsProfileUpdates(); | ||||||||||||||||||||||||||||||||
|
Comment on lines
+318
to
+319
|
||||||||||||||||||||||||||||||||
| //publishEventsProfileUpdates(); | |
| publishDBUSEventsProfileUpdates(); | |
| publishEventsProfileUpdates(); |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue: publishEventsProfileUpdates() is commented out. Should be conditional.
| //publishEventsProfileUpdates(); | |
| publishDBUSEventsProfileUpdates(); | |
| } | |
| else | |
| { | |
| publishDBUSEventsProfileUpdates(); |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original publishEventsProfileUpdates() calls are commented out in favor of publishDBUSEventsProfileUpdates(). This breaks RBUS mode functionality. For production, either implement proper mode selection or document why RBUS support is being removed.
| //publishEventsProfileUpdates(); | |
| publishDBUSEventsProfileUpdates(); | |
| publishEventsProfileUpdates(); | |
| } | |
| else | |
| { | |
| publishDBUSEventsProfileUpdates(); |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The publishEventsProfileUpdates() calls are commented out and replaced with publishDBUSEventsProfileUpdates(). This breaks RBUS functionality. The code should conditionally call the appropriate function based on which bus is enabled, rather than completely disabling RBUS support.
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue: publishEventsProfileUpdates() is commented out and replaced with D-Bus version. This should be conditional based on the enabled bus type.
| // publishEventsProfileUpdates(); | |
| publishDBUSEventsProfileUpdates(); | |
| getMarkerCompRbusSub(true); | |
| } | |
| publishEventsProfileUpdates(); | |
| getMarkerCompRbusSub(true); | |
| } | |
| else | |
| { | |
| // Notify registered components via D-Bus when RBUS is not enabled | |
| publishDBUSEventsProfileUpdates(); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -196,13 +196,13 @@ void T2ER_Push(char* eventName, char* eventValue) | |||||
| } | ||||||
| else | ||||||
| { | ||||||
| T2Debug("Received eventInfo : %s value : %s\n", eventName, (char* ) eventValue); | ||||||
| T2Info("Received eventInfo : %s value : %s\n", eventName, (char* ) eventValue); | ||||||
|
||||||
| T2Event *event = (T2Event *) malloc(sizeof(T2Event)); | ||||||
| if(event != NULL) | ||||||
| { | ||||||
| event->name = strdup(eventName); | ||||||
| event->value = strdup(eventValue); | ||||||
| T2Debug("Adding eventName : %s eventValue : %s to t2event queue\n", event->name, event->value); | ||||||
| T2Info("Adding eventName : %s eventValue : %s to t2event queue\n", event->name, event->value); | ||||||
|
||||||
| T2Info("Adding eventName : %s eventValue : %s to t2event queue\n", event->name, event->value); | |
| T2Debug("Adding eventName : %s eventValue : %s to t2event queue\n", event->name, event->value); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -330,7 +330,18 @@ void createComponentDataElements() | |||||
| char *compName = (char*) Vector_At(componentList, i); | ||||||
| if(compName) | ||||||
| { | ||||||
| regDEforCompEventList(compName, getComponentMarkerList); | ||||||
| T2Info("Register data element for component %s \n", compName); | ||||||
| //TODO componet specific dbus inteface registration like rbus data element registration | ||||||
|
||||||
| //TODO componet specific dbus inteface registration like rbus data element registration | |
| //TODO component specific dbus inteface registration like rbus data element registration |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop terminates early when D-Bus callback registration succeeds (i = length at line 338). This means only the first component gets its marker list callback registered for D-Bus. If this is intentional because D-Bus uses a common callback for all components, it should be documented more clearly. Also verify that all components can properly retrieve their marker lists through this single callback.
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original RBUS registration call is commented out. For production code, this commented-out code should be removed, or the logic should be restructured to properly support both RBUS and D-Bus modes.
| //regDEforCompEventList(compName, getComponentMarkerList); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,9 +20,9 @@ AM_CFLAGS = | |||||
|
|
||||||
| lib_LTLIBRARIES = libccspinterface.la | ||||||
|
|
||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c | ||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c dbusInterface.c | ||||||
|
||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c dbusInterface.c | |
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| #include "rbusInterface.h" | ||||||||||||||||||||||||||||||||||||||||||||||
| #include "dbusInterface.h" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| static bool isRbus = false ; | ||||||||||||||||||||||||||||||||||||||||||||||
| static bool isBusInit = false ; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -59,6 +60,15 @@ static bool busInit( ) | |||||||||||||||||||||||||||||||||||||||||||||
| T2Debug("%s --RBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| isBusInit = true; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
61
to
+71
|
||||||||||||||||||||||||||||||||||||||||||||||
| isBusInit = true; | |
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | |
| { | |
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | |
| } | |
| else | |
| { | |
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | |
| } | |
| else | |
| { | |
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | |
| { | |
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | |
| } | |
| else | |
| { | |
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | |
| } | |
| } | |
| isBusInit = true; |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design issue: D-Bus interface is always initialized regardless of whether RBUS is available or enabled. This means both bus systems are running simultaneously, which wastes resources and can cause conflicts. The D-Bus initialization should only occur when RBUS is not available, implementing a proper fallback mechanism.
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditional D-Bus event listener registration: The D-Bus event listener is always registered (line 137) regardless of which bus mode is active. This is called before checking isRbus, meaning D-Bus listener will be registered even in RBUS mode. If this is intentional for dual-bus support, it should be documented. Otherwise, it should be conditional.
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the info message: "repeaceled" should be "replaced".
| T2Info("RBUS repeaceled with dbus\n"); | |
| T2Info("RBUS replaced with dbus\n"); |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RBUS event listener registration is commented out and replaced with D-Bus registration. However, the code still checks if (isRbus) before this block, which means when RBUS is active, it won't register anything. The logic should be updated to handle both RBUS and D-Bus modes properly, or the conditional should be removed if RBUS is being completely replaced.
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RBUS event listener registration is commented out and replaced with D-Bus registration. This breaks RBUS functionality when RBUS_SUPPORT_ENABLED is defined. The code should conditionally register with RBUS or D-Bus based on which bus is enabled, not completely disable RBUS registration.
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in log message: 'repeaceled' should be 'replaced'.
| T2Info("RBUS repeaceled with dbus\n"); | |
| T2Info("RBUS replaced with dbus\n"); |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RBUS event listener registration is commented out (line 163) and replaced with a D-Bus registration (line 159). However, the condition on line 161 still checks 'if (isRbus)', suggesting RBUS mode is expected. This creates a logic inconsistency where D-Bus is always used regardless of the isRbus flag. Either remove the isRbus check or implement proper mode selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded D-Bus include paths are not portable across different Linux distributions and architectures. The path
/usr/lib/x86_64-linux-gnu/dbus-1.0/includeis specific to x86_64 Debian/Ubuntu systems. Use pkg-config to detect D-Bus include paths:pkg-config --cflags dbus-1.