HomeFreeBSD

netmap: vtnet: fix RX virtqueue initialization bug

Description

netmap: vtnet: fix RX virtqueue initialization bug

The vtnet_netmap_rxq_populate() function erroneously assumed
that kring->nr_hwcur = 0, i.e. the kring was in the initial
state. However, this is not always the case: for example,
when a vtnet reinit is triggered by some changes in the
interface flags or capenable.
This patch changes the behaviour of vtnet_netmap_kring_refill()
so that it always starts publishing the netmap buffers starting
from the current value of kring->nr_hwcur.

MFC after: 1 week

Details

Provenance
vmaffioneAuthored on Jun 1 2020, 4:10 PM
Parents
rGb4ee4ce1584d: Remove ->f_label from struct file
Branches
Unknown
Tags
Unknown

Event Timeline