1
0
Fork 0
remarkable-linux/net/can
Oliver Hartkopp 153fa24b8f can: replace timestamp as unique skb attribute
commit d3b58c47d3 upstream.

Commit 514ac99c64 "can: fix multiple delivery of a single CAN frame for
overlapping CAN filters" requires the skb->tstamp to be set to check for
identical CAN skbs.

Without timestamping to be required by user space applications this timestamp
was not generated which lead to commit 36c01245eb "can: fix loss of CAN frames
in raw_rcv" - which forces the timestamp to be set in all CAN related skbuffs
by introducing several __net_timestamp() calls.

This forces e.g. out of tree drivers which are not using alloc_can{,fd}_skb()
to add __net_timestamp() after skbuff creation to prevent the frame loss fixed
in mainline Linux.

This patch removes the timestamp dependency and uses an atomic counter to
create an unique identifier together with the skbuff pointer.

Btw: the new skbcnt element introduced in struct can_skb_priv has to be
initialized with zero in out-of-tree drivers which are not using
alloc_can{,fd}_skb() too.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-10 12:21:51 -07:00
..
Kconfig can: Kconfig: switch on all CAN protocolls by default 2013-01-26 16:58:58 +01:00
Makefile can-gw: add netlink based CAN routing 2011-09-16 17:37:51 -04:00
af_can.c can: replace timestamp as unique skb attribute 2015-08-10 12:21:51 -07:00
af_can.h can: add hash based access to single EFF frame filters 2014-05-19 09:38:24 +02:00
bcm.c can: replace timestamp as unique skb attribute 2015-08-10 12:21:51 -07:00
gw.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
proc.c can: add hash based access to single EFF frame filters 2014-05-19 09:38:24 +02:00
raw.c can: replace timestamp as unique skb attribute 2015-08-10 12:21:51 -07:00