RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#79
RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#79
Conversation
Reason for change: Added Single Build- OneStack handling Test Procedure: - TBD Risks: None Priority: P3 Signed-off-by: rirfha948 <rasina_irfhan@comcast.com>
There was a problem hiding this comment.
Pull request overview
This pull request implements conditional IPv6 prefix delegation handling for OneStack builds, aiming to support both business and residential device modes within a single build. The changes introduce a new system event for IPv6 prefix delegation that is conditionally compiled when the _ONESTACK_PRODUCT_REQ_ flag is defined.
Changes:
- Added conditional compilation support for OneStack product requirements in the build system
- Introduced a new sysevent
ipv6_prefix_delegationto track IPv6 prefix delegation alongside the existing TR-181 sysevent - Updated build dependencies to include required runtime libraries for mode detection
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| source/DHCPMgrUtils/dhcpmgr_v6_lease_handler.c | Added conditional include for rdkb_feature_mode_gate.h, defined new sysevent name constant, and added sysevent entry to IPv6Events array |
| source/DHCPMgrUtils/Makefile.am | Added conditional linker flags for rdkb_feature_mode_gate and devicemode libraries when ONESTACK_PRODUCT_REQ is enabled |
| configure.ac | Added AM_CONDITIONAL macro to enable ONESTACK_PRODUCT_REQ feature flag in the build system |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| {ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME}, | ||
| #endif |
There was a problem hiding this comment.
According to the PR description, this change should "Handle IPv6 delegation for business vs residential Partner ID as part of single build" with different behavior in Business-mode versus Residential-mode. However, the current implementation unconditionally adds the prefix delegation sysevent whenever ONESTACK_PRODUCT_REQ is defined, without any runtime check to distinguish between business and residential modes. If runtime mode differentiation is required as suggested by the PR description, the code should use the rdkb_feature_mode_gate.h header to check the device mode and conditionally set the sysevent accordingly. Otherwise, if compile-time differentiation is sufficient, the PR description should be clarified.
| IPv6Events eventv6[] = { | ||
| {ia_pd_prefix, COSA_DML_WANIface_PREF_SYSEVENT_NAME}, | ||
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| {ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME}, |
There was a problem hiding this comment.
This line uses a tab character for indentation, which is inconsistent with the surrounding code that uses spaces. The codebase appears to use spaces for indentation (as seen in lines 294, 298-302). Please use consistent spacing to match the rest of the file.
| {ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME}, | |
| {ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME}, |
| #include <rdkb_feature_mode_gate.h> | ||
| #endif // _ONESTACK_PRODUCT_REQ_ | ||
| #if defined(_ONESTACK_PRODUCT_REQ_) |
There was a problem hiding this comment.
The rdkb_feature_mode_gate.h header is included but none of its functions or types appear to be used in the code. According to the PR description, this change should handle business vs residential mode dynamically at runtime, but the current implementation only adds a compile-time conditional sysevent without any runtime mode checking. If runtime mode detection is intended, the code should use functions from rdkb_feature_mode_gate.h to check the mode and conditionally set the sysevent. Otherwise, if runtime detection is not needed, this header inclusion should be removed.
| #include <rdkb_feature_mode_gate.h> | |
| #endif // _ONESTACK_PRODUCT_REQ_ | |
| #if defined(_ONESTACK_PRODUCT_REQ_) |
Is this a User Story (US)?
Have all dependent PRs from other components been listed ?
RDKB-63098-changes.xlsx
Does the commit message include both the User Story ticket and the Subtask ticket?
Will be all changes related to the User Story squashed and merged in a single commit?
Has the PR been raised only after completing all changes for the User Story (no partial changes)?
Has code development for the User Story been completed?
If yes, has the Gerrit topic or list of all dependent PRs across components (including meta-layer changes) been shared?
Is there a validation log available in the Jira ticket for verifying builds with the updated generic-srcrev.inc across all platforms?
RDKB-63098-logs.txt