Netdev List
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, linux-can@vger.kernel.org,
	kernel@pengutronix.de, Rostislav Lisovy <lisovy@gmail.com>,
	Michal Sojka <sojkam1@fel.cvut.cz>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 2/3] can: Propagate SO_PRIORITY of raw sockets to skbs
Date: Wed, 29 Jan 2014 22:11:02 +0100	[thread overview]
Message-ID: <1391029863-23099-3-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1391029863-23099-1-git-send-email-mkl@pengutronix.de>

From: Rostislav Lisovy <lisovy@gmail.com>

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>
---
 net/can/raw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/can/raw.c b/net/can/raw.c
index 07d72d8..8be757c 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -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);
 
-- 
1.8.5.3

  parent reply	other threads:[~2014-01-29 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 21:11 pull-request: can 2014-01-29 Marc Kleine-Budde
2014-01-29 21:11 ` [PATCH 1/3] can: flexcan: fix flexcan driver build for big endian on ARM and little endian on PowerPc Marc Kleine-Budde
2014-01-29 21:11 ` Marc Kleine-Budde [this message]
2014-01-29 21:11 ` [PATCH 3/3] can: janz-ican3: fix uninitialized variable warnings Marc Kleine-Budde
2014-01-31  0:49 ` pull-request: can 2014-01-29 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391029863-23099-3-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=lisovy@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sojkam1@fel.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox