]> git.baikalelectronics.ru Git - kernel.git/commit
can: raw: add missing error queue support
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Sat, 26 Sep 2020 16:24:31 +0000 (01:24 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 6 Oct 2020 20:44:27 +0000 (22:44 +0200)
commitcc6d3482bf102e4a3b69e8bcd48cec53febe4f6e
treed843b06c739fdb711ce558ae1851d40caa90b737
parentb950d5585ce53fa6c28cf70cb030c3c33d53203b
can: raw: add missing error queue support

Error queue are not yet implemented in CAN-raw sockets.

The problem: a userland call to recvmsg(soc, msg, MSG_ERRQUEUE) on a
CAN-raw socket would unqueue messages from the normal queue without
any kind of error or warning. As such, it prevented CAN drivers from
using the functionalities that relies on the error queue such as
skb_tx_timestamp().

SCM_CAN_RAW_ERRQUEUE is defined as the type for the CAN raw error
queue. SCM stands for "Socket control messages". The name is inspired
from SCM_J1939_ERRQUEUE of include/uapi/linux/can/j1939.h.

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20200926162527.270030-1-mailhol.vincent@wanadoo.fr
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/uapi/linux/can/raw.h
net/can/raw.c