On Thu, Nov 20, 2025 at 9:03 AM Xavier Simonart via dev <
[email protected]> wrote:

> timer_wait_until() expect a timestamp.
>
> Signed-off-by: Xavier Simonart <[email protected]>
> Fixes: d71c45199341 ("pinctrl: Use ovs_mutex_trylock() in the pinctrl
> thread.")
> Signed-off-by: Xavier Simonart <[email protected]>
>

nit: Double Signed-off-by.


> ---
>

Hi Xaiver,

thank you for the fix.

 controller/pinctrl.c | 2 +-
>  tests/system-ovn.at  | 6 ++++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/controller/pinctrl.c b/controller/pinctrl.c
> index 2fb2dcded..1b03f7057 100644
> --- a/controller/pinctrl.c
> +++ b/controller/pinctrl.c
> @@ -3969,7 +3969,7 @@ pinctrl_handler(void *arg_)
>          if (lock_failed) {
>              /* Wait for 5 msecs before waking to avoid degrading the
>               * lock to a spinlock. */
> -            poll_timer_wait_until(5);
> +            poll_timer_wait_until(time_msec() + 5);
>

nit: We can use poll_timer_wait(msec) instead.

         } else {
>              rconn_run_wait(swconn);
>              rconn_recv_wait(swconn);
> diff --git a/tests/system-ovn.at b/tests/system-ovn.at
> index bf56bba36..d23e4a6aa 100644
> --- a/tests/system-ovn.at
> +++ b/tests/system-ovn.at
> @@ -4440,6 +4440,7 @@ ovs-vsctl \
>
>  # Start ovn-controller
>  start_daemon ovn-controller
> +ovn-appctl vlog/set poll_loop:dbg
>
>  check ovn-nbctl ls-add sw0
>
> @@ -4623,6 +4624,11 @@ OVS_WAIT_UNTIL([
>      test "${n_reset}" = "1"
>  ])
>
> +# Check that we do not get too many immediate wake up.
> +# Tolerate a few for any race conditions.
> +AT_CHECK([test 5 -gt `cat ovn-controller.log | \
> +grep -c "wakeup due to 0-ms timeout at controller/pinctrl.c:"`])
> +
>

This check seems to be flaky:
system-ovn.at:4425: wait succeeded quickly
./system-ovn.at:4425: test 5 -gt `cat ovn-controller.log | \
grep -c "wakeup due to 0-ms timeout at controller/pinctrl.c:"`
./system-ovn.at:4425: exit code was 1, expected 0


>  OVN_CLEANUP_CONTROLLER([hv1])
>
>  OVN_CLEANUP_NORTHD
> --
> 2.47.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Regards,
Ales
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to