Commit bb5ecb0c authored by Rostislav Lisovy's avatar Rostislav Lisovy Committed by Marc Kleine-Budde

can: Propagate SO_PRIORITY of raw sockets to skbs

This allows controlling certain queueing disciplines by setting the
socket's SO_PRIORITY option.

For example, with the default pfifo_fast queueing discipline, which
provides three priorities, socket priority TC_PRIO_CONTROL means
higher than default and TC_PRIO_BULK means lower than default.
Signed-off-by: default avatarRostislav Lisovy <lisovy@gmail.com>
Signed-off-by: default avatarMichal Sojka <sojkam1@fel.cvut.cz>
Acked-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 0e4b949e
...@@ -715,6 +715,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -715,6 +715,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
skb->dev = dev; skb->dev = dev;
skb->sk = sk; skb->sk = sk;
skb->priority = sk->sk_priority;
err = can_send(skb, ro->loopback); err = can_send(skb, ro->loopback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment