linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs
@ 2014-01-24 12:17 Michal Sojka
  2014-01-24 20:12 ` Oliver Hartkopp
  2014-01-27  9:21 ` Marc Kleine-Budde
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Sojka @ 2014-01-24 12:17 UTC (permalink / raw)
  To: linux-can; +Cc: Marc Kleine-Budde, lisovy, Michal Sojka

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

diff --git a/net/can/raw.c b/net/can/raw.c
index 641e1c8..01c5fbf 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -716,6 +716,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.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs
  2014-01-24 12:17 [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs Michal Sojka
@ 2014-01-24 20:12 ` Oliver Hartkopp
  2014-01-27  9:21 ` Marc Kleine-Budde
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2014-01-24 20:12 UTC (permalink / raw)
  To: Michal Sojka, linux-can; +Cc: Marc Kleine-Budde, lisovy



On 24.01.2014 13:17, Michal Sojka wrote:
> 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>

Tnx Rostislav

> ---
>  net/can/raw.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/can/raw.c b/net/can/raw.c
> index 641e1c8..01c5fbf 100644
> --- a/net/can/raw.c
> +++ b/net/can/raw.c
> @@ -716,6 +716,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);
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs
  2014-01-24 12:17 [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs Michal Sojka
  2014-01-24 20:12 ` Oliver Hartkopp
@ 2014-01-27  9:21 ` Marc Kleine-Budde
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2014-01-27  9:21 UTC (permalink / raw)
  To: Michal Sojka, linux-can; +Cc: lisovy

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]

On 01/24/2014 01:17 PM, Michal Sojka wrote:
> 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>

Applied to can.

Tnx,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-27  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-24 12:17 [PATCH] can: Propagate SO_PRIORITY of raw sockets to skbs Michal Sojka
2014-01-24 20:12 ` Oliver Hartkopp
2014-01-27  9:21 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).