HomeFreeBSD

MFC r361982

Description

MFC r361982

iflib: netmap: honor netmap_irx_irq return values

In the receive interrupt routine, always call netmap_rx_irq().
The latter function will return != NM_IRQ_PASS if netmap is not
active on that specific receive queue, so that the driver can go
on with iflib_rxeof(). Note that netmap supports partial opening,
where only a subset of the RX or TX rings can be open in netmap mode.
Checking the IFCAP_NETMAP flag is not enough to make sure that the
queue is indeed in netmap mode.
Moreover, in case netmap_rx_irq() returns NM_IRQ_RESCHED, it means
that netmap expects the driver to call netmap_rx_irq() again as soon
as possible. Currently, this may happen when the device is attached
to a VALE switch.

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D25167

Details

Provenance
vmaffioneAuthored on
Reviewer
gallatin
Differential Revision
D25167: iflib: netmap: honor netmap_irx_irq return values
Parents
rS362555: MFC r362185
Branches
Unknown
Tags
Unknown