xnvme_sgl

Enums

Structs

Functions

xnvme_sgl_add

int xnvme_sgl_add(struct xnvme_dev *dev, struct xnvme_sgl *sgl, void *buf, size_t nbytes)

Add an entry to the SGL.

See

xnvme_sgl_alloc

See

xnvme_buf_alloc

Parameters

xnvme_sgl_alloc

struct xnvme_sgl *xnvme_sgl_alloc(struct xnvme_sgl_pool *pool)

Allocate an SGL from a pool.

See

xnvme_sgl_create

Parameters
  • pool – Pool to allocate SGL from

Returns

On success, an initialized (empty) SGL is returned. On error, NULL is returned and errno is set to indicate any error.

xnvme_sgl_create

struct xnvme_sgl *xnvme_sgl_create(struct xnvme_dev *dev, int hint)

Create a Scatter-Gather-List (SGL)

See

xnvme_sgl_destroy

See

xnvme_sgl_alloc

See

xnvme_sgl_free

See

xnvme_sgl_add

Parameters
  • dev – Device handle obtained with xnvme_dev_open()

  • hint – Allocation hint.

Returns

On success, an initialized (empty) SGL is returned. On error, NULL is returned and errno is set to indicate any error.

xnvme_sgl_destroy

void xnvme_sgl_destroy(struct xnvme_dev *dev, struct xnvme_sgl *sgl)

Destroy an SGL, freeing the memory used.

See

xnvme_sgl_free

Parameters

xnvme_sgl_free

void xnvme_sgl_free(struct xnvme_sgl_pool *pool, struct xnvme_sgl *sgl)

Free an SGL, returning it to the pool.

See

xnvme_sgl_destroy

Parameters

xnvme_sgl_pool_create

struct xnvme_sgl_pool *xnvme_sgl_pool_create(struct xnvme_dev *dev)

Create an pool of Scather-Gather-List (SGL)

Parameters
Returns

An initialized pool that can be used to amortize the cost of repeated SGL allocations

xnvme_sgl_pool_destroy

void xnvme_sgl_pool_destroy(struct xnvme_sgl_pool *pool)

Destroy an SGL pool (and all SGLs in the pool).

Parameters
  • pool – Pointer to the xnvme_sgl_pool to destroy

xnvme_sgl_reset

void xnvme_sgl_reset(struct xnvme_sgl *sgl)

Reset an SGL.

Parameters