zhhyu7 commented on PR #22322: URL: https://github.com/apache/nuttx/pull/22322#issuecomment-7180799654
> `priv->rxnum = 0` in `virtio_net_ifdown()` leaks RX buffers. The drain loop frees only the buffers the device has used; the unused ones stay queued in the RX ring. The next `ifup` then adds another `bufnum` on top of them. On rv-virt (256 IOBs, `bufnum` 64), free IOBs after each ifdown/ifup cycle were 192 → 160 → 128 → 66 → 34 → 2 → 0, and the network stopped. Decrementing `rxnum` for each buffer freed in the drain loop, instead of resetting it, keeps the count right. fixed. -- 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]
