Zero-copy esp_netif_transmit
when prepending headers (IDFGH-13434)
#14340
Labels
Status: Opened
Issue is new
esp_netif_transmit
when prepending headers (IDFGH-13434)
#14340
Answers checklist.
General issue report
If you want to make a custom network adaptor with ESP-NETIF, you need to implement three functions:
The signature of the transmit function is
esp_err_t esp_netif_transmit(esp_netif_t *esp_netif, void *data, size_t len)
. This function is called by the network stack. The implementation needs to transmit the data frame to the hardware.A problem I'm currently facing while implementing esp_netif_transmit, is that I need to prepend some headers to the data before transmitting it via DMA. Since I don't control which buffer I'm passed, I can't prepend the headers directly to the data, so I need to allocate a new, bigger buffer, add the headers and copy the data.
Is there a way to control which buffers are passed to esp_netif_transmit? That way I could add some headroom to the buffer.
Alternatively, is there a way to chain buffers before sending them to the 802.11 MAC TX slots? That way, I could have one DMA entry with the headers which points to the next one that has the data.
The text was updated successfully, but these errors were encountered: