How is the rx buffer of a custom i/o driver using esp_netif_receive() is freed?
Posted: Thu Sep 02, 2021 2:53 pm
Hi,
I'm writing a cdc ecm (Ethernet over USB) driver for the esp32s2 which is using the same esp-netif configuration as the native ethernet driver (ESP_NETIF_DEFAULT_ETH).
In the manual (https://docs.espressif.com/projects/esp ... river.html) is written:
Now I found that the function is never called. So I checked the native ethernet driver and it assigns NULL to esp_netif->driver_free_rx_buffer.
Now I suspect that the buffer is already freed in the lwip stack or in esp-netif. Is this correct?
I'm writing a cdc ecm (Ethernet over USB) driver for the esp32s2 which is using the same esp-netif configuration as the native ethernet driver (ESP_NETIF_DEFAULT_ETH).
In the manual (https://docs.espressif.com/projects/esp ... river.html) is written:
So I wrote the implementation to free the rx buffer and assigned it to the function pointer esp_netif->driver_free_rx_buffer.The first two functions for transmitting and freeing the rx buffer are provided as callbacks, i.e. they get called from esp-netif (and its underlying TCP/IP stack) and I/O driver provides their implementation.
Now I found that the function is never called. So I checked the native ethernet driver and it assigns NULL to esp_netif->driver_free_rx_buffer.
Now I suspect that the buffer is already freed in the lwip stack or in esp-netif. Is this correct?