Skip to content

Conversation

@zhhyu7
Copy link
Contributor

@zhhyu7 zhhyu7 commented Dec 6, 2025

Summary

This interface allows different protocol modules to use their own unique IOB buffer sources and allocation strategies without interfering with each other. Representative examples are the IP protocol and the CAN protocol. The IP protocol generally transmits packets of varying lengths and requires relatively high peak throughput. In this case, to ensure higher performance, IOB_BUFSIZE is often configured to be relatively large, such as greater than
500. The CAN protocol generally transmits short packets of fixed length. In this case, to improve memory utilization, IOB_BUFSIZE is often configured to be relatively small, such as 16 or 64. To optimize the memory utilization when the IP protocol and the CAN protocol share the same core, this interface was added.

Impact

Added an IOB allocation interface, The IOB allocated by this interface can flow and be release between the protocol stack and the network card driver just like a regular IOB.

Testing

sim:matter
Added test code in arch/sim/src/sim/sim_netdriver.c to use a fixed buffer list as IOB to test this interface, and both ping and iperf can communicate normally.

@github-actions github-actions bot added Area: Memory Management Memory Management issues Size: S The size of the change in this PR is small labels Dec 6, 2025
xiaoxiang781216
xiaoxiang781216 previously approved these changes Dec 6, 2025
acassis

This comment was marked as outdated.

Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhhyu7 I think it requires to update the Documentation https://nuttx.apache.org/docs/latest/components/mm/index.html#i-o-buffers to include this new IOB initialization. Otherwise it will be Another Hidden Feature of NuttX (AHFN).

@zhhyu7
Copy link
Contributor Author

zhhyu7 commented Dec 8, 2025

@zhhyu7 I think it requires to update the Documentation https://nuttx.apache.org/docs/latest/components/mm/index.html#i-o-buffers to include this new IOB initialization. Otherwise it will be Another Hidden Feature of NuttX (AHFN).

OK, I will update the Documentation.

…ructure

This interface allows different protocol modules to use their own unique IOB
buffer sources and allocation strategies without interfering with each other.
Representative examples are the IP protocol and the CAN protocol. The IP
protocol generally transmits packets of varying lengths and requires
relatively high peak throughput. In this case, to ensure higher performance,
IOB_BUFSIZE is often configured to be relatively large, such as greater than
500. The CAN protocol generally transmits short packets of fixed length.
In this case, to improve memory utilization, IOB_BUFSIZE is often configured
to be relatively small, such as 16 or 64. To optimize the memory utilization
when the IP protocol and the CAN protocol share the same core,
this interface was added.

Signed-off-by: zhanghongyu <[email protected]>
@zhhyu7
Copy link
Contributor Author

zhhyu7 commented Dec 8, 2025

@zhhyu7 I think it requires to update the Documentation https://nuttx.apache.org/docs/latest/components/mm/index.html#i-o-buffers to include this new IOB initialization. Otherwise it will be Another Hidden Feature of NuttX (AHFN).

Done.

@github-actions github-actions bot added the Area: Documentation Improvements or additions to documentation label Dec 8, 2025
@xiaoxiang781216
Copy link
Contributor

@zhhyu7 I think it requires to update the Documentation https://nuttx.apache.org/docs/latest/components/mm/index.html#i-o-buffers to include this new IOB initialization. Otherwise it will be Another Hidden Feature of NuttX (AHFN).

@acassis could you review again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Area: Memory Management Memory Management issues Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants