casaroli commented on code in PR #21502: URL: https://github.com/apache/nuttx/pull/21502#discussion_r4501776382
########## 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: `txpoll` does the same job as the existing `reclaim` op on line 182: virtio-net sets both to `virtio_net_txfree()`, and the PR body says txpoll is added "to reclaim finished TX packets". Fix: drop `txpoll` and call `reclaim` in `netpoll_pkt_alloc()` and `netpoll_udp_init()`. -- 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]
