HomeFreeBSD

netmap: fix bug in netmap_poll() optimization

Description

netmap: fix bug in netmap_poll() optimization

The bug was introduced by r339639, although it is present in the upstream
netmap code since 2015. It is due to resetting the want_rx variable to
POLLIN, rather than resetting it to POLLIN|POLLRDNORM.
It only affects select(), which uses POLLRDNORM. poll() is not affected,
because it uses POLLIN.
Also, it only affects FreeBSD, because Linux skips the optimization
implemented by the piece of code where the bug occurs.

MFC after: 3 days
Sponsored by: Sunny Valley Networks

Details

Provenance
vmaffioneAuthored on
Parents
rS342367: ifconfig.4, lagg.4: fix documentation bug: -use_flowid needs to be used
Branches
Unknown
Tags
Unknown