HomeFreeBSD

ena: hide sysctl nodes for unused ENA queues

Description

ena: hide sysctl nodes for unused ENA queues

IO queue related attributes are registered statically at driver attach
with the rest of the ENA specific sysctl nodes. However, the number of
queues can be changed at runtime via the ena_sysctl_io_queues_nb
request, leading to a potential exposure of attributes for non-existing
queues.

Introduce a new ena_sysctl_update_queue_node_nb function, which
updates the sysctl nodes after the number of queues is altered.
This happens by either registering or unregistering node specific oids,
based on a delta between the previous and current queue count.

NOTE: All unregistered oids must be registered again before the driver detach, e.g. by another call to this function.

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

Details

Provenance
mwAuthored on Jun 14 2021, 8:57 AM
Parents
rGddec69e6a796: ena: remove surplus NULL checks when freeing ENA resources
Branches
Unknown
Tags
Unknown