Date
1 - 3 of 3
net_buf: non-atomic reference counting
Darryl Gamroth
Hi all,
I was looking at using net_bufs for an application broadcasting reference counted buffers to multiple threads and I noticed the reference counting is not atomic. I'm curious, is this by design? Thanks.
|
|
Jukka Rissanen
Hi Darryl,
toggle quoted messageShow quoted text
I think it is more of a historical relic than a purpose design. There has not been any reports that this have caused issues. Patches are welcome of course. Cheers, Jukka
On Sun, 2020-03-22 at 17:39 -0700, Darryl Gamroth wrote:
Hi all,
|
|
Paul Sokolovsky
Hello,
On Tue, 24 Mar 2020 11:25:48 +0200 "Jukka Rissanen" <jukka.rissanen@linux.intel.com> wrote: Hi Darryl,Perhaps it could be rephrased differently: net_buf is more like Zephyr's internal system object. Where it's used currently, thread synchronization is expected(*) to happen on different level(s), and net_buf itself is kept lightweight and optimized. Perhaps that can be changed, but effects on existing subsystems using net_buf should be considered. (*) That doesn't mean there're no bugs, so reproducible bugreports are welcome.
-- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog
|
|