HedongGao commented on code in PR #21502: URL: https://github.com/apache/nuttx/pull/21502#discussion_r4505140856
########## include/nuttx/net/netdev_lowerhalf.h: ########## @@ -180,6 +180,12 @@ struct netdev_ops_s /* reclaim - try to reclaim packets sent by netdev. */ CODE void (*reclaim)(FAR struct netdev_lowerhalf_s *dev); + +#ifdef CONFIG_NET_NETPOLL + /* txpoll - Wait for transmission done. */ + + CODE void (*txpoll)(FAR struct netdev_lowerhalf_s *dev); Review Comment: Agreed, thanks. Done in f954f0b: `txpoll` is removed, `netpoll_udp_init()` now requires `reclaim` and `netpoll_pkt_alloc()` calls `reclaim` when the TX quota is used up. `struct netdev_ops_s` is unchanged, and the separate virtio-net commit is dropped since virtio-net already sets `reclaim` to `virtio_net_txfree()`. The netpoll doc now states that the driver must implement `reclaim`. Re-tested on the same setups as before: `qemu-armv8a:notenet` (ifup/ping, ifdown then console still answers, 10 ifdown/ifup cycles), `CONFIG_IOB_BUFSIZE=196` (92 multi-IOB note frames, 0 IPv4/UDP length mismatches), and `qemu-armv8a:netnsh_smp` with 4 CPUs and `CONFIG_DEBUG_ASSERTIONS=y` (0% loss, no assertion). Each commit builds on its own. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
