libxnvme_kvs.h#

Enums#

xnvme_retrieve_opts#

enum xnvme_retrieve_opts#

SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.

SPDX-License-Identifier: BSD-3-Clause

Values:

enumerator XNVME_KVS_RETRIEVE_OPT_RETRIEVE_RAW#

xnvme_store_opts#

enum xnvme_store_opts#

Values:

enumerator XNVME_KVS_STORE_OPT_DONT_STORE_IF_KEY_NOT_EXISTS#
enumerator XNVME_KVS_STORE_OPT_DONT_STORE_IF_KEY_EXISTS#
enumerator XNVME_KVS_STORE_OPT_COMPRESS#

Functions#

xnvme_kvs_delete#

int xnvme_kvs_delete(struct xnvme_cmd_ctx *ctx, uint32_t nsid, const void *key, uint8_t key_len)#

Submit, and optionally wait for completion of, a KV Delete.

Parameters:
  • ctx – Pointer to command context (xnvme_cmd_ctx)

  • nsid – Namespace Identifier

  • key – pointer to a KV Key buffer

  • key_len – KV Key size in bytes

Returns:

On success, 0 is returned. On error, negative errno is returned.

xnvme_kvs_exist#

int xnvme_kvs_exist(struct xnvme_cmd_ctx *ctx, uint32_t nsid, const void *key, uint8_t key_len)#

Submit, and optionally wait for completion of, a KV Exist.

Parameters:
  • ctx – Pointer to command context (xnvme_cmd_ctx)

  • nsid – Namespace Identifier

  • key – pointer to a KV Key buffer

  • key_len – KV Key size in bytes

Returns:

On success, 0 is returned. On error, negative errno is returned.

xnvme_kvs_list#

int xnvme_kvs_list(struct xnvme_cmd_ctx *ctx, uint32_t nsid, const void *key, uint8_t key_len, const void *vbuf, uint32_t vbuf_nbytes)#

Submit, and optionally wait for completion of, a KV List.

Parameters:
  • ctx – Pointer to command context (xnvme_cmd_ctx)

  • nsid – Namespace Identifier

  • key – pointer to a KV Key buffer

  • key_len – KV Key size in bytes

  • vbuf – pointer to Host Buffer

  • vbuf_nbytes – Host Buffer size in bytes

Returns:

On success, 0 is returned. On error, negative errno is returned.

xnvme_kvs_retrieve#

int xnvme_kvs_retrieve(struct xnvme_cmd_ctx *ctx, uint32_t nsid, const void *key, uint8_t key_len, const void *vbuf, uint32_t vbuf_nbytes, uint8_t opt)#

Submit, and optionally wait for completion of, a KV Retrieve.

Parameters:
  • ctx – Pointer to command context (xnvme_cmd_ctx)

  • nsid – Namespace Identifier

  • key – pointer to a KV Key buffer

  • key_len – KV Key size in bytes

  • vbuf – pointer to Host Buffer

  • vbuf_nbytes – Host Buffer size in bytes

  • opt – Retrieve options, see xnvme_retrieve_opts

Returns:

On success, 0 is returned. On error, negative errno is returned.

xnvme_kvs_store#

int xnvme_kvs_store(struct xnvme_cmd_ctx *ctx, uint32_t nsid, const void *key, uint8_t key_len, const void *vbuf, uint32_t vbuf_nbytes, uint8_t opt)#

Submit, and optionally wait for completion of, a KV Store.

Parameters:
  • ctx – Pointer to command context (xnvme_cmd_ctx)

  • nsid – Namespace Identifier

  • key – pointer to a KV Key buffer

  • key_len – KV Key size in bytes

  • vbuf – pointer to data payload

  • vbuf_nbytes – data payload size in bytes

  • opt – Store-options, see xnvme_store_opts

Returns:

On success, 0 is returned. On error, negative errno is returned.