On 28.04.21 13:43, Sottas Guillaume (LMB) wrote:
Hello, First of all thank you for your fast reply. From my point of view, I think it would make sense to return an error to the user when CAN_ISOTP_WAIT_TX_DONE option is set. Otherwise, I don't understand the use case of this option? If the CAN_ISOTP_WAIT_TX_DONE option is not set, then not receiving an error on timeout could be the expected behavior, as the user does not explicitly ask for completion. Concerning the way of reporting the error, setting the errno would be a nice solution, as it would not require that much modifications. However, as Mark mentioned, the errno is not set. I'm not an expert in how this sk_error_report works internally, but I will try to get more infos about it. In both cases, the documentation in the isotp.c (https://elixir.bootlin.com/linux/latest/source/net/can/isotp.c#L7) file is not correct, as it is not the actual behavior (most likely the expected). Additionally, I guess the -ETIMEOUT, -EILSEQ, -EBADMSG,... described in the same documentation are most likely not working that way either, but would be fixed if the errno is reported correctly.
Yep. The sk_error reporting is obviously not the way to go. See: https://lore.kernel.org/linux-can/ee8058e0-af0a-8759-a62b-b1585c8992b3@xxxxxxxxxxxx/ Best regards, Oliver