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_create_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.
50
51       max_entries
52              Requested max number of pointed entries by this  indirect  mkey.
53              The  function  will  update the mkey_init_attr->max_entries with
54              the actual mkey value that was created; it will be greater  than
55              or equal to the value requested.
56

RETURN VALUE

58       Upon success mlx5dv_create_mkey will return a new struct mlx5dv_mkey on
59       error NULL will be returned and errno will be set.
60
61       Upon success destroy 0 is returned or the value of errno on a failure.
62

Notes

64       To let this functionality works a DEVX context should be opened by  us‐
65       ing mlx5dv_open_device.
66
67       The  created indirect mkey can`t work with scatter to CQE feature, con‐
68       sider mlx5dv_create_qp()  with  MLX5DV_QP_CREATE_DISABLE_SCATTER_TO_CQE
69       for small messages.
70

SEE ALSO

72       mlx5dv_open_device(3), mlx5dv_create_qp(3)
73
74       #AUTHOR
75
76       Yishai Hadas <yishaih@mellanox.com>
77
78
79
80                                   mlx5dv_create_mkey / mlx5dv_destroy_mkey(3)
Impressum