Skip to content

RDKB-63040: [TXB7/TXB8]: Observed Packet Error Count Marker updated with large Values#902

Merged
gsathish86 merged 7 commits intordkcentral:release/8.2_p3bfrom
MothiShree:dev_8.2_p3b
Feb 20, 2026
Merged

RDKB-63040: [TXB7/TXB8]: Observed Packet Error Count Marker updated with large Values#902
gsathish86 merged 7 commits intordkcentral:release/8.2_p3bfrom
MothiShree:dev_8.2_p3b

Conversation

@MothiShree
Copy link
Copy Markdown
Contributor

Reason for change: Counter wrapped and subtraction logic failed at the marker polling.
Test Procedure:

  1. Set the loginterval as 5min
  2. Connect a client and run high traffic.
  3. After reaching the traffic, check the errorssent marker value has been polled as 4294967295.
    Priority: P1
    Risks: Low
    Signed-off-by: mothishree_mallaiyanjothimani@comcast.com

Reason for change: for onboarding
Test Procedure: Debug
Priority: P0
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
…ebug Priority: P0 Risks: Low Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
Reason for change: for onboarding
Test Procedure: Debug
Priority: P0
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
…ith large Values

Reason for change: Counter wrapped and subtraction logic failed at the marker polling.
Test Procedure:
Set the loginterval as 5min
Connect a client and run high traffic.
After reaching the traffic, check the errorssent marker value has been polled as 4294967295.
Priority: P1
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
Copilot AI review requested due to automatic review settings February 13, 2026 06:52
Copy link
Copy Markdown
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 PR updates WHiX client telemetry counter delta calculations to handle counter wrap-around when polling per-client stats (notably error/packet counters), preventing incorrect large marker values after rollover.

Changes:

  • Introduces wrap-around aware delta computation for multiple per-client counters (bytes, packets, errors, retrans/retry counts).
  • Adds temporary variables (curr, prev, diff) to compute deltas safely instead of direct subtraction.
Comments suppressed due to low confidence (3)

source/apps/whix/wifi_whix.c:1595

  • strncat() into telemetryBuff uses a bound computed from strlen(buff) instead of strlen(telemetryBuff). This can prematurely truncate telemetryBuff and is easy to break if buff/telemetryBuff formats diverge. Compute the remaining capacity based on telemetryBuff when appending to telemetryBuff.
                strncat(buff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
                strncat(telemetryBuff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
            }

source/apps/whix/wifi_whix.c:1663

  • strncat() into telemetryBuff uses a bound computed from strlen(buff) instead of strlen(telemetryBuff). This can prematurely truncate telemetryBuff and is easy to break if buff/telemetryBuff formats diverge. Compute the remaining capacity based on telemetryBuff when appending to telemetryBuff.
                strncat(buff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
                strncat(telemetryBuff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
            }

source/apps/whix/wifi_whix.c:1701

  • strncat() into telemetryBuff uses a bound computed from strlen(buff) instead of strlen(telemetryBuff). This can prematurely truncate telemetryBuff and is easy to break if buff/telemetryBuff formats diverge. Compute the remaining capacity based on telemetryBuff when appending to telemetryBuff.
                strncat(buff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
                strncat(telemetryBuff, tmp, MAX_BUFF_SIZE - strlen(buff) - 1);
            }

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

Comment thread source/apps/whix/wifi_whix.c Outdated
Comment thread source/apps/whix/wifi_whix.c Outdated
Copilot AI added a commit to MothiShree/OneWifi that referenced this pull request Feb 17, 2026
- Created calculate_counter_delta() helper function to eliminate duplicated wrap-around logic
- Uses UINT32_MAX instead of ULONG_MAX for platform-independent 32-bit counter handling
- Applied helper function to all counter calculations (BytesSent/Received, PacketsSent/Received, ErrorsSent, RetransCount, FailedRetransCount, RetryCount, MultipleRetryCount)
- Addresses PR rdkcentral#902 feedback about code duplication and counter width handling

Co-authored-by: MothiShree <190452914+MothiShree@users.noreply.github.com>
…ith large Values

Reason for change: Counter wrapped and subtraction logic failed at the marker polling.
Test Procedure:

Set the loginterval as 5min
Connect a client and run high traffic.
After reaching the traffic, check the errorssent marker value has been polled as 4294967295.
Priority: P1
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
…ith large Values

Reason for change: Counter wrapped and subtraction logic failed at the marker polling.
Test Procedure:
Set the loginterval as 5min
Connect a client and run high traffic.
After reaching the traffic, check the errorssent marker value has been polled as 4294967295.
Priority: P1
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
Copilot AI review requested due to automatic review settings February 17, 2026 12:21
Copy link
Copy Markdown
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

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


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

Comment thread source/apps/whix/wifi_whix.c Outdated
@gsathish86 gsathish86 merged commit c1fcb2f into rdkcentral:release/8.2_p3b Feb 20, 2026
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 20, 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.

3 participants