BufferAlloction_1.c defines the network buffer descriptors as:
static NetworkBufferDescriptor_t xNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ];
NetworkBufferDescriptor_t is a struct with information about a network descriptor. It has one important pointer:
pucEthernetBuffer that points to the actual Network Packets.
When a driver is zero-copy,
pucEthernetBuffer is passed to DMA, both for reception as well as for sending.
BufferAlloction_1.c, the network packets will be stored in a static char array
void vNetworkInterfaceAllocateRAMToBuffers( NetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ] )
__attribute__ ( ( aligned( 32 ) ) )
uint8_t ucNetworkPackets[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS * ETH_MAX_PACKET_SIZE ] ;
( I rearranged the declaration to make it easier to read ).
To summarise, two objects are shared with DMA:
- The buffers pointed to by
- the so-called DMA descriptors. They describe the packets that are exchanged
The DMA-descriptors are stored in
If things are still not clear, please say so. I will update the sources to bring more clarity.