Skip to content

RDKEMW-21582, RDKEMW-16152 : Cherry picking of changes from 4.2.1.11 - #625

Closed
gururaajar wants to merge 2 commits into
developfrom
topic/8.4.4.11_cherry_pick
Closed

gururaajar wants to merge 2 commits into
developfrom
topic/8.4.4.11_cherry_pick

Conversation

@gururaajar

Copy link
Copy Markdown
Contributor

Reason for change: Cherry picking of changes from 4.2.1.11

AravindanNC and others added 2 commits September 24, 2026 14:02
…nly/IPv6-only networks (#581)

* DELIA-70624: updated to reset counters only if gateway is available for ipv6.

Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>

* DELIA-70624: Added debug in the script

Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>

* DELIA-70624: networkConnectionRecovery: presence-aware packet-loss recovery trigger

Recovery now fires only when no routed IP stack has acceptable
connectivity and at least one routed stack is at/above the reassociate
tolerance. This fixes the IPv4-only / IPv6-only case where a stack with
no default route left packetsLost at 0 and suppressed recovery.

Also folded in reliability/logging fixes:
- clear stale gwIp on the V6 test-hook path
- guard packet-loss comparisons against unparseable ping output
- emit SYST_WARN_GW100PERC_PACKETLOSS to the logs file on every run
- ping the IPv4 default-route interface explicitly (ping -I)
- log total ipv4/ipv6 packet loss when above threshold
- simplify the trigger to anyGood/anyBad classification

* DELIA-70624: networkConnectionRecovery: add log() helper and per-call packet-loss fix

- Introduce a log() helper that prepends the timestamp and appends to
  $logsFile, and convert the timestamped echo call sites to use it.
- Rename packetsLostipv4/packetsLostipv6 globals to
  ipv4PacketLoss/ipv6PacketLoss for clarity.
- Reset the per-call packetLoss to "" at the top of checkPacketLoss and
  guard the packet-loss telemetry block with [ -n "$packetLoss" ], so a
  routeless or unparseable ping no longer reuses the other family's value
  or triggers integer-comparison errors.
- Fix a "[" spacing bug in checkWifiDrvErrors.

Telemetry markers and t2CountNotify calls are unchanged.

* DELIA-70624: networkConnectionRecovery: log route/loss snapshot on state change

Emit a "network state changed" line with the per-stack route-present flags
and packet-loss values only when the snapshot differs from the previous run
(persisted in /tmp/.ncr_laststate), so field logs capture every transition
without printing on every run. Debugging aid for customer-site triage.

* DELIA-70624: remove debug logging and make script POSIX/busybox-sh safe

- Drop the temporary DEBUG_NCR field-debug logging; retain the
  "network state changed" transition log (now unprefixed).
- checkWifiDrvErrors(): $dir already holds the full debugfs path, so remove
  the duplicated /sys/kernel/debug/ieee80211/ prefix from the log messages,
  and capture the cat exit status so the failure log reports the real status
  instead of the enclosing test's result.
- Replace bashisms with POSIX/busybox-ash equivalents: source -> .,
  [[ =~ ]] -> case, [[ ]] -> [ ], and {1..9} -> explicit list (the brace
  form never expands under busybox ash, which had left the
  WIFIV_WARN_PL_20..90PERC packet-loss markers non-functional on target).
- Minor whitespace cleanup in checkDnsFile().

* DELIA-70624: restore 100% packet-loss triage marker and fix marker case

Reinstate the field-triage log marker for 100% packet loss that was lost
when checkPacketLoss() moved to a tolerance-based recovery decision. The
new log-only marker "100% Packet loss is observed on all routed IP stacks"
fires when every routed IP stack shows exactly 100% loss. It is independent
of WifiReassociateTolerance and does not alter the recovery/return path, so
recovery behaviour is unchanged. Unlike the legacy dual-stack
"...for both ipv4 and ipv6" print, it is also emitted correctly on
IPv4-only and IPv6-only networks. Triage associates the old and new strings
to the same 100%-packet-loss marker for trend continuity across images.

Also capitalise the "Packet loss more than 10% observed" marker (was
lowercase "packet loss ...") since triage marker matching is case-sensitive.

---------

Signed-off-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>
Co-authored-by: Balaji Punnuru <Balaji_Punnuru@comcast.com>
Copilot AI lite review requested due to automatic review settings September 24, 2026 18:12
@gururaajar
gururaajar requested a review from a team as a code owner September 24, 2026 18:12

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.

Copilot review overview

🔵 Needs a closer look

Network bootstrap and recovery behavior warrants final human review.

Review effort: Lite
Findings: None

What changed in this PR

Cherry-picks NetworkManager profile cleanup and network recovery improvements from release 4.2.1.11.

Changes:

  • Preserve non-Wi-Fi profiles during cleanup.
  • Improve recovery logging, diagnostics, and packet-loss handling.
  • Refine dual-stack connectivity and recovery decisions.
File Description
lib/​rdk/​NM_Bootstrap.sh Selectively removes Wi-Fi connection profiles.
lib/​rdk/​networkConnectionRecovery.sh Enhances logging, connectivity monitoring, and recovery logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gururaajar gururaajar closed this Sep 24, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants