mlx5dv_mkey_check(3) | mlx5dv_mkey_check(3) |
mlx5dv_mkey_check - Check a MKEY for errors
#include <infiniband/mlx5dv.h> int mlx5dv_mkey_check(struct mlx5dv_mkey *mkey,
struct mlx5dv_mkey_err *err_info);
Checks mkey for errors and provides the result in err_info on success.
This should be called after using a MKEY configured with signature validation in a transfer operation. While the transfer operation itself may be completed successfully (i.e. no transport related errors occurred), there still may be errors related to the integrity of the data. The first of these errors is reported to the MKEY and kept there until application software queries it by calling this API.
The type of error indicates which part of the signature was bad (guard, reftag or apptag). Also provided is the actual calculated value based on the transferred data, and the expected value based on the signature fields. Last part provided is the offset in the transfer that caused the error.
struct mlx5dv_mkey_err {
enum mlx5dv_mkey_err_type err_type;
union {
struct mlx5dv_sig_err sig;
} err; };
struct mlx5dv_sig_err {
uint64_t actual_value;
uint64_t expected_value;
uint64_t offset; };
0 on success or the value of errno on failure (which indicates the failure reason).
A DEVX context should be opened by using mlx5dv_open_device(3).
Checking the MKEY for errors should be done after the application knows the data transfer that was using the MKEY has finished. Application should wait for the respected completion (if this was a local MKEY) or wait for a received message from a peer (if this was a remote MKEY).
mlx5dv_wr_mkey_configure(3), mlx5dv_wr_set_mkey_sig_block(3), mlx5dv_create_mkey(3), mlx5dv_destroy_mkey(3)
Oren Duer <oren@nvidia.com>
Sergey Gorenko <sergeygo@nvidia.com>