History

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.

Vincent Mailhol committed 6 years ago

Commit eb885311 parent d61469d2 files · +7 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/can/raw.h+3−0
@@ -49,6 +49,9 @@ · 48 unmodified lines
49#include <linux/can.h>49#include <linux/can.h>
50 50
51#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)51#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
52enum {
53 SCM_CAN_RAW_ERRQUEUE = 1,
54};
52 55
53/* for socket options affecting the socket (not the global system) */56/* for socket options affecting the socket (not the global system) */
54 57