netdev
[Top] [All Lists]

Re: Giving priority to messages

To: Ramón Agüero <ramon@xxxxxxxxxxxxxxx>
Subject: Re: Giving priority to messages
From: Andi Kleen <ak@xxxxxx>
Date: Wed, 20 Sep 2000 02:43:19 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <001801c02224$8fa07ac0$1bba90c1@tlmat.unican.es>; from ramon@tlmat.unican.es on Tue, Sep 19, 2000 at 12:34:31PM +0200
References: <001801c02224$8fa07ac0$1bba90c1@tlmat.unican.es>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, Sep 19, 2000 at 12:34:31PM +0200, Ramón Agüero wrote:
>     Hi all,
> 
>     I'm working within an application which creates packets and sends them. 
> To accomplish this I use the dev_queue_xmit function. At a fist stage, 
> everything runs OK, but I would like also to give priority to these messages, 
> in relation with other messages that the machine creates, so that they don't 
> have to wait.
> 
>     I would be pleased if you could tell me how to assign this priority. I'm 
> working with 2.2.14 kernel.
> 

You can set skb->priority to values between 0 and 15 
(see include/linux/pkt_sched.h)
What actually happens depends on the queueing discipline that is set for
the interface. The default one uses a 3 way pfifo, which maps 6 and 7
to the highest priority queue.

Usually this scheduling does not help much though, because the underlying
devices have a longer queue itself where the priorities are ignored
(e.g. bus mastering ethernet cards with big TX rings or worse a modem
that does v.42bis) 

-Andi

-- 
This is like TV. I don't like TV.

<Prev in Thread] Current Thread [Next in Thread>