Skip to content

RDKB-65187 - WAN Manager - Telemetry for Ignite.#213

Open
LakshminarayananShenbagaraj wants to merge 12 commits into
mainfrom
RDKB-65029-Test
Open

RDKB-65187 - WAN Manager - Telemetry for Ignite.#213
LakshminarayananShenbagaraj wants to merge 12 commits into
mainfrom
RDKB-65029-Test

Conversation

@LakshminarayananShenbagaraj

Copy link
Copy Markdown
Contributor

Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window. Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "secs")

Test Procedure:

  1. WANManager should run without any issue

Risks: Medium

Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
@LakshminarayananShenbagaraj LakshminarayananShenbagaraj requested a review from a team as a code owner May 26, 2026 09:53
Copilot AI review requested due to automatic review settings May 26, 2026 09:53
@LakshminarayananShenbagaraj LakshminarayananShenbagaraj added the enhancement New feature or request label May 26, 2026
@LakshminarayananShenbagaraj LakshminarayananShenbagaraj marked this pull request as draft May 26, 2026 09:53

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

This PR adds WAN outage duration telemetry (“WAN_FAILURE_TIME_split”) intended to measure customer no-internet time using a monotonic clock, and includes several related IPv6/MAP-T and connectivity-check adjustments in the WAN interface state machine.

Changes:

  • Add monotonic WAN failure timer tracking and emit telemetry when WAN service transitions back to “started”.
  • Refactor IPv6 DAD/default-route readiness check to support LAN-bridge vs WAN-interface behavior (bridge-mode handling).
  • Adjust IPv6 teardown / MAP-T paths, including removing some IPv6 cleanup and adding additional logging and LAN sync hooks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
@LakshminarayananShenbagaraj LakshminarayananShenbagaraj marked this pull request as ready for review June 1, 2026 12:05
Copilot AI review requested due to automatic review settings June 1, 2026 12:05
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

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 1 out of 1 changed files in this pull request and generated 7 comments.

Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment on lines +102 to +106
static void WanMgr_ResetWanFailureTimer(void)
{
gWanFailureTimerActive = false;
memset(&gWanFailureStartTime, 0, sizeof(gWanFailureStartTime));
}
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window. Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "secs")

Test Procedure:
WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Copilot AI review requested due to automatic review settings June 1, 2026 15: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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 10 comments.

Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment on lines +69 to +71
static struct timespec gWanFailureStartTime = {0};
static bool gWanFailureTimerActive = false;

Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment on lines +104 to +108
static void WanMgr_ResetWanFailureTimer(void)
{
gWanFailureTimerActive = false;
memset(&gWanFailureStartTime, 0, sizeof(gWanFailureStartTime));
}
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment on lines +1497 to +1504
if (pInterface->IfaceConnectionType == WAN_IFACE_CONN_TYPE_COLD_STANDBY || pInterface->IfaceType == REMOTE_IFACE)
{
WanMgr_PrintWanFailureTimeMarker(pInterface->AliasName);
}
else
{
WanMgr_ResetWanFailureTimer();
}
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Copilot AI review requested due to automatic review settings June 3, 2026 11:05
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>

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 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c Outdated
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Comment thread source/WanManager/wanmgr_main.c
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Copilot AI review requested due to automatic review settings June 3, 2026 11:11

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 3 out of 3 changed files in this pull request and generated 5 comments.

Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c Outdated
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Comment thread source/WanManager/wanmgr_main.c
Comment thread source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c Outdated
Reason for change:
Wan Manager MUST send WAN_FAILURE_TIME event with total time the customer has no internet service, from the moment WAN outage is detected to when internet service resumes via any available interface (HOTSPOT failover). The measured time MUST be reported as a positive integer in seconds and not be affected by NTP adjustments or system clock changes during the measurement window.
Marker name:WAN_FAILURE_TIME
Emitted as:t2_event_s("WAN_FAILURE_TIME_split", "<N>secs")

Test Procedure:
1. WANManager should run without any issue

Risks: Medium

Signed-off-by: LakshminarayananShenbagaraj <lakshminarayanan.shenbagaraj2@sky.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants