mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
RDMA/uverbs: Add SRQ buffer UMEM attribute
Apply the per-attribute UMEM model to the SRQ create method. Add an optional UMEM attribute that backs the SRQ WQE buffer, so userspace can supply it as either a VA or a dma-buf through a single descriptor, consistent with the CQ and QP create methods. mlx5 is the only driver that pins an SRQ WQE buffer via umem; it maps a single ucmd->buf_addr region through this attribute. No other driver implements a user SRQ buffer, so none of them use the attribute. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260701124015.64350-2-jiri@resnulli.us Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
1773ca1a89
commit
fe34dc1fa0
|
|
@ -192,6 +192,8 @@ DECLARE_UVERBS_NAMED_METHOD(
|
|||
UVERBS_ATTR_PTR_OUT(UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM,
|
||||
UVERBS_ATTR_TYPE(u32),
|
||||
UA_OPTIONAL),
|
||||
UVERBS_ATTR_UMEM(UVERBS_ATTR_CREATE_SRQ_BUF_UMEM,
|
||||
UA_OPTIONAL),
|
||||
UVERBS_ATTR_UHW());
|
||||
|
||||
static int UVERBS_HANDLER(UVERBS_METHOD_SRQ_DESTROY)(
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ enum uverbs_attrs_create_srq_cmd_attr_ids {
|
|||
UVERBS_ATTR_CREATE_SRQ_RESP_MAX_WR,
|
||||
UVERBS_ATTR_CREATE_SRQ_RESP_MAX_SGE,
|
||||
UVERBS_ATTR_CREATE_SRQ_RESP_SRQ_NUM,
|
||||
UVERBS_ATTR_CREATE_SRQ_BUF_UMEM,
|
||||
};
|
||||
|
||||
enum uverbs_attrs_destroy_srq_cmd_attr_ids {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user