]> git.baikalelectronics.ru Git - kernel.git/commit
can: dev: extend struct can_skb_priv to hold CAN frame length
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 11 Jan 2021 14:19:26 +0000 (15:19 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 14 Jan 2021 07:43:42 +0000 (08:43 +0100)
commitf8932da9ab39dcc4708f40981a6b0d6be80890b8
tree40fbc46bccc61acf0bee154a2ad645a52451fa9c
parentda609e43ef9c23f95d5ebc10423c5fb2331c286d
can: dev: extend struct can_skb_priv to hold CAN frame length

In order to implement byte queue limits (bql) in CAN drivers, the length of the
CAN frame needs to be passed into the networking stack after queueing and after
transmission completion.

To avoid to calculate this length twice, extend the struct can_skb_priv to hold
the length of the CAN frame and extend __can_get_echo_skb() to return that
value.

Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20210111141930.693847-12-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev/rx-offload.c
drivers/net/can/dev/skb.c
include/linux/can/skb.h