Page MenuHomeFreeBSD

iflib: netmap: honor netmap_irx_irq return values
ClosedPublic

Authored by vmaffione on Jun 6 2020, 11:32 AM.
Tags
None
Referenced Files
F174491209: D25167.id.diff
Sat, Oct 3, 4:20 PM
F174455222: D25167.diff
Sat, Oct 3, 9:08 AM
F174432760: D25167.id72773.diff
Sat, Oct 3, 4:26 AM
Unknown Object (File)
Fri, Oct 2, 11:06 AM
Unknown Object (File)
Wed, Sep 30, 6:08 PM
Unknown Object (File)
Wed, Sep 30, 5:07 PM
Unknown Object (File)
Mon, Sep 21, 5:02 PM
Unknown Object (File)
Mon, Sep 21, 11:39 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable