Skip to content

Commit bb5ecb0

Browse files
lisovymarckleinebudde
authored andcommitted
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: Rostislav Lisovy <lisovy@gmail.com> Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 0e4b949 commit bb5ecb0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎net/can/raw.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,
715715

716716
skb->dev = dev;
717717
skb->sk = sk;
718+
skb->priority = sk->sk_priority;
718719

719720
err = can_send(skb, ro->loopback);
720721

0 commit comments

Comments
 (0)