RDKB-63040: [TXB7/TXB8]: Observed Packet Error Count Marker updated with large Values#902
Merged
gsathish86 merged 7 commits intordkcentral:release/8.2_p3bfrom Feb 20, 2026
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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.
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
Contributor
There was a problem hiding this comment.
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.
gsathish86
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change: Counter wrapped and subtraction logic failed at the marker polling.
Test Procedure:
Priority: P1
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com