fix(shaper): keep dry-run updates independent of CAKE rediscovery
This commit is contained in:
1 file changed
+5
-1
@@ -191,10 +191,14 @@ impl TrafficControlBackend for Netlink {
|
|||||||
bandwidth_kbit: u64,
|
bandwidth_kbit: u64,
|
||||||
dry_run: bool,
|
dry_run: bool,
|
||||||
) -> Result<(), Self::Error> {
|
) -> Result<(), Self::Error> {
|
||||||
|
if dry_run {
|
||||||
|
return Self::set_qdisc_rate(shaper, bandwidth_kbit, true);
|
||||||
|
}
|
||||||
|
|
||||||
let mut last_warning = None;
|
let mut last_warning = None;
|
||||||
loop {
|
loop {
|
||||||
let result = Self::qdisc_from_ifname(&shaper.ifname)
|
let result = Self::qdisc_from_ifname(&shaper.ifname)
|
||||||
.and_then(|current| Self::set_qdisc_rate(¤t, bandwidth_kbit, dry_run));
|
.and_then(|current| Self::set_qdisc_rate(¤t, bandwidth_kbit, false));
|
||||||
match result {
|
match result {
|
||||||
Ok(()) => return Ok(()),
|
Ok(()) => return Ok(()),
|
||||||
Err(error) if error.is_qdisc_loss() && !SHUTDOWN.load(Ordering::Relaxed) => {
|
Err(error) if error.is_qdisc_loss() && !SHUTDOWN.load(Ordering::Relaxed) => {
|
||||||
|
|||||||
Reference in new issue
Block a user