zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.8k stars 6.58k forks source link

Rename net_buf to something more generic and move it outside of net/ #36374

Closed jhedberg closed 1 month ago

jhedberg commented 3 years ago

Networking buffers is a separate subsystem with no dependency on networking itself. This implementation was originally created for Bluetooth and called bt_buf back then. Once work started to create a networking stack for Zephyr it made sense to reuse the buffer implementation, but Networking depending on something called bt_buf didn't feel right. Consequently, the implementation was renamed to net_buf and moved under net/ due to its namespace.

There are a couple of issues with the current situation:

It would therefore make sense to consider renaming the subsystem and API to something more generic, and the natural choice for that would be sys_buf (based on current Zephyr naming guidelines).

tbursztyka commented 3 years ago

sys_buf or zbuf, etc... seems like a legitimate change indeed.

nashif commented 5 months ago

Can we revive this please? @jhedberg @carlescufi What needs to be done here?

rodrigopex commented 5 months ago

I support that. I used net_buf on the zbus implementation. It saved a lot of work for me.

bjarki-andreasen commented 5 months ago

+1 to sys_buf :)

nashif commented 5 months ago

from wg meeting:

Actions:

hubertmis commented 5 months ago

Good initiative!

There is also an opportunity to use net_buf in IPC for a zero-copy data plane.

nashif commented 1 month ago

@jhedberg do we want to move this forward?

henrikbrixandersen commented 1 month ago

@jhedberg do we want to move this forward?

I am actually working on a PR for this just now.