diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 3ef8d90d5fa9..95a30c52a563 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1819,9 +1819,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) adjsz = sizeof(struct vtnet_rx_header); /* * Account for our pad inserted between the header - * and the actual start of the frame. + * and the actual start of the frame. This includes + * the unused num_buffers when using a legacy device. */ - len += VTNET_RX_HEADER_PAD; + len += adjsz - sc->vtnet_hdr_size; } else { mhdr = mtod(m, struct virtio_net_hdr_mrg_rxbuf *); nbufs = mhdr->num_buffers;