Repository navigation
Coverity fixes - #1813
Merged
Merged
Coverity fixes#1813
Conversation
Coverity flags a division by zero in gen_cbs(), CID 566178, where the idle slope is scaled by the cycle over the gate's open time. Validation rejects a credit-based shaper on a gate that never opens, but nothing in gen_cbs() itself says so. Leave the slope unscaled when the open time is zero. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Coverity flags the Mbps to bps conversion in qos_port_rate() and qos_link_rate(), CID 566177 and 566179. The speed is a long read from sysfs or parsed from ethtool output, so the tool sees a value that may be negative, or large enough to wrap, when cast and multiplied. Convert in one place, qos_bps(), which falls back to a gigabit for a speed outside 1 Mbps to 1 Tbps. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
mattiaswal
approved these changes
Nov 22, 2026
Contributor
Author
|
Failures on Styx seem unrelated, after analysis by "a friend", so merging. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes to this weekend's Coverity findings, all in the latest QoS updates.
Checklist
Tick relevant boxes, this PR is-a or has-a: