PetervdPerk-NXP commented on PR #6834: URL: https://github.com/apache/incubator-nuttx/pull/6834#issuecomment-1211874042
IOB is shared mechanism used for different stacks. So on a multi-stack system where `CONFIG_IOB_HEADSIZE>0` all stacks are affected, maybe this is even a design limitation of the current IOB design. And could use some refactoring/redesign. But for the moment isn't there any way to introduce user storage for iob without affecting all the iob's? A rough idea from my side would just be using an union exclusively for the TCP side and not affect the others i.e. And just the pointer when using it in the TCP stack ``` union iob_s_tcp_playload{ uint_ptr user; uint8_t io_data[CONFIG_IOB_BUFSIZE-sizeof(uint_ptr)]; } iob_s_tcp_playload; iob_s_tcp_playload* tcp_iob = (iob_s_tcp_playload*)(&iob_s.io_data); struct custom_struct = (struct custom_struct*)tcp_iob.user; memcpy(dst, &tcp_io.iodata[0], sizeof(iob_s_tcp_playload.io_data)); ``` If you guys could share the TCP changes that need this I can give better input on this dicussion, or maybe include this change with this TCP change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org