J1939: Send messages without acknowledging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am working on 5.4 kernel, and I have the same behavior with 5.10 kernel version.
I reproduce the behavior with a custom application. A j1939 socket is created with SO_BROADCAST and SO_J1939_PROMISC options and is binded. The application sends a claim message then 50 broadcast messages in loop (without waiting) with size greater than 8 bytes (50).

Every sendto methods return success directly and sessions are stored in sk_session_queue.
If the can is 'on' but nobody acknowledges, after some times, trames are no longer sent (ENOBUFS) but the application does not have this information (sendto returned success).
Moreover, txqueuelen does not have impact to this behavior (queue size seems to be infinite).
To finish, closing socket will take a long time depending on sk_session_queue size because of J1939_XTP_TX_RETRY_LIMIT: kernel seems to try to send every message 100 times if ENOBUFS is received.

Is it the expected behavior? How can the application know that messages are no longer sent? 

Best regards,
Sébastien Fabre 





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux