diff --git a/include/zephyr/sys/spsc_pbuf.h b/include/zephyr/sys/spsc_pbuf.h index 0e7f018fa63..a65d15cc5c4 100644 --- a/include/zephyr/sys/spsc_pbuf.h +++ b/include/zephyr/sys/spsc_pbuf.h @@ -25,7 +25,11 @@ extern "C" { * @{ */ -/** @brief Flag indicating that cache shall be handled. */ +/** @brief Flag indicating that cache shall be handled. + * + * It shall be used only when packet buffer is shared between two cores as on a single + * core cache shall not be handled manually because it results in data corruption. + */ #define SPSC_PBUF_CACHE BIT(0) /** @brief Size of the field which stores maximum utilization. */ diff --git a/lib/os/Kconfig b/lib/os/Kconfig index fa52338e525..9ce3be2a66e 100644 --- a/lib/os/Kconfig +++ b/lib/os/Kconfig @@ -60,7 +60,9 @@ config SPSC_PBUF_CACHE_ALWAYS bool "Always handle cache" help Handle cache writeback and invalidation for all instances. Option used - to avoid runtime check and thus reduce memory footprint. + to avoid runtime check and thus reduce memory footprint. Beware! It shall + be used only if all packet buffer instances are used for data sharing + between cores. config SPSC_PBUF_CACHE_NEVER bool "Never handle cache"