]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: raw: add support for SO_TXTIME/SCM_TXTIME
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 21 Apr 2022 10:31:52 +0000 (12:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2024 17:51:13 +0000 (18:51 +0100)
commit464fb49ca9bb4c48ac48b389096ad4358f6ca376
treef256254ca15d38d6a68da033d7520faf389045ed
parentba80ff7a85b663640aa4da2a5000b810a817c9ff
can: raw: add support for SO_TXTIME/SCM_TXTIME

[ Upstream commit 51a0d5e51178fcd147c1b8fdab2ed16b561326db ]

This patch calls into sock_cmsg_send() to parse the user supplied
control information into a struct sockcm_cookie. Then assign the
requested transmit time to the skb.

This makes it possible to use the Earliest TXTIME First (ETF) packet
scheduler with the CAN_RAW protocol. The user can send a CAN_RAW frame
with a TXTIME and the kernel (with the ETF scheduler) will take care
of sending it to the network interface.

Link: https://lore.kernel.org/all/20220502091946.1916211-3-mkl@pengutronix.de
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Stable-dep-of: 7f6ca95d16b9 ("net: Implement missing getsockopt(SO_TIMESTAMPING_NEW)")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/can/raw.c