can: j1939: extend UAPI to notify about RX status
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 7 Jul 2021 09:48:54 +0000 (11:48 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Aug 2021 10:11:52 +0000 (12:11 +0200)
commit5b9272e93f2efe3f6cda60cc2c26817b2ce49386
tree0e4ac639ef0060b0e58b28f9e7421fea7fc1d816
parentcd85d3aed5cf4410e42ea404db0abb648b296391
can: j1939: extend UAPI to notify about RX status

To be able to create applications with user friendly feedback, we need be
able to provide receive status information.

Typical ETP transfer may take seconds or even hours. To give user some
clue or show a progress bar, the stack should push status updates.
Same as for the TX information, the socket error queue will be used with
following new signals:
- J1939_EE_INFO_RX_RTS   - received and accepted request to send signal.
- J1939_EE_INFO_RX_DPO   - received data package offset signal
- J1939_EE_INFO_RX_ABORT - RX session was aborted

Instead of completion signal, user will get data package.
To activate this signals, application should set
SOF_TIMESTAMPING_RX_SOFTWARE to the SO_TIMESTAMPING socket option. This
will avoid unpredictable application behavior for the old software.

Link: https://lore.kernel.org/r/20210707094854.30781-3-o.rempel@pengutronix.de
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/uapi/linux/can/j1939.h
net/can/j1939/j1939-priv.h
net/can/j1939/socket.c
net/can/j1939/transport.c