diff options
| author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2020-06-01 16:14:29 +0000 |
|---|---|---|
| committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2020-06-01 16:14:29 +0000 |
| commit | 9ec71596c05ade1d91fea9e2f6835880c045ad98 (patch) | |
| tree | 94b8a2974bad90b154e2162ed0569d27b8df0b16 /sys/dev/netmap | |
| parent | 36f2d67026d5b90728632e31b520a395737adaaa (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap')
| -rw-r--r-- | sys/dev/netmap/if_vtnet_netmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/netmap/if_vtnet_netmap.h b/sys/dev/netmap/if_vtnet_netmap.h index 7086ef2fce4c..4e01c663ef6b 100644 --- a/sys/dev/netmap/if_vtnet_netmap.h +++ b/sys/dev/netmap/if_vtnet_netmap.h @@ -275,8 +275,8 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq) /* Expose all the RX netmap buffers we can. In case of no indirect * buffers, the number of netmap slots in the RX ring matches the * maximum number of 2-elements sglist that the RX virtqueue can - * accommodate. */ - error = vtnet_netmap_kring_refill(kring, na->num_rx_desc); + * accommodate (minus 1 to avoid netmap ring wraparound). */ + error = vtnet_netmap_kring_refill(kring, na->num_rx_desc - 1); virtqueue_notify(rxq->vtnrx_vq); return error < 0 ? ENXIO : 0; |
