ppisa commented on PR #17283:
URL: https://github.com/apache/nuttx/pull/17283#issuecomment-3495686616

   When I think about `CANIOC_SET_MSGALIGN` then the default value for newly 
open /dev/can should be 1 to match current NuttX CAN chardev API. The value 0 
should be used to switch multiple messages per single read or write off 
completely to make think more clean and switch off multiple messages in the 
single buffer simpler.
   
   Due to C89 requirements in common headers, the `CAN_SIZEALIGN(s, a)` has to 
be macro and has to be implemented by ternary operators.
   
   I like idea of this option to control multiple messages in the single read 
and or write so much, that I consider to return support of multiple messages 
per syscall even to our [RTEMS CAN 
FD](https://docs.rtems.org/docs/main/bsp-howto/can.html) subsystem 
implementation which has origin in LinCAN which has originally support for 
multiple messages per syscall but they have been aligned by full message size. 
If our RTEMS CAN FD subsystem would be ported to Linux again (which had in past 
and I believe would have much better [RT properties than 
SocketCAN](https://canbus.pages.fel.cvut.cz/#can-bus-channels-mutual-latency-testing))
 then there multiple messages per single syscall would have real value. On 
RTEMS and NuttX without MMU and real syscall, there would be no big difference. 
But for NuttX if MMU setup prevails one day it would be advantage as well.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to