]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
enic: add type-aware alloc for WQ, RQ, CQ and INTR resources
authorSatish Kharat <satishkh@cisco.com>
Wed, 1 Apr 2026 15:31:15 +0000 (08:31 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Apr 2026 01:05:06 +0000 (18:05 -0700)
commit730ce15d44971204866575549683c956b3fcfe39
treebf036f4ae0f7bd7e2e3cdce3471b53e24b388a6a
parent0266ecb59d5242a5d66261a671e42d53a1372f69
enic: add type-aware alloc for WQ, RQ, CQ and INTR resources

The existing vnic_wq_alloc(), vnic_rq_alloc(), vnic_cq_alloc() and
vnic_intr_alloc() hardcode data-path resource types (RES_TYPE_WQ,
RES_TYPE_RQ, RES_TYPE_CQ, RES_TYPE_INTR_CTRL). The upcoming admin
channel uses different BAR resource types (RES_TYPE_ADMIN_WQ/RQ/CQ,
RES_TYPE_SRIOV_INTR) for its queues.

Add _with_type() variants that accept an explicit resource type
parameter. Refactor the original functions as thin wrappers that
pass the default data-path type. No functional change.

Signed-off-by: Satish Kharat <satishkh@cisco.com>
Link: https://patch.msgid.link/20260401-enic-sriov-v2-prep-v4-5-d5834b2ef1b9@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cisco/enic/vnic_cq.c
drivers/net/ethernet/cisco/enic/vnic_cq.h
drivers/net/ethernet/cisco/enic/vnic_intr.c
drivers/net/ethernet/cisco/enic/vnic_intr.h
drivers/net/ethernet/cisco/enic/vnic_rq.c
drivers/net/ethernet/cisco/enic/vnic_rq.h
drivers/net/ethernet/cisco/enic/vnic_wq.c
drivers/net/ethernet/cisco/enic/vnic_wq.h