Hi all, based on the discussions in [1], this is my initial proposal for the "timing API" class of functions for the jsonrpc, cs and idl layers that allow OVSDB clients to batch process messages and db updates based on a given deadline instead of a fixed iteration count.
I took the freedom to slightly refactor some bits and extract a few functions to make it easier to reuse some of the existing logic. If you have any further ideas on how to improve it, I'm of course keen to hear about it! On a side note, I tried using the new ovsdb_idl_loop_run_until() function for OVS and SB updates in the ovn-controller loop and, depending on the chosen deadline, I am seeing some test failures which I found very hard to debug (for example, errors disappear as soon as I enable dbg logging or if I send additional unixctl commands to the controller). I'll send an RFC patch for OVN where we can discuss this. Thanks a lot, Martin [1] https://mail.openvswitch.org/pipermail/ovs-dev/2025-March/422523.html Martin Morgenstern (5): jsonrpc: Refactor inner loop of jsonrpc_recv(). jsonrpc: Add _until variants of recv functions. jsonrpc: Propagate return code from layer below. ovsdb-cs: Add ovsdb_cs_run_until() function. ovsdb-idl: Add _until variants of run functions. lib/jsonrpc.c | 221 ++++++++++++++++++++++++++++++++++++------------ lib/jsonrpc.h | 3 + lib/ovsdb-cs.c | 82 +++++++++++++++--- lib/ovsdb-cs.h | 1 + lib/ovsdb-idl.c | 24 +++++- lib/ovsdb-idl.h | 3 + 6 files changed, 266 insertions(+), 68 deletions(-) -- 2.45.2 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev