Page MenuHomeFreeBSD

iflib: implement driver-provided queue selection for simple tx
ClosedPublic

Authored by gallatin on Tue, Sep 15, 9:02 PM.
Tags
None
Referenced Files
F173650459: D59712.id186886.diff
Sun, Sep 27, 11:28 AM
F173644503: D59712.id.diff
Sun, Sep 27, 10:25 AM
F173640242: D59712.id186813.diff
Sun, Sep 27, 9:33 AM
Unknown Object (File)
Sat, Sep 26, 8:08 PM
Unknown Object (File)
Sat, Sep 26, 1:08 PM
Unknown Object (File)
Fri, Sep 25, 8:14 AM
Unknown Object (File)
Fri, Sep 25, 6:26 AM
Unknown Object (File)
Fri, Sep 25, 4:57 AM

Details

Summary

This change adds support for isc_txq_select* with simple_tx. Until this change, if a driver provided isc_txq_select*, simple_tx ignored it and picked a tx ring by itself.

Implement driver-provided queue selection in such a way as to inline the bulk of the simple transmit routine, and pre-select wrappers up front that either do normal or pluggable selection via setting the if transmit routine. This allows us to not pay the price of choosing which queue selection to use on every packet sent.

Potential objections are that we run queue selection before detecting if the nic is down. And that we do ALTQ selection in the common code, after queue selection has run. The response is that we are optimizing for performance in the common case (nic is up) and any performance lost to unneeded queue selection for ALTQ is a drop in the bucket of the time lost by using the mutex-locked ifq, which is easily made up for by the improved readability of doing it this way.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I must've not been paying attention back when these were added so I don't know the intent behind selecting between them or if we should still have two but that has no bearing on simpletx or the improvement here.

This revision is now accepted and ready to land.Tue, Sep 15, 9:43 PM