samples: net: sockets: net_mgmt: Increase main thread priority

net_mgmt sockets do not implement internal queue but use
net_mgmt_event_wait() internally to receive events. As a consequence,
in case of events burst, some events may be lost if the receiving
thread has lower priority than the net_mgmt thread.

This was visible in the sample, where only DAD event was reported
properly, as IPv6 Add/Remove events were triggered in pair with
corresponding multicast events (from solicited-node multicast
address).

We can mitigate this by increasing main thread priority to be at the
same priority as net_mgmt thread, so that the receiving thread (main)
has a chance to run in between event reports.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2024-06-21 13:16:51 +02:00 committed by Anas Nashif
parent fe2e560577
commit 913b06251d

View file

@ -14,6 +14,7 @@ CONFIG_NET_MGMT_EVENT=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_MAIN_THREAD_PRIORITY=-1
# Logging
CONFIG_NET_LOG=y