Skip to content

RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#79

Open
rirfha948 wants to merge 2 commits intodevelopfrom
topic/onestack_pd
Open

RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#79
rirfha948 wants to merge 2 commits intodevelopfrom
topic/onestack_pd

Conversation

@rirfha948
Copy link

@rirfha948 rirfha948 commented Feb 26, 2026

  • 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

Reason for change: Added Single Build- OneStack handling
Test Procedure:
  - TBD
Risks: None
Priority: P3
Signed-off-by: rirfha948 <rasina_irfhan@comcast.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_delegation to 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.

Comment on lines 295 to 297
#if defined(_ONESTACK_PRODUCT_REQ_)
{ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME},
#endif
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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},
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
{ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME},
{ia_pd_prefix, COSA_DML_WANIface_PREF_DELEGATION_SYSEVENT_NAME},

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +31
#include <rdkb_feature_mode_gate.h>
#endif // _ONESTACK_PRODUCT_REQ_
#if defined(_ONESTACK_PRODUCT_REQ_)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
#include <rdkb_feature_mode_gate.h>
#endif // _ONESTACK_PRODUCT_REQ_
#if defined(_ONESTACK_PRODUCT_REQ_)

Copilot uses AI. Check for mistakes.
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.

3 participants