summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorSatish Kharat <satishkh@cisco.com>2026-08-12 05:48:04 -0700
committerJakub Kicinski <kuba@kernel.org>2026-08-17 17:48:44 -0700
commitcb1dba54c7235c32218cd4b56adee806237c2d6c (patch)
treeb56e61b24d2d7d77dc440f70db12e334641d2fc0 /tools/perf/scripts/python/stackcollapse.py
parenta0da4ea750a289ac27ba67d198315028b4da5cb4 (diff)
enic: add admin CQ service with MSI-X interrupt and workqueue polling
Add completion queue (CQ) service for the admin channel work queue (WQ) and receive queue (RQ), driven by a dedicated MSI-X interrupt and a workqueue-based CQ poller. The admin WQ CQ service advances the completion ring and returns the number of descriptors consumed. The admin RQ CQ service does the same for receive completions and copies each received message out of its pre-posted DMA buffer into a dynamically allocated queue entry. The pending queue is bounded to ENIC_ADMIN_MSG_MAX (256) entries so a buggy or hostile VF cannot drive the host out of memory; messages are enqueued for deferred dispatch by a separate work_struct so the CQ poller stays short. When the MSI-X interrupt fires, the ISR schedules the CQ poll work. The work handler drains all pending completions, kicks message dispatch if work was done, and returns credits to unmask the interrupt. The admin vector is kept masked from the time the IRQ is requested until the rings are initialised and filled during channel open, so an early or spurious interrupt cannot run the poll handler against uninitialised rings. The poll handler snapshots the pending credit count before draining the CQ so it acknowledges exactly what the hardware reported for this interrupt; any credits that accrue during draining are serviced by the next interrupt. The credit write also sets the mask bit to re-arm the vector, and that unmask is applied independently of the credit count, so the vector is re-armed even when zero credits are returned -- which matters here because the admin channel is not re-polled like the NAPI data path. If an admin RQ buffer refill fails under transient memory pressure, reschedule the CQ poll work itself after a short delay to retry the refill and re-arm the RQ, so the admin channel cannot stall when the ring would otherwise be left empty with no completion to drive the next refill. The poll work is a delayed_work for this reason; routing the retry through it keeps the admin RQ ring owned by a single context so refills never run concurrently. Signed-off-by: Satish Kharat <satishkh@cisco.com> Link: https://patch.msgid.link/20260812-enic-sriov-v2-admin-channel-v2-v13-4-b3809e448aba@cisco.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions