Conversation
Replacing sizeof(...) macros when defines are anyway there and used in certain cases
This is to align with CAN implementation
The functionality is used to stall a module in case it is running out of buffers, potentially causing a reboot. Nevertheless, running out of buffers is a valid situation if a module is routing between two physical networks with different capatilities (e.g. CAN vs ETH).
Currently implemented for CAN, ETH and ZMQ
There is no need to try handling an ethernet frame that does not contain a valid CSP header
|
Johan states: |
|
I just tried Johans approach (which is significantly more elegant), but unfortunately it fails as most TX functions are synchronous and blocking the router thread. |
|
Aha! That in itself is an issue, so maybe we should quite early separate the routing queue and the incoming queue, and process the tx of routed traffic separately from incoming traffic. Incoming traffic probably doesnt even need a task to process it, because it can usually be placed into the correct queue immediately. |
|
I think Johans latest comment is reaching beyond the current requirements. As Johan states, most interface types rely on a task for for handling incoming messages, if not handled in an ISR. |
|
So what i am suggesting is to drop them before they arrive at the TX queue, in the csp_qfifo_write call. |
Most commits will be squashed prior to merge
A few commits are not directly related to this improvements, those will go as is.