Skip to content

Commit

Permalink
can: Propagate SO_PRIORITY of raw sockets to skbs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Michal Sojka <[email protected]>
Acked-by: Oliver Hartkopp <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
lisovy authored and marckleinebudde committed Jan 29, 2014
1 parent 0e4b949 commit bb5ecb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/can/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock,

skb->dev = dev;
skb->sk = sk;
skb->priority = sk->sk_priority;

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

Expand Down

0 comments on commit bb5ecb0

Please sign in to comment.