diff options
| author | Dirk Ziegelmeier <[email protected]> | 2018-01-02 08:40:23 +0100 |
|---|---|---|
| committer | Dirk Ziegelmeier <[email protected]> | 2018-01-02 08:40:23 +0100 |
| commit | c20d50acecd4bfc358a3ebfa336d4ed067f5c592 (patch) | |
| tree | eb7e41ef5cd8d510531a242efdfd0566a6a2725b /doc | |
| parent | 6c7e7153bc7ea563cfe569802822fedb02076a8a (diff) | |
Update cache handling in ZeroCopyRx.c - invalidate is faster than flushing
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/ZeroCopyRx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/ZeroCopyRx.c b/doc/ZeroCopyRx.c index e8bda20f..0e8219bd 100644 --- a/doc/ZeroCopyRx.c +++ b/doc/ZeroCopyRx.c @@ -12,8 +12,9 @@ void my_pbuf_free_custom(void* 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); + // invalidate data cache here - lwIP and/or application may have written into buffer! + // (invalidate is faster than flushing, and noone needs the correct data in the buffer) + invalidate_cpu_cache(p->payload, p->tot_len); SYS_ARCH_PROTECT(old_level); free_rx_dma_descriptor(my_pbuf->dma_descriptor); |
