mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
Add flushing CPU cache to zero-copy RX code example
This commit is contained in:
parent
27ca731242
commit
e77099673c
@ -12,6 +12,9 @@ void my_pbuf_free_custom(void* p)
|
|||||||
|
|
||||||
my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p;
|
my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p;
|
||||||
|
|
||||||
|
// flush data cache here - lwIP and/or application may have written into buffer!
|
||||||
|
flush_cpu_cache(p->payload, p->tot_len);
|
||||||
|
|
||||||
SYS_ARCH_PROTECT(old_level);
|
SYS_ARCH_PROTECT(old_level);
|
||||||
free_rx_dma_descriptor(my_pbuf->dma_descriptor);
|
free_rx_dma_descriptor(my_pbuf->dma_descriptor);
|
||||||
LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf);
|
LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user