xnvme_mem

Enums

Structs

Functions

xnvme_mem_map

int xnvme_mem_map(const struct xnvme_dev *dev, void *vaddr, size_t nbytes)

SPDX-FileCopyrightText: Samsung Electronics Co., Ltd.

SPDX-License-Identifier: BSD-3-Clause Map a buffer for IO with the given device

The buffer will be aligned to device geometry and DMA allocated if required by the backend for command payloads

Note

nbytes must be greater than zero and a multiple of minimal granularity

Note

Unmap the buffer using xnvme_mem_unmap()

Parameters:
  • dev – Device handle obtained with xnvme_dev_open()

  • vaddr – Pointer to start of virtual memory to use as mapped memory

  • nbytes – The number of bytes to map, starting at vaddr

Returns:

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

xnvme_mem_unmap

int xnvme_mem_unmap(const struct xnvme_dev *dev, void *buf)

Unmap the given IO buffer mapped with xnvme_mem_map()

Parameters:
Returns:

On sucess, 0 is returned. On error, negative ‘errno’ is returned