1mlx5dv_create_mkey / mlx5dv_destroy_mmlkxe5yd(v3_)create_mkey / mlx5dv_destroy_mkey(3)
2
3
4

NAME

6       mlx5dv_create_mkey - Creates an indirect mkey
7
8       mlx5dv_destroy_mkey - Destroys an indirect mkey
9

SYNOPSIS

11              #include <infiniband/mlx5dv.h>
12
13              struct mlx5dv_mkey_init_attr {
14                  struct ibv_pd   *pd;
15                  uint32_t    create_flags;
16                  uint16_t    max_entries;
17              };
18
19              struct mlx5dv_mkey {
20                  uint32_t    lkey;
21                  uint32_t    rkey;
22              };
23
24              struct mlx5dv_mkey *
25              mlx5dv_create_mkey(struct mlx5dv_mkey_init_attr *mkey_init_attr);
26
27              int mlx5dv_destroy_mkey(struct mlx5dv_mkey *mkey);
28

DESCRIPTION

30       Create / destroy an indirect mkey.
31
32       Create  an indirect mkey to enable application uses its specific device
33       functionality.
34

ARGUMENTS

36       ##mkey_init_attr##
37
38       pd     ibv protection domain.
39
40       create_flags
41              MLX5DV_MKEY_INIT_ATTR_FLAGS_INDIRECT:  Indirect  mkey  is  being
42              created.    MLX5DV_MKEY_INIT_ATTR_FLAGS_BLOCK_SIGNATURE:  Enable
43              block signature offload support for mkey.   MLX5DV_MKEY_INIT_AT‐
44              TR_FLAGS_CRYPTO:  Enable  crypto offload support for mkey.  Set‐
45              ting this flag means that crypto operations  will  be  done  and
46              hence,  must  be  configured.  I.e.  if this flag is set and the
47              MKey  was   not   configured   for   crypto   properties   using
48              mlx5dv_wr_set_mkey_crypto(),  then running traffic with the MKey
49              will fail, generating a CQE  with  error.   MLX5DV_MKEY_INIT_AT‐
50              TR_FLAGS_UPDATE_TAG:  Enable  update tag support for mkey.  Set‐
51              ting this flag allows an application to set the mkey tag post of
52              creating  the mkey.  If the kernel does not support updating the
53              mkey  tag,  mkey  creation  will   fail.    MLX5DV_MKEY_INIT_AT‐
54              TR_FLAGS_REMOTE_INVALIDATE:  Enable  remote invalidation support
55              for mkey.
56
57       max_entries
58              Requested max number of pointed entries by this  indirect  mkey.
59              The  function  will  update the mkey_init_attr->max_entries with
60              the actual mkey value that was created; it will be greater  than
61              or equal to the value requested.
62

RETURN VALUE

64       Upon success mlx5dv_create_mkey will return a new struct mlx5dv_mkey on
65       error NULL will be returned and errno will be set.
66
67       Upon success destroy 0 is returned or the value of errno on a failure.
68

Notes

70       To let this functionality works a DEVX context should be opened by  us‐
71       ing mlx5dv_open_device.
72
73       The  created indirect mkey can`t work with scatter to CQE feature, con‐
74       sider mlx5dv_create_qp()  with  MLX5DV_QP_CREATE_DISABLE_SCATTER_TO_CQE
75       for small messages.
76

SEE ALSO

78       mlx5dv_open_device(3), mlx5dv_create_qp(3)
79
80       #AUTHOR
81
82       Yishai Hadas <yishaih@mellanox.com>
83
84
85
86                                   mlx5dv_create_mkey / mlx5dv_destroy_mkey(3)
Impressum