ldc.h revision e1ebb9ec908bc2d0a8810f137ebd6566cc8a8061
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/*
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER START
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo *
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * The contents of this file are subject to the terms of the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Common Development and Distribution License (the "License").
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You may not use this file except in compliance with the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo *
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * or http://www.opensolaris.org/os/licensing.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * See the License for the specific language governing permissions
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * and limitations under the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo *
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * When distributing Covered Code, include this CDDL HEADER in each
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * If applicable, add the following below this CDDL HEADER, with the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * fields enclosed by brackets "[]" replaced with your own identifying
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * information: Portions Copyright [yyyy] [name of copyright owner]
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo *
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER END
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/*
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Use is subject to license terms.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#ifndef _LDC_H
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define _LDC_H
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#pragma ident "%Z%%M% %I% %E% SMI"
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#ifdef __cplusplus
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoextern "C" {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#endif
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#include <sys/types.h>
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#include <sys/ddi.h>
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#include <sys/sunddi.h>
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#include <sys/ioctl.h>
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#include <sys/processor.h>
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* Types */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef uint64_t ldc_handle_t; /* Channel handle */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef uint64_t ldc_mem_handle_t; /* Channel memory handle */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef uint64_t ldc_dring_handle_t; /* Descriptor ring handle */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC transport mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef enum {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_MODE_RAW, /* Raw mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_MODE_UNRELIABLE, /* Unreliable packet mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_MODE_RELIABLE, /* Reliable packet mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_MODE_STREAM /* Reliable byte stream */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_mode_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC message payload sizes */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_ELEM_SIZE 8 /* size in bytes */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_PACKET_SIZE (LDC_ELEM_SIZE * 8)
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_PAYLOAD_SIZE_RAW (LDC_PACKET_SIZE)
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_PAYLOAD_SIZE_UNRELIABLE (LDC_PACKET_SIZE - LDC_ELEM_SIZE)
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_PAYLOAD_SIZE_RELIABLE (LDC_PACKET_SIZE - (LDC_ELEM_SIZE * 2))
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC Channel Status */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef enum {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_INIT = 1, /* Channel initialized */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_OPEN, /* Channel open */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_READY, /* Channel peer opened (hw-link-up) */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_UP /* Channel UP - ready for data xfer */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_status_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* Callback return values */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_SUCCESS 0
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_FAILURE 1
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC callback mode */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef enum {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_CB_ENABLE, /* Enable callbacks */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_CB_DISABLE /* Disable callbacks */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_cb_mode_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* Callback events */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_EVT_DOWN 0x1 /* Channel DOWN, status = OPEN */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_EVT_RESET 0x2 /* Channel RESET, status = READY */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_EVT_UP 0x4 /* Channel UP, status = UP */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_EVT_READ 0x8 /* Channel has data for read */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_EVT_WRITE 0x10 /* Channel has space for write */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC device classes */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef enum {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_GENERIC = 1, /* generic device */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_BLK, /* block device, eg. vdc */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_BLK_SVC, /* block device service, eg. vds */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_NT, /* network device, eg. vnet */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_NT_SVC, /* network service eg. vsw */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_DEV_SERIAL /* serial device eg. vldc, vcc */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_dev_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* Channel nexus registration */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef struct ldc_cnex {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo dev_info_t *dip; /* dip of channel nexus */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo int (*reg_chan)(); /* interface for channel register */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo int (*unreg_chan)(); /* interface for channel unregister */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo int (*add_intr)(); /* interface for adding interrupts */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo int (*rem_intr)(); /* interface for removing interrupts */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo int (*clr_intr)(); /* interface for clearing interrupts */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_cnex_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC attribute structure */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef struct ldc_attr {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_dev_t devclass; /* device class */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint64_t instance; /* device class instance */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_mode_t mode; /* channel mode */
e1ebb9ec908bc2d0a8810f137ebd6566cc8a8061lm uint64_t mtu; /* channel mtu */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_attr_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC memory cookie */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef struct ldc_mem_cookie {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint64_t addr; /* cookie address */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint64_t size; /* size @ offset */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_mem_cookie_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/*
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * LDC Memory Map Type
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Specifies how shared memory being created is shared with its
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * peer and/or how the peer has mapped in the exported memory.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_SHADOW_MAP 0x1 /* share mem via shadow copy only */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_DIRECT_MAP 0x2 /* share mem direct access */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_IO_MAP 0x4 /* share mem for IOMMU/DMA access */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC Memory Access Permissions */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_MEM_R 0x1 /* Memory region is read only */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_MEM_W 0x2 /* Memory region is write only */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_MEM_X 0x4 /* Memory region is execute only */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_MEM_RW (LDC_MEM_R|LDC_MEM_W)
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_MEM_RWX (LDC_MEM_R|LDC_MEM_W|LDC_MEM_X)
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC Memory Copy Direction */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_COPY_IN 0x0 /* Copy data to VA from cookie mem */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#define LDC_COPY_OUT 0x1 /* Copy data from VA to cookie mem */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC memory/dring (handle) status */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef enum {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_UNBOUND, /* Memory handle is unbound */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_BOUND, /* Memory handle is bound */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo LDC_MAPPED /* Memory handle is mapped */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_mstatus_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* LDC [dring] memory info */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppotypedef struct ldc_mem_info {
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint8_t mtype; /* map type */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint8_t perm; /* RWX permissions */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo caddr_t vaddr; /* base VA */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uintptr_t raddr; /* base RA */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_mstatus_t status; /* dring/mem handle status */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo} ldc_mem_info_t;
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo/* API functions */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_register(ldc_cnex_t *cinfo);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_unregister(ldc_cnex_t *cinfo);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_init(uint64_t id, ldc_attr_t *attr, ldc_handle_t *handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_fini(ldc_handle_t handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_open(ldc_handle_t handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_close(ldc_handle_t handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_up(ldc_handle_t handle);
e1ebb9ec908bc2d0a8810f137ebd6566cc8a8061lmint ldc_down(ldc_handle_t handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_reg_callback(ldc_handle_t handle,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint_t(*callback)(uint64_t event, caddr_t arg), caddr_t arg);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_unreg_callback(ldc_handle_t handle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_set_cb_mode(ldc_handle_t handle, ldc_cb_mode_t imode);
e1ebb9ec908bc2d0a8810f137ebd6566cc8a8061lmint ldc_chkq(ldc_handle_t handle, boolean_t *hasdata);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_read(ldc_handle_t handle, caddr_t buf, size_t *size);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_write(ldc_handle_t handle, caddr_t buf, size_t *size);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_status(ldc_handle_t handle, ldc_status_t *status);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_alloc_handle(ldc_handle_t handle, ldc_mem_handle_t *mhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_free_handle(ldc_mem_handle_t mhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_bind_handle(ldc_mem_handle_t mhandle, caddr_t vaddr, size_t len,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint8_t mtype, uint8_t perm, ldc_mem_cookie_t *cookie, uint32_t *ccount);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_unbind_handle(ldc_mem_handle_t mhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_info(ldc_mem_handle_t mhandle, ldc_mem_info_t *minfo);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_nextcookie(ldc_mem_handle_t mhandle, ldc_mem_cookie_t *cookie);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_copy(ldc_handle_t handle, caddr_t vaddr, uint64_t off, size_t *len,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_mem_cookie_t *cookies, uint32_t ccount, uint8_t direction);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_rdwr_pa(ldc_handle_t handle, caddr_t vaddr, size_t *size,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo caddr_t paddr, uint8_t direction);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_map(ldc_mem_handle_t mhandle, ldc_mem_cookie_t *cookie,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint32_t ccount, uint8_t mtype, caddr_t *vaddr, caddr_t *raddr);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_acquire(ldc_mem_handle_t mhandle, uint64_t offset, uint64_t size);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_release(ldc_mem_handle_t mhandle, uint64_t offset, uint64_t size);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_create(uint32_t len, uint32_t dsize,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_dring_handle_t *dhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_destroy(ldc_dring_handle_t dhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_bind(ldc_handle_t handle, ldc_dring_handle_t dhandle,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint8_t mtype, uint8_t perm, ldc_mem_cookie_t *dcookie, uint32_t *ccount);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_nextcookie(ldc_dring_handle_t mhandle,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_mem_cookie_t *cookie);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_unbind(ldc_dring_handle_t dhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_info(ldc_dring_handle_t dhandle, ldc_mem_info_t *minfo);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_map(ldc_handle_t handle, ldc_mem_cookie_t *cookie,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint32_t ccount, uint32_t len, uint32_t dsize, uint8_t mtype,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo ldc_dring_handle_t *dhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_unmap(ldc_dring_handle_t dhandle);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_acquire(ldc_dring_handle_t dhandle, uint64_t start,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint64_t end);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoint ldc_mem_dring_release(ldc_dring_handle_t dhandle, uint64_t start,
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo uint64_t end);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#ifdef __cplusplus
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo}
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#endif
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo#endif /* _LDC_H */