zephyriot / zep-jira14

0 stars 0 forks source link

Split net_buf parsing context from the actual data #1683

Open nashif opened 7 years ago

nashif commented 7 years ago

Reported by Johan Hedberg:

To facilitate cheap clones of buffers, we need to split off the data part from the buffer context (meta-data) part. Since we don't want double the complexity of the memory management, the data part should probably be handled with the help of the existing memory pool API in Zephyr. The idea is to follow a similar design as Linux sk_buff, i.e. the data would be ref-counted and able to be referred to from multiple net_buf objects.

One of the requirements for buffer allocation is that it should be possible to happen from ISR context. This means that the memory pool implementation needs some changing to allow this, since right now ISR-based allocation is not possible.

(Imported from Jira ZEP-1835)

nashif commented 7 years ago

by ethan gao:

it's internal implementation optimization and mark it as "TestbyDev", thanks !

nashif commented 7 years ago

by Tomasz Bursztyka:

Taking the task, as discussed at Linaro connect event.

nashif commented 7 years ago

by Tomasz Bursztyka:

It is not exactly blocked by GH-1492, I could get something working with k_mem_slab, which is ISR proof.

nashif commented 7 years ago

by Tomasz Bursztyka:

not the split I did :) I mixed up. I did the net_nbuf split

nashif commented 7 years ago

by Mark Linkmeyer:

Johan Hedberg , what's the status of this story? Is it going to be completed before the merge window for 1.9 closes?

nashif commented 7 years ago

by Johan Hedberg:

I have some code in place, but it's been put aside because of my Bluetooth Mesh work. What's the current estimate of the 1.9 merge window closing?

nashif commented 7 years ago

by Mark Linkmeyer:

Johan Hedberg , the Feature Merge Window is planned to close in two weeks - by the end of ww32. See https://github.com/zephyrproject-rtos/zephyr/wiki/Program-Management#planned-trend-and-actual-dates.

nashif commented 7 years ago

by Andrei Laperie:

After discussion with Johan we decided to push this feature to 1.10. This is a nice-to-have feature but requires bit of preparations to become useful, especially if we want to have it for TCP/IP