]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netmap: vtnet: add vtnrx_nm_refill index to receive queues
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Wed, 3 Jun 2020 17:42:17 +0000 (17:42 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Wed, 3 Jun 2020 17:42:17 +0000 (17:42 +0000)
commit2d769e25b1d525edcf747c2058ce2b7c9e6c6699
treec3940b93b51224ca48f5d04fc250554ba63816f5
parent78a3645fd239a1be33fc181bd28d5b52df54e4f0
netmap: vtnet: add vtnrx_nm_refill index to receive queues

The new index tracks the next netmap slot that is going
to be enqueued into the virtqueue. The index is necessary
to prevent the receive VQ and the netmap rx ring from going
out of sync, considering that we never enqueue N slots, but
at most N-1. This change fixes a bug that causes the VQ
and the netmap ring to go out of sync after N-1 packets
have been received.

MFC after: 1 week
sys/dev/netmap/if_vtnet_netmap.h
sys/dev/virtio/network/if_vtnetvar.h