# HG changeset patch # User Mychaela Falconia # Date 1734725221 0 # Node ID d73b6ec27ae6c76ef63c50911d9f5e93d400c93f # Parent 1485211d4492318a5f9b61fc1591ef6374b3a937 twjit: allow starting fill level to be 1 In most use cases, the smallest useful setting for starting fill level is 2. However, our job is to provide mechanism rather than policy, and the theoretical minimum is 1 - so let's support the latter configuration. diff -r 1485211d4492 -r d73b6ec27ae6 src/twjit_in.c --- a/src/twjit_in.c Fri Dec 20 09:01:24 2024 +0000 +++ b/src/twjit_in.c Fri Dec 20 20:07:01 2024 +0000 @@ -113,6 +113,13 @@ sb->depth = 1; memcpy(&sb->conf, twjit->ext_config, sizeof(struct twrtp_jibuf_config)); sb->drop_int_count = 0; + /* The setting of delta_ms is needed in order to pacify the check + * in twjit_out.c:starting_sb_is_ready() in configurations with + * bd_start=1. An alternative would be to enforce start_min_delta + * being not set with bd_start=1, but the present solution is + * simpler than doing cross-enforcement between two different + * parameter settings in vty. */ + sb->delta_ms = UINT32_MAX; } enum input_decision { diff -r 1485211d4492 -r d73b6ec27ae6 src/twjit_vty.c --- a/src/twjit_vty.c Fri Dec 20 09:01:24 2024 +0000 +++ b/src/twjit_vty.c Fri Dec 20 20:07:01 2024 +0000 @@ -38,7 +38,7 @@ } DEFUN(cfg_buffer_depth, cfg_buffer_depth_cmd, - "buffer-depth <2-65535> <2-65535>", + "buffer-depth <1-65535> <2-65535>", "Buffer depth configuration\n" "Minimum fill required to start flow\n" "High water mark fill level\n")