Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXP frdm-rw612 does not work with mdns-responder sample application #84234

Open
jukkar opened this issue Jan 20, 2025 · 0 comments
Open

NXP frdm-rw612 does not work with mdns-responder sample application #84234

jukkar opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: medium Medium impact/importance bug

Comments

@jukkar
Copy link
Member

jukkar commented Jan 20, 2025

Describe the bug

There was report in Discord that mdns-responder did not work with NXP frdm-rw612 board when both Ethernet and wifi interfaces were enabled.
https://discord.com/channels/720317445772017664/1329476316650803253/1329479451104514059

When trying this, I noticed that if I enable NXP wifi CONFIG_WIFI_NXP=y, then the mdns-responder did not work as expected even when using Ethernet connection only. After investigating this, it seems that the either network poll or kernel k_poll does not notice that network internal receive queue contains received UDP packets which then leads to net_pkt resource exhaustion because the internal queue is not read and the received UDP packets stays there forever.

I tried this with nucleo_f767zi/stm32f767xx and did not see issues. Also there is no issue with frdm_rw612/rw612 board if NXP wifi is disabled.

To Reproduce
Building the sample with this

west build -p -b frdm_rw612/rw612 -d ../build/test samples/net/mdns_responder -- \
-DCONFIG_LOG_MODE_IMMEDIATE=y \
-DCONFIG_NET_SOCKETS_SERVICE_STACK_SIZE=2048 \
-DCONFIG_NET_MGMT_EVENT_QUEUE_SIZE=25 \
-DCONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 \
-DCONFIG_MAIN_STACK_SIZE=8192 \
-DCONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 \
-DCONFIG_HEAP_MEM_POOL_SIZE=122880 \
-DCONFIG_NET_TCP_WORKQ_STACK_SIZE=8192 \
-DCONFIG_NET_TX_STACK_SIZE=4096 \
-DCONFIG_NET_RX_STACK_SIZE=4096 \
-DCONFIG_NET_IF_MCAST_IPV4_ADDR_COUNT=5 \
-DCONFIG_NET_PKT_RX_COUNT=30 \
-DCONFIG_NET_PKT_TX_COUNT=30 \
-DCONFIG_NET_BUF_RX_COUNT=90 \
-DCONFIG_NET_BUF_TX_COUNT=90 \
-DCONFIG_NET_IPV4_IGMP=y \
-DCONFIG_NET_BUF_POOL_USAGE=y \
-DCONFIG_NET_LOG=y \
-DCONFIG_NET_IF_LOG_LEVEL_DBG=n \
-DCONFIG_DNS_SOCKET_DISPATCHER_LOG_LEVEL_DBG=y \
-DCONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y \
-DCONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y \
-DCONFIG_NET_CONN_LOG_LEVEL_DBG=y \
-DCONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y \
-DCONFIG_NET_TCP_LOG_LEVEL_DBG=n \
-DCONFIG_NVS_LOG_LEVEL_DBG=n \
-DCONFIG_MDNS_RESPONDER_LOG_LEVEL_DBG=y \
-DCONFIG_DNS_RESOLVER_LOG_LEVEL_DBG=y \
-DCONFIG_MDNS_RESPONDER=y \
-DCONFIG_MDNS_RESPONDER_DNS_SD=y \
-DCONFIG_DNS_SD=y \
-DCONFIG_DNS_RESOLVER=y \
-DCONFIG_ZVFS_POLL_MAX=18 \
-DCONFIG_NET_HOSTNAME_ENABLE=y \
-DCONFIG_NET_HOSTNAME_UNIQUE=n \
-DCONFIG_NET_HOSTNAME="\"zephyrtest\"" \
-DCONFIG_NET_SOCKETS_POLL_MAX=6 \
-DCONFIG_LLMNR_RESPONDER=y \
-DCONFIG_NET_CONFIG_MY_IPV4_ADDR="\"\"" \
-DCONFIG_NET_CONFIG_PEER_IPV4_ADDR="\"\"" \
-DCONFIG_NET_CONFIG_MY_IPV6_ADDR="\"\"" \
-DCONFIG_NET_CONFIG_PEER_IPV6_ADDR="\"\"" \
-DCONFIG_NET_DHCPV4=y \
-DCONFIG_NET_L2_WIFI_SHELL=y \
-DCONFIG_WIFI=y \
-DCONFIG_WIFI_NXP=y

and then flash

west flash -d ../build/test

Expected behavior
The sample should work regardless of whether CONFIG_WIFI_NXP is set or not. In the test I was not even using Wi-Fi connection but Ethernet only.
To test this, one can send a mDNS query like this from Linux host

nmap --script=dns-service-discovery -p 5353 zephyrtest.local

If using wireshark, one should be able to see a reply from zephyr to the mDNS query.

Impact
I am not saying the issue is in the NXP wifi driver, but clearly it is causing some effect in the system. As I am not familiar with the NXP wifi driver, I am assigning this to NXP for a time being.

Environment (please complete the following information):

I am in zephyr upstream commit 8b987d9

@jukkar jukkar added bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: medium Medium impact/importance bug labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants