diff --git a/src/bakery_integration_test.py b/src/bakery_integration_test.py index 7cc81463..a33e5488 100644 --- a/src/bakery_integration_test.py +++ b/src/bakery_integration_test.py @@ -492,11 +492,15 @@ def _read_htb_rate_ceil_mbps(iface: str, major: int, minor: int) -> Optional[Tup cls_pat = re.compile(r"^class\s+htb\s+([0-9A-Fa-fx]+):([0-9A-Fa-fx]+)\b.*$", re.MULTILINE) def _to_int(tok: str) -> Optional[int]: + s = tok.strip() + # Accept decimal, 0x-prefixed hex, or bare hex (e.g. "f") try: - s = tok.strip() if s.lower().startswith("0x"): return int(s, 16) - return int(s) + try: + return int(s) # decimal + except Exception: + return int(s, 16) # bare hex except Exception: return None @@ -807,11 +811,15 @@ def _class_has_parent(iface: str, maj: int, mnr: int, pmaj: int, pmnr: int) -> T cls_pat = re.compile(r"^class\s+htb\s+([0-9A-Fa-fx]+):([0-9A-Fa-fx]+)\b.*$", re.MULTILINE) def _to_int(tok: str) -> Optional[int]: + s = tok.strip() + # Accept decimal, 0x-prefixed hex, or bare hex (e.g. "f") try: - s = tok.strip() if s.lower().startswith("0x"): return int(s, 16) - return int(s) + try: + return int(s) # decimal + except Exception: + return int(s, 16) # bare hex except Exception: return None @@ -1308,11 +1316,15 @@ def run_tiered_suite(log: LogReader, timeout_s: float, results: List[str]) -> bo pat = re.compile(r"^qdisc\s+\S+\s+\S+:\s+parent\s+([0-9A-Fa-fx]+):([0-9A-Fa-fx]+)\b.*$", re.MULTILINE) def _to_int(tok: str) -> Optional[int]: + s = tok.strip() + # Accept decimal, 0x-prefixed hex, or bare hex (e.g. "f") try: - s = tok.strip() if s.lower().startswith("0x"): return int(s, 16) - return int(s) + try: + return int(s) # decimal + except Exception: + return int(s, 16) # bare hex except Exception: return None @@ -1346,11 +1358,15 @@ def run_tiered_suite(log: LogReader, timeout_s: float, results: List[str]) -> bo pat2 = re.compile(r"^qdisc\s+\S+\s+\S+:\s+parent\s+([0-9A-Fa-fx]+):([0-9A-Fa-fx]+)\b.*$", re.MULTILINE) def _to_int2(tok: str) -> Optional[int]: + s = tok.strip() + # Accept decimal, 0x-prefixed hex, or bare hex (e.g. "f") try: - s = tok.strip() if s.lower().startswith("0x"): return int(s, 16) - return int(s) + try: + return int(s) # decimal + except Exception: + return int(s, 16) # bare hex except Exception: return None diff --git a/src/rust/lqos_bakery/src/commands.rs b/src/rust/lqos_bakery/src/commands.rs index 24f40692..55c4891d 100644 --- a/src/rust/lqos_bakery/src/commands.rs +++ b/src/rust/lqos_bakery/src/commands.rs @@ -613,18 +613,11 @@ impl BakeryCommands { let mut do_sqm; if execution_mode == ExecutionMode::Builder { - // In builder mode, if we're fully lazy - we don't do anything. - match config.queues.lazy_queues.as_ref() { - None | Some(LazyQueueMode::No) => { - do_htb = true; - do_sqm = true; - } - Some(LazyQueueMode::Full) => return None, - Some(LazyQueueMode::Htb) => { - do_htb = true; - do_sqm = false; // Only HTB, no SQM - } - } + // Initial tree build: always create HTB + SQM classes for circuits, + // regardless of lazy queue mode. Laziness applies to live updates + // (ExecutionMode::LiveUpdate) and pruning, not the first full build. + do_htb = true; + do_sqm = true; } else { // We're in live update mode match config.queues.lazy_queues.as_ref() {