Re: [PATCH net] net: qrtr: ns: retry service announcements on -EAGAIN
From: Joonhoe Kim
Date: Thu Oct 22 2026 - 12:32:55 EST
On Tue, 20 Oct 2026 12:58:14 +0000, Sashiko AI review wrote:
> - [High] The fix only covers one of the two paths that send NEW_SERVER.
Agreed. A service registered after the remote's HELLO has been handled
but before our HELLO goes out is broadcast from ctrl_cmd_new_server(),
and qrtr_bcast_enqueue() drops it without telling the caller. If the
local node had no services when the HELLO was handled, v1 has nothing
to retry.
> Could this be handled in the core instead of by polling in one caller?
> For example, packets could be queued in qrtr_node_enqueue(), or the
> announcements replayed once hello_sent becomes true.
v2 does the second, as you suggested: the core records that the remote
has sent a HELLO, and when our HELLO has been sent to such a node, it
passes a HELLO from that node to the local name service again. The name
service then announces every service it has at that point, which also
covers the dropped NEW_SERVER broadcasts.
> The same window opens again after qrtr_endpoint_hello() clears hello_sent
> on resume, because the nid stays assigned.
The flag is not cleared on resume, so the replay also happens after the
HELLO that qrtr_endpoint_hello() schedules.
> DEL_SERVER broadcasts from
> server_del() are dropped the same way.
v2 does not replay these. A service that is removed before our HELLO
goes out has not been announced to the remote either, and on resume the
remote has been reset, so it has no entry to remove.
> - [Medium] The new retry loop in announce_servers() (ns.c:232-236) can
> stall the whole name service for about 10 s per remote HELLO.
Agreed, this is the same problem Mani pointed out. Nothing sleeps in
the name service worker in v2.
> A HELLO that fails with -ETIMEDOUT or -ENOMEM leaves hello_sent false
> for good.
That is a separate issue in the core, and v2 does not change it. With
hello_sent false nothing but HELLO reaches the node, so the replay
would not help there.
> - [Medium] The NS side gives up after a fixed 10 s, but the core keeps
> retrying our HELLO with no limit.
Agreed. Any limit in the name service can expire before the core gets
our HELLO out. v2 has no limit: the replay follows whenever our HELLO
is sent.
> - [Medium] A retry can re-advertise a service that was closed during the
> retry window, and the remote then keeps the stale entry.
v2 has no retry window, but the replay is one more HELLO for the name
service to handle, and the ordering race you describe applies to it
too: a port closed after the replay is queued but before the name
service handles it is still announced. v2 does not fix that race.
v2: https://lore.kernel.org/all/20261022163116.1042-1-26rote@xxxxxxxxx/
pw-bot: cr
Thanks,
Joonhoe Kim