This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 59f8ccc7ad2a54a19f2b2d4a280c53dcea542f01 Author: wenquan1 <[email protected]> AuthorDate: Tue May 19 10:52:15 2026 +0800 drivers/virtio-net: reclaim TX buffers in the TX done callback When the TX quota is exhausted, netdev_upper_can_tx() returns false and nothing returns the completed TX buffers, so senders such as the IGMP and MLD wait for a message forever. Call virtio_net_txfree() in virtio_net_txdone() before netdev_lower_txdone(), so completed buffers are back in the quota before the upper half retries. Signed-off-by: wenquan1 <[email protected]> --- drivers/virtio/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/virtio/virtio-net.c b/drivers/virtio/virtio-net.c index 257f64db70a..d40a0932dfd 100644 --- a/drivers/virtio/virtio-net.c +++ b/drivers/virtio/virtio-net.c @@ -555,6 +555,7 @@ static void virtio_net_txdone(FAR struct virtqueue *vq) FAR struct virtio_net_priv_s *priv = vq->vq_dev->priv; virtqueue_disable_cb_lock(vq, &priv->lock[VIRTIO_NET_TX]); + virtio_net_txfree((FAR struct netdev_lowerhalf_s *)priv); netdev_lower_txdone((FAR struct netdev_lowerhalf_s *)priv); }
