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
Unknown Object (File)
Nov 29 2024, 2:19 PM
Unknown Object (File)
Nov 22 2024, 6:15 AM
Unknown Object (File)
Nov 21 2024, 5:03 PM
Unknown Object (File)
Nov 21 2024, 10:20 AM
Unknown Object (File)
Nov 20 2024, 3:13 AM
Unknown Object (File)
Nov 20 2024, 12:41 AM
Unknown Object (File)
Nov 19 2024, 3:51 PM
Unknown Object (File)
Nov 19 2024, 12:50 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 31536