Page MenuHomeFreeBSD

iflib: add support for admin completion queues
ClosedPublic

Authored by ar_semihalf.com on Feb 16 2021, 5:26 PM.

Details

Summary

For interfaces with admin completion queues, introduce a new devmethod
IFDI_ADMIN_COMPLETION_HANDLE and a corresponding flag IFLIB_HAS_ADMINCQ.

This provides an option for handling any admin cq logic, which cannot be
run from an interrupt context.

Said method is called from within iflib's admin task, making it safe to
sleep.

Submitted by: Artur Rojek <ar@semihalf.com>
Obtained from: Semihalf
Sponsored by: Amazon, Inc.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ar_semihalf.com retitled this revision from iflib: add a new devmethod: IFDI_ADMIN_REQUEST_HANDLE to iflib: add support for admin completion queues.
ar_semihalf.com edited the summary of this revision. (Show Details)

Reconsider turning the devmethod into an admin completion queue specific handler, which both reduces the scope of the call and makes the usecase more obvious.

To clarify on the usecase in the Amazon ENA driver, we need to handle any admin completion queues, not just asynchronous event ones, in a sleep safe context.

It’s in a non performance critical path with no side effects if not used, so worst case it’s not useful to other consumers.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 2 2021, 11:41 PM
This revision was automatically updated to reflect the committed changes.