[dpdk-dev] Queries on dpdk buffer allocation and kni

Rajasekhar Pulluru pullururajasekhar at gmail.com
Tue Mar 31 17:13:19 CEST 2015


Dear Group members,

I have been trying to understand the dpdk code and have got two queries.

1. descriptor rings and packet buffer allocation

Looking at the linux native e1000 kernel driver,
Memory for NIC's tx and rx descriptor rings are allocated using
dma_alloc_coherent.
Memory for rx packet buffers are allocated using netdev_alloc_skb and
dma address (after dma_map_single) of skb->data is set to rx
descriptor to receive packet onto skb.

Looking at dpdk user space driver, all rings and packet allocation is
done using (dpdk) mem pools.

I would like to know

a) whether the mem pool internally uses dma_alloc_coherent like apis
to allocate buffers
b) if the buffer is allocated by kernel, how does the user space
application map them and access the packet data directly.

2. kni

what is the internal mechanism used to implement FIFO-based shared
memory (used between kernel and user-land).

Thanks in advance,
Rajasekhar


More information about the dev mailing list