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>
44 lines
992 B
Plaintext
44 lines
992 B
Plaintext
# Generic networking options
|
|
CONFIG_NETWORKING=y
|
|
CONFIG_NET_UDP=y
|
|
CONFIG_NET_TCP=y
|
|
CONFIG_NET_IPV6=y
|
|
CONFIG_NET_IPV4=y
|
|
CONFIG_NET_SOCKETS=y
|
|
CONFIG_POSIX_API=y
|
|
CONFIG_ZVFS_OPEN_MAX=6
|
|
CONFIG_NET_SOCKETS_NET_MGMT=y
|
|
CONFIG_NET_MGMT_EVENT=y
|
|
|
|
# Kernel options
|
|
CONFIG_ENTROPY_GENERATOR=y
|
|
CONFIG_TEST_RANDOM_GENERATOR=y
|
|
CONFIG_INIT_STACKS=y
|
|
CONFIG_MAIN_THREAD_PRIORITY=-1
|
|
|
|
# Logging
|
|
CONFIG_NET_LOG=y
|
|
CONFIG_LOG=y
|
|
|
|
# IP address options
|
|
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
|
|
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=2
|
|
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=4
|
|
CONFIG_NET_MAX_CONTEXTS=10
|
|
|
|
# Network shell
|
|
CONFIG_NET_SHELL=y
|
|
|
|
# Network application options and configuration
|
|
CONFIG_NET_CONFIG_SETTINGS=y
|
|
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
|
|
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
|
|
CONFIG_NET_CONFIG_AUTO_INIT=n
|
|
|
|
#CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=y
|
|
#CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
|
|
|
|
# Set the userspace support by default as that was the purpose
|
|
# of the sample application.
|
|
CONFIG_USERSPACE=y
|