Linux CAN drivers development
 help / color / mirror / Atom feed
* J1939: Send messages without acknowledging
@ 2022-10-17 14:55 Sebastien FABRE
  2022-10-17 19:48 ` Patrick Menschel
  2022-10-18 11:00 ` Marc Kleine-Budde
  0 siblings, 2 replies; 7+ messages in thread
From: Sebastien FABRE @ 2022-10-17 14:55 UTC (permalink / raw)
  To: linux-can@vger.kernel.org

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 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-24 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 14:55 J1939: Send messages without acknowledging Sebastien FABRE
2022-10-17 19:48 ` Patrick Menschel
2022-10-18 11:00 ` Marc Kleine-Budde
2022-10-20 13:17   ` Sebastien FABRE
2022-10-21 13:44     ` Oleksij Rempel
2022-10-24 16:15       ` Sebastien FABRE
2022-10-24 16:55         ` Oleksij Rempel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox