This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 0bb4eea72801752bcd255e313259d3ca8e782b4b
Author: gaohedong <[email protected]>
AuthorDate: Sat Nov 7 18:55:26 2026 +0800

    drivers/virtio/virtio-net: implement netpoll txpoll
    
    Reuse virtio_net_txfree(), which already reclaims the finished TX
    buffers, as the txpoll operation used by netpoll to get TX packets
    back when the quota is used up.
    
    Signed-off-by: gaohedong <[email protected]>
---
 drivers/virtio/virtio-net.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/virtio/virtio-net.c b/drivers/virtio/virtio-net.c
index 010aecd7efd..5298697a34c 100644
--- a/drivers/virtio/virtio-net.c
+++ b/drivers/virtio/virtio-net.c
@@ -205,7 +205,10 @@ static const struct netdev_ops_s g_virtio_net_ops =
 #ifdef CONFIG_NETDEV_IOCTL
   virtio_net_ioctl,
 #endif
-  virtio_net_txfree
+  virtio_net_txfree,  /* reclaim */
+#ifdef CONFIG_NET_NETPOLL
+  virtio_net_txfree,  /* txpoll */
+#endif
 };
 
 #ifdef CONFIG_DRIVERS_WIFI_SIM

Reply via email to