Page MenuHomeFreeBSD

Work around lack of TX queues in iflib for netmap
ClosedPublic

Authored by shurd on May 16 2018, 4:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 23, 12:11 AM
Unknown Object (File)
Fri, Jul 17, 3:27 PM
Unknown Object (File)
Tue, Jul 14, 10:06 PM
Unknown Object (File)
Jun 24 2026, 6:05 AM
Unknown Object (File)
Jun 22 2026, 12:09 PM
Unknown Object (File)
Jun 20 2026, 9:28 PM
Unknown Object (File)
Jun 17 2026, 3:23 PM
Unknown Object (File)
Jun 16 2026, 4:10 PM
Subscribers

Details

Summary

When poll() is called via netmap, txsync is initially called,
and if there are no available buffers to reclaim, it waits for the driver
to notify of new buffers. Since the TX IRQ is generally not used in iflib
drivers, this ends up causing a timeout.

Work around this by having the reclaim DELAY(1) if it's initially unable
to reclaim anything, then schedule the tx task, which will spin by continuously
rescheduling itself until some buffers are reclaimed. In general, the delay is
enough to allow some buffers to be reclaimed, so spinning is minimized.

Test Plan

Test on high-speed links to ensure that the DELAY() doesn't
introduce extra latency.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16628
Build 16533: arc lint + arc unit