HomeFreeBSD

MFC r348834

Description

MFC r348834

bhyve: vtnet: simplify thread synchronization

On vtnet device reset it is necessary to wait for threads to stop TX and
RX processing. However, the rx_in_progress variable (used for to wait for
RX processing to stop) is actually useless, and can be removed. Acquiring
and releasing the RX lock is enough to synchronize correctly. Moreover,
it is possible to reset the device while holding both TX and RX locks, so
that the "resetting" variable becomes unnecessary for the RX thread, and
can be protected by the TX lock (instead of being volatile).

Reviewed by: jhb, markj
Differential Revision: https://reviews.freebsd.org/D20543

Details

Provenance
vmaffioneAuthored on
Reviewer
jhb
Differential Revision
D20543: bhyve: vtnet: simplify thread synchronization
Parents
rS349691: MFC r349285
Branches
Unknown
Tags
Unknown