Skip to content

"No new RX buf available" error in sample Echo and HttpServer applications when running on FRDM_N947 boards #92652

Open
@ekwus

Description

@ekwus

Describe the bug

We've been struggling to get the NXP FRDM_N947 boards to run an http server with any reliability.

We've switched to the recent 4.2.00-rc1 tag as nothing works without the pull requests #91312 and #90181

Regardless we end up with RX buffer issues when payloads are greater than 131 bytes.

Regression

  • This is a regression.

Steps to reproduce

To recreate the issue we simply build the unmodified Echo or HttpServer sample apps and run them on a board (only statis IP address config has changed to our network).

For the HttpServer, simply loading the sample app page starts with the uptime and network statistics being updated every seconds until it eventually freezes anywhere from 20 seconds to 4 mins. Once it stops, the console logging is printing out that it failed to allocate an Rx buffer.

For Echo, again using the latest codebase with only the IP address changed. We connect to the listening 4242 port with a C# client that is configurable to send different payload sizes in a repeated loop with controllable delay between the sends.

It generally fails with "No new RX buf available" after a few hundred sends on a single connection when the payload is greater than 131 bytes. Anything above 131 bytes fails reasonably quickly and anything below tends to work until I stop testing.

I've tried setting the TCP Window values to 500, 1000, 1500 and played with the network buffer size but those settings don't help any.

Example config changes

CONFIG_NET_BUF_DATA_SIZE=2048
CONFIG_NET_TCP_MAX_SEND_WINDOW_SIZE=1500
CONFIG_NET_TCP_MAX_RECV_WINDOW_SIZE=1500

Relevant log output

IPV6_V6ONLY option is on, turning it off.
Sharing same socket between IPv6 and IPv4
Single-threaded TCP echo server waits for a connection on port 4242...
[00:00:00.602,000] <err> phy_mii: Failed to reset PHY (0): -116
*** Booting Zephyr OS build 4bd1d39c67df ***
[00:00:00.603,000] <inf> net_config: Initializing network
[00:00:00.603,000] <inf> net_config: IPv4 address: 10.80.80.80
[00:00:00.703,000] <inf> net_config: IPv6 address: 2001:db8::1
[00:00:00.703,000] <inf> net_config: IPv6 address: 2001:db8::1
[00:00:00.703,000] <dbg> net_sock: zsock_socket_internal: (0x30001a50): socket: ctx=0x300020d0, fd=3
[00:00:44.359,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:00:44.359,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:00:44.359,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
...
...
[00:01:28.493,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x3000860c, st=0, user_data=0
[00:01:28.538,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.539,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x3000860c, st=0, user_data=0
[00:01:28.540,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.541,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x3000860c, st=0, user_data=0
[00:01:28.541,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.542,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x3000860c, st=0, user_data=0
[00:01:28.543,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.544,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x3000860c, st=0, user_data=0
[00:01:28.547,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.547,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x30008694, st=0, user_data=0
[00:01:28.548,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:28.549,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x30008694, st=0, user_data=0
[00:01:28.550,000] <dbg> net_sock: zsock_received_cb: (0x30001748): ctx=0x30002178, pkt=0x300085c8, st=0, user_data=0
[00:01:31.784,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:31.784,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.784,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.784,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.884,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:31.884,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.884,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.884,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.985,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:31.985,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.985,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:31.985,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.085,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:32.085,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.085,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.085,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.186,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:32.186,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.186,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.186,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.287,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:32.288,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.288,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:32.288,000] <err> eth_nxp_enet_qos_mac: Rx descriptor does not have first descriptor flag, drop
[00:01:33.551,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
[00:01:33.767,000] <err> eth_nxp_enet_qos_mac: No new RX buf available
---- Closed the serial port COM10 ----

Impact

Showstopper – Prevents release or major functionality; system unusable.

Environment

  • OS: Windows 11
  • Workspace: [4.2.00+0-rc1]
  • Zephyr SDK: 0.17.0
  • Commit/Tag: 4.2.00-rc1

Additional Context

We are not modifying anything in the code or the hardware. clean code from 4.2.00-rc1 and default FRDM_N947 board from NXP.

Note: phy_mii: Failed to reset PHY (0): -116 doesn't look to be related but maybe the FRDM_N947 board DTS is missing setting the correct PHY driver, however packets are sending and receiving so looks like the chip (LAN8741) defaults work from reset.

Metadata

Metadata

Labels

area: HTTPHTTP client/server supportbugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXPpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions