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)
Dec 28 2023, 6:52 PM
Unknown Object (File)
Dec 20 2023, 12:56 AM
Unknown Object (File)
Dec 13 2023, 9:14 AM
Unknown Object (File)
Dec 13 2023, 2:45 AM
Unknown Object (File)
Dec 6 2023, 4:47 AM
Unknown Object (File)
Nov 25 2023, 1:01 AM
Unknown Object (File)
Nov 23 2023, 10:44 PM
Unknown Object (File)
Aug 10 2023, 2:50 AM
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 Not Applicable
Unit
Tests Not Applicable