HomeFreeBSD

Work around lack of TX IRQs in iflib for netmap

Description

Work around lack of TX IRQs in iflib for netmap

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.

Reported by: Johannes Lundberg <johalun0@gmail.com>
Reviewed by: sbruno
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15455

Details

Provenance
shurdAuthored on
Reviewer
sbruno
Differential Revision
D15455: Work around lack of TX queues in iflib for netmap
Parents
rS333685: Set label when setting up USB LUNs, it looks nicer this way.
Branches
Unknown
Tags
Unknown