Michael Margolin
1103579d6e
RDMA/efa: Report link speed according to device attributes
...
Set port link speed and width based on max bandwidth acquired from the
device instead of using constant 100 Gbps. Use a default value in case
the device didn't set the field.
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Firas Jahjah <firasj@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Link: https://patch.msgid.link/20241030093006.21352-1-mrgolin@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2024-10-30 15:36:59 +02: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/20241015174242.3490-3-mrgolin@amazon.com
Reviewed-by: Firas Jahjah <firasj@amazon.com >
Reviewed-by: Yonatan Nachum <ynachum@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2024-10-21 13:58:07 -03:00
Michael Margolin
1e7b86f1b2
RDMA/efa: Update device interface
...
Update device interface header files.
Link: https://patch.msgid.link/r/20241015174242.3490-2-mrgolin@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yonatan Nachum <ynachum@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2024-10-21 13:58:07 -03:00
Yehuda Yitschak
04e36fd27a
RDMA/efa: Add support for node guid
...
Propagate the unique, per device, ID in the device attributes to the
standard node_guid value in IB device.
Link: https://patch.msgid.link/r/20240822171143.2800-1-mrgolin@amazon.com
Reviewed-by: Yonatan Nachum <ynachum@amazon.com >
Signed-off-by: Yehuda Yitschak <yehuday@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2024-08-23 11:52:45 -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 <dkkranzd@amazon.com >
Reviewed-by: Firas Jahjah <firasj@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Link: https://lore.kernel.org/r/20240506151829.6475-1-mrgolin@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
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 <anasmous@amazon.com >
Reviewed-by: Firas Jahjah <firasj@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Link: https://lore.kernel.org/r/20240104095155.10676-1-mrgolin@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2024-01-07 12:02:27 +02:00
Michael Margolin
113383eff3
RDMA/efa: Add RDMA write HW statistics counters
...
Update device API and request RDMA write counters if RDMA write is
supported by device. Expose newly added counters through ib core
counters mechanism.
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yonatan Nachum <ynachum@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Link: https://lore.kernel.org/r/20230703153404.30877-1-mrgolin@amazon.com
Reviewed-by: Gal Pressman <gal.pressman@linux.dev >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2023-07-12 15:07:32 +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/20220818140449.414-1-mrgolin@amazon.com
Reviewed-by: Firas Jahjah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Signed-off-by: Michael Margolin <mrgolin@amazon.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
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/20211003105605.29222-1-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-10-06 19:47:18 -03:00
Daniel Kranzdorf
b0cff387e1
RDMA/efa: Add messages and RDMA read work requests HW stats
...
Add separate stats types for send messages and RDMA read work requests.
Link: https://lore.kernel.org/r/20200915141449.8428-3-galpress@amazon.com
Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2020-09-22 20:21:11 -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/20200731060420.17053-5-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2020-08-18 14:52:45 -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/20200722140312.3651-3-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Shadi Ammouri <sammouri@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
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/20200722140312.3651-2-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Firas JahJah <firasj@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2020-07-29 09:23:39 -03:00
Gal Pressman
e1ca01a902
RDMA/efa: Report host information to the device
...
The host info feature allows the driver to infrom the EFA device
firmware with system configuration for debugging and troubleshooting
purposes.
The host info buffer is passed as an admin command DMA mapped control
buffer, and is unmapped and freed once the command CQE is consumed.
Currently, the setting of host info is done for each device on its
probe. Failing to set the host info for the device shall not disturb the
probe flow, any errors will be discarded.
Link: https://lore.kernel.org/r/20200512152204.93091-3-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Guy Tzalik <gtzalik@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2020-05-21 10:05:00 -03:00
Gal Pressman
cc8a635e24
RDMA/efa: Fix setting of wrong bit in get/set_feature commands
...
When using a control buffer the ctrl_data bit should be set in order to
indicate the control buffer address is valid, not ctrl_data_indirect
which is used when the control buffer itself is indirect.
Fixes: e9c6c53730 ("RDMA/efa: Add common command handlers")
Link: https://lore.kernel.org/r/20200512152204.93091-2-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2020-05-21 10:05:00 -03:00
Gal Pressman
88d033077b
RDMA/efa: Unified getters/setters for device structs bitmask access
...
Use unified macros for device structs access instead of open coding the
shifts and masks over and over again.
Link: https://lore.kernel.org/r/20200225114010.21790-2-galpress@amazon.com
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2020-02-28 12:12:04 -04: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/20191121141509.59297-4-galpress@amazon.com
Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-25 10:31:48 -04:00
Daniel Kranzdorf
e6c4f3ff43
RDMA/efa: Support remote read access in MR registration
...
Enable remote read access for memory regions in order to support RDMA
operations.
Link: https://lore.kernel.org/r/20191121141509.59297-3-galpress@amazon.com
Signed-off-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-25 10:31:47 -04:00
Gal Pressman
bcf7cc534c
RDMA/efa: Store network attributes in device attributes
...
There's no reason to separate the network attributes from all other
device attributes. Embed the fields inside the device attributes and
query them all in one function.
Link: https://lore.kernel.org/r/20191121141509.59297-2-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-11-25 10:31:47 -04:00
Gal Pressman
a3f4b8e318
RDMA/efa: Fix incorrect error print
...
The error print should indicate that it failed to get the queue
attributes, not network attributes.
Link: https://lore.kernel.org/r/20190910134301.4194-2-galpress@amazon.com
Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com >
Reviewed-by: Firas JahJah <firasj@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-09-16 14:25:43 -03:00
Gal Pressman
cfa1f5f27c
RDMA/efa: Rate limit admin queue error prints
...
Admin queue error prints should never happen unless something wrong
happened to the device. However, in the unfortunate case that it does,
we should take extra care not to flood the log with error messages.
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Link: https://lore.kernel.org/r/20190801171447.54440-3-galpress@amazon.com
Signed-off-by: Doug Ledford <dledford@redhat.com >
2019-08-05 12:19:55 -04:00
Gal Pressman
16e9111e9e
RDMA/efa: Expose device statistics
...
Expose hardware statistics through the sysfs api:
/sys/class/infiniband/efa_0/hw_counters/*.
/sys/class/infiniband/efa_0/ports/1/hw_counters/*.
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Link: https://lore.kernel.org/r/20190725130353.11544-1-galpress@amazon.com
Signed-off-by: Doug Ledford <dledford@redhat.com >
2019-07-29 13:51:52 -04:00
Jason Gunthorpe
371bb62158
Merge tag 'v5.2-rc6' into rdma.git for-next
...
For dependencies in next patches.
Resolve conflicts:
- Use uverbs_get_cleared_udata() with new cq allocation flow
- Continue to delete nes despite SPDX conflict
- Resolve list appends in mlx5_command_str()
- Use u16 for vport_rule stuff
- Resolve list appends in struct ib_client
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-06-28 21:18:23 -03:00
Firas Jahjah
4b06843d40
RDMA/efa: Print address on AH creation failure
...
For debugging purposes, print destination address if failed to create AH.
Signed-off-by: Firas Jahjah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2019-06-21 11:52:44 -04:00
Gal Pressman
b41f75724a
RDMA/efa: Be consistent with success flow return value
...
The EFA driver is written with success oriented flows in mind, meaning
that functions should mostly end with a return 0 statement.
Error flows return their error value on their own instead of assuming
that the function will return the error at the end.
This commit fixes a bunch of functions that were not aligned with this
behavior.
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2019-06-21 11:52:44 -04:00
Gal Pressman
529254340c
RDMA/efa: Fix success return value in case of error
...
Existing code would mistakenly return success in case of error instead
of a proper return value.
Fixes: e9c6c53730 ("RDMA/efa: Add common command handlers")
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Doug Ledford <dledford@redhat.com >
2019-06-17 21:35:21 -04:00
Gal Pressman
2367d00e2c
RDMA/efa: Remove unused includes
...
Remove leftover includes that are no longer used from the driver.
Reviewed-by: Firas JahJah <firasj@amazon.com >
Reviewed-by: Yossi Leybovich <sleybo@amazon.com >
Signed-off-by: Gal Pressman <galpress@amazon.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-05-29 13:20:48 -03:00
Gal Pressman
e9c6c53730
RDMA/efa: Add common command handlers
...
Add the EFA common commands implementation.
Signed-off-by: Gal Pressman <galpress@amazon.com >
Reviewed-by: Steve Wise <swise@opengridcomputing.com >
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com >
2019-05-06 15:18:18 -03:00