Transmitting Packets on a Network Device
NetDev_Tx()
is used to notify the Ethernet device that a new packet is available to be transmitted. It performs the following actions:
p_data
.Mem_Copy()
to copy the data stored in the buffer to the device’s internal memory. The address of the buffer is specified by p_data
.size
argument. DMA-based devices have a size field within the transmit descriptor. Non-DMA devices have a transmit size register that must be configured.NetDev_Tx()
sets perr
to NET_DEV_ERR_NONE
and return from the transmit function.