* @param hdl (adf_net handle)
* @param size (size of the new buf)
* @param reserve (amount of space to reserve in the head)
* @param hdl (adf_net handle)
* @param size (size of the new buf)
* @param reserve (amount of space to reserve in the head)
/**
* @brief expand the tailroom, mostly by adding the new tail
* buffer, also take care of the priv
/**
* @brief expand the tailroom, mostly by adding the new tail
* buffer, also take care of the priv
* @param buf
* @param headroom ( 0 if no headroom expansion req)
* @param tailroom ( 0 if no tailroom expansion req)
* @param buf
* @param headroom ( 0 if no headroom expansion req)
* @param tailroom ( 0 if no tailroom expansion req)
* @return new data pointer ,NULL if the len is more than the
* space available in the head frag.
*/
* @return new data pointer ,NULL if the len is more than the
* space available in the head frag.
*/
tail = last_desc->buf_addr + last_desc->data_offset + last_desc->data_size;
last_desc->data_size += len;
buf->buf_length += len;
tail = last_desc->buf_addr + last_desc->data_offset + last_desc->data_size;
last_desc->data_size += len;
buf->buf_length += len;
__adf_nbuf_pull_head(__adf_nbuf_t buf, adf_os_size_t len)
{
a_uint8_t *ptr = NULL;
VDESC *desc = buf->desc_list;
__adf_nbuf_pull_head(__adf_nbuf_t buf, adf_os_size_t len)
{
a_uint8_t *ptr = NULL;
VDESC *desc = buf->desc_list;
__adf_nbuf_trim_tail(__adf_nbuf_t buf, adf_os_size_t len)
{
VDESC *last_desc = __adf_nbuf_last(buf);
__adf_nbuf_trim_tail(__adf_nbuf_t buf, adf_os_size_t len)
{
VDESC *last_desc = __adf_nbuf_last(buf);
//adf_os_assert(0); //0820
}
/**
* @brief Copy assumes that we create a writeable copy of the
* nbuf which is equivalent in FreeBSD as duping the
* mbuf.
//adf_os_assert(0); //0820
}
/**
* @brief Copy assumes that we create a writeable copy of the
* nbuf which is equivalent in FreeBSD as duping the
* mbuf.
__adf_nbuf_frag_info(__adf_nbuf_t buf, adf_os_sglist_t *sg)
{
VDESC *desc = buf->desc_list;
int count = 0;
__adf_nbuf_frag_info(__adf_nbuf_t buf, adf_os_sglist_t *sg)
{
VDESC *desc = buf->desc_list;
int count = 0;
while( desc != NULL ) {
sg->sg_segs[count].vaddr = desc->buf_addr + desc->data_offset;
sg->sg_segs[count].len = desc->data_size;
while( desc != NULL ) {
sg->sg_segs[count].vaddr = desc->buf_addr + desc->data_offset;
sg->sg_segs[count].len = desc->data_size;
__adf_nbuf_dmamap_create(__adf_os_device_t osdev, __adf_os_dma_map_t *dmap)
{
a_status_t retval = A_STATUS_OK;
__adf_nbuf_dmamap_create(__adf_os_device_t osdev, __adf_os_dma_map_t *dmap)
{
a_status_t retval = A_STATUS_OK;
__adf_nbuf_dmamap_info(__adf_os_dma_map_t bmap, adf_os_dmamap_info_t *sg)
{
VDESC *desc = bmap->buf->desc_list;
int count = 0;
__adf_nbuf_dmamap_info(__adf_os_dma_map_t bmap, adf_os_dmamap_info_t *sg)
{
VDESC *desc = bmap->buf->desc_list;
int count = 0;
while( desc != NULL ) {
sg->dma_segs[count].paddr = (adf_os_dma_addr_t)(desc->buf_addr + desc->data_offset);
sg->dma_segs[count].len = desc->data_size;
while( desc != NULL ) {
sg->dma_segs[count].paddr = (adf_os_dma_addr_t)(desc->buf_addr + desc->data_offset);
sg->dma_segs[count].len = desc->data_size;
- //adf_os_print("cnt: %x, len: %x, __adf_nbuf_queue_len: %x\n", cnt, len,
+ //adf_os_print("cnt: %x, len: %x, __adf_nbuf_queue_len: %x\n", cnt, len,
return last_desc->buf_size - last_desc->data_offset - last_desc->data_size;
}
/**
* @brief get the entire packet length
return last_desc->buf_size - last_desc->data_offset - last_desc->data_size;
}
/**
* @brief get the entire packet length