Commit Graph
16 Commits
Author SHA1 Message Date
Michael Margolin 5aeb6e0399 RDMA/efa: Rename alloc_ucontext comp_mask to supported_caps
Following discussion [1], rename the comp_mask field in
efa_ibv_alloc_ucontext_cmd to supported_caps to reflect its actual
usage as a capabilities handshake mechanism rather than a standard
comp_mask. Rename related constants and align function and macro names.

[1] https://lore.kernel.org/linux-rdma/[email protected]/

Signed-off-by: Michael Margolin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
2026-03-17 07:04:03 -04:00
Yonatan Nachum e736a223ab RDMA/efa: Expose new extended max inline buff size
Add new extended max inline query and report the new value to userspace.

Reviewed-by: Firas Jahjah <[email protected]>
Reviewed-by: Michael Margolin <[email protected]>
Signed-off-by: Yonatan Nachum <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
2026-02-25 06:22:20 -05:00
Michael Margolin 9fb3dd8519 RDMA/efa: Add CQ with external memory support
Add an option to create CQ using external memory instead of allocating
in the driver. The memory can be passed from userspace by dmabuf fd and
an offset or a VA. One of the possible usages is creating CQs that
reside in accelerator memory, allowing low latency asynchronous direct
polling from the accelerator device. Add a capability bit to reflect on
the feature support.

Reviewed-by: Daniel Kranzdorf <[email protected]>
Reviewed-by: Yonatan Nachum <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
2025-07-13 04:00:34 -04:00
Michael Margolin 48931f65e9 RDMA/efa: Add option to set QP service level on create
Using modify QP with AH attributes and IB_QP_AV flag set doesn't make
much sense for connectionless QP types like SRD. Add SL parameter to EFA
create QP user ABI and pass it to the device.

Link: https://patch.msgid.link/r/[email protected]
Reviewed-by: Firas Jahjah <[email protected]>
Reviewed-by: Yonatan Nachum <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2024-10-21 13:58:07 -03:00
Michael Margolin 2b8af5001a RDMA/efa: Support QP with unsolicited write w/ imm. receive
Add a new EFA flags attribute for QP creation, and support unsolicited
write with immediate flag. QPs created with this flag set will not
consume receive work requests for incoming RDMA write with immediate.
Expose device capability bit for this feature support.

Reviewed-by: Daniel Kranzdorf <[email protected]>
Reviewed-by: Firas Jahjah <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
2024-05-08 11:18:26 +03:00
Michael Margolin 2307157c85 RDMA/efa: Add EFA query MR support
Add EFA driver uapi definitions and register a new query MR method that
currently returns the physical interconnects the device is using to
reach the MR. Update admin definitions and efa-abi accordingly.

Reviewed-by: Anas Mousa <[email protected]>
Reviewed-by: Firas Jahjah <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
2024-01-07 12:02:27 +02:00
Yonatan Nachum 531094dc71 RDMA/efa: Add rdma write capability to device caps
Add rdma write capability that is propagated from the device to rdma-core.
Enable MR creation with remote write permissions according to this device
capability.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Firas Jahjah <[email protected]>
Reviewed-by: Michael Margolin <[email protected]>
Signed-off-by: Yonatan Nachum <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2023-04-21 19:18:58 -03:00
Yonatan Nachum 6dddd93938 RDMA/efa: Add data polling capability feature bit
Add feature bit to existing device caps field. EFA supports data polling
of 128 bytes blocks.

The flag indicates that the NIC guarentees that a 128 byte aligned block
is written in order, ie that observing the last 8 bits of the block mean
the prior 127 bytes are also written.

It is useful for "last data polling" acceleration techniques.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Yehuda Yitschak <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Yonatan Nachum <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Acked-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2023-03-22 14:41:58 -03:00
Michael Margolin dc13fbf79e RDMA/efa: Support CQ receive entries with source GID
Add a parameter for create CQ admin command to set source address on
receive completion descriptors. Report capability for this feature
through query device verb.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Firas Jahjah <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Daniel Kranzdorf <[email protected]>
Signed-off-by: Michael Margolin <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
2022-08-21 12:35:59 +03:00
Gal Pressman 2a152512a1 RDMA/efa: CQ notifications
This patch adds support for CQ notifications through the standard verbs
api.

In order to achieve that, a new event queue (EQ) object is introduced,
which is in charge of reporting completion events to the driver.  On
driver load, EQs are allocated and their affinity is set to a single
cpu. When a user app creates a CQ with a completion channel, the
completion vector number is converted to a EQ number, which is in charge
of reporting the CQ events.

In addition, the CQ creation admin command now returns an offset for the
CQ doorbell, which is mapped to the userspace provider and is used to arm
the CQ when requested by the user.

The EQs use a single doorbell (located on the registers BAR), which
encodes the EQ number and arm as part of the doorbell value.  The EQs are
polled by the driver on each new EQE, and arm it when the poll is
completed.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Firas JahJah <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2021-10-06 19:47:18 -03:00
Gal Pressman a4e6a1dd57 RDMA/efa: Introduce SRD RNR retry
This patch introduces the ability to configure SRD QPs with the RNR retry
parameter when issuing a modify QP command.

In addition, a capability bit was added to report support to the userspace
library.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Firas JahJah <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2020-08-18 14:52:45 -03:00
Gal Pressman a5d87b6985 RDMA/efa: User/kernel compatibility handshake mechanism
Introduce a mechanism that performs an handshake between the userspace
provider and kernel driver which verifies that the user supports all
required features in order to operate correctly.

The handshake verifies the needed functionality by comparing the reported
device caps and the provider caps. If the device reports a non-zero
capability the appropriate comp mask is required from the userspace
provider in order to allocate the context.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Shadi Ammouri <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2020-07-29 09:23:40 -03:00
Gal Pressman da2924bdca RDMA/efa: Expose minimum SQ size
The device reports the minimum SQ size required for creation.

This patch queries the min SQ size and reports it back to the userspace
library.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Firas JahJah <[email protected]>
Reviewed-by: Shadi Ammouri <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2020-07-29 09:23:39 -03:00
Gal Pressman 556c811f24 RDMA/efa: Expose maximum TX doorbell batch
The device reports the maximum number of bytes to be written before
ringing the doorbell (zero means unlimited).

This patch queries the max batch size and reports it back to the userspace
library.

Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Daniel Kranzdorf <[email protected]>
Reviewed-by: Firas JahJah <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2020-07-29 09:23:39 -03:00
Daniel Kranzdorf 666e8ff535 RDMA/efa: Expose RDMA read related attributes
Query the device attributes for RDMA operations, including maximum
transfer size and maximum number of SGEs per RDMA WR, and report them
back to the userspace library.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Kranzdorf <[email protected]>
Reviewed-by: Yossi Leybovich <[email protected]>
Signed-off-by: Gal Pressman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2019-11-25 10:31:48 -04:00
Gal Pressman 2ce62149af RDMA/efa: Add the ABI definitions
Add the EFA ABI file exposed to userspace.

Signed-off-by: Gal Pressman <[email protected]>
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
2019-05-06 15:18:17 -03:00