HomeFreeBSD

netmap: fix refcount bug in netmap allocator

Description

netmap: fix refcount bug in netmap allocator

Symptom: when a single extmem memory region is provided to netmap
multiple times, for multiple interfaces, the memory region is
never released by netmap once all the existing file descriptors
are closed.

Fix the relevant condition in netmap_mem_drop(): release the memory
when the last user of netmap_adapter is gone, rather then when
the last user of netmap_mem_d is gone.

MFC after: 2 weeks

Details

Provenance
vmaffioneAuthored on Mar 6 2022, 4:39 PM
Parents
rGbafaa70b6f90: libc __sfvwrite(): roll back FILE buffer pointer on fflush error
Branches
Unknown
Tags
Unknown