netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: in-driver QoS
@ 2004-06-08 18:48 Jean Tourrilhes
       [not found] ` <1086722317.1023.18.camel@jzny.localdomain>
       [not found] ` <200406111619.40260.vkondra@mail.ru>
  0 siblings, 2 replies; 24+ messages in thread
From: Jean Tourrilhes @ 2004-06-08 18:48 UTC (permalink / raw)
  To: Vladimir Kondratiev, netdev

Vladimir Kondratiev wrote :
> 
> In 802.11 network, there is TGe (or 802.11e), working group, developing QoS 
> extensions for 802.11.

	802.11e is about prioritisation of the traffic, not QoS. QoS
is about bandwidth reservation and enforcement of policies, and
802.11e does none of that.

> Now, question is: how will we support these QoS features in network stack?

	Simple : Linux driver should always send traffic at the
highest priority, and never use the lowest priority. This way, we are
guaranteed to always get the highest performance, and get higher
benchmarks than Win32 or other OSes.

> skb->priority help determining Tx queue, but fundamental problem is with 
> single Tx queue from network stack.

	Andi already corrected you about the fact that the net layer
can offer multiple queue. If you look in .../net/sched/, you will see
that skb->priority is used intensively, even for the generic
scheduler. Most often, skb->priority is derived from sk->sk_priority,
which is the socket priority.

Andi Kleen wrote :
> It already has that kind of in the form of arbitary qdiscs. The trick
> will be only to do all queueing in the qdisc and keep the hardware
> queue length as small as possible.

	I fully agree with that statement. One of the advantage of TC
is that it enforces policies, which is more like real QoS.
	Note that the netdev queue is potentially larger than the
hardware queue, especially with the recent increase due to Gigabit
Ethernet, so there is more gain to be expected scheduling the netdev
queue than the hardware queue in case of congestion.

> Disadvantage will be more use of CPU time to refill driver
> queues.

	More precisely, you increase the Tx-done interrupt frequency,
so the number of context switches. The time to refill the queues
remain the same. But, interrupt mitigation seems like a good thing in
general.

> BTW the standard qdisc pfifo_fast already has three queues,
> selected by the old TOS.

	TOS is part of the IP header, and you don't want to read IP
headers in the link layer, it's a clear layer violation. I think using
skb->priority is a better way.

Vladimir Kondratiev wrote :
> 
> How could I use these multiple qdiscs?

	You need to enable "advanced router" in ***config and check
pointers in this excellent howto :
		http://linux-ip.net/html/index.html
		(see section I.1.12)

> I.e. I have 4 queues in the driver, I want to fill it separately,
> start/stop incoming queues from stack etc.

	The driver is not the one deciding the policy, the network
stack is. Therefore the driver accept whatever packet the network
scheduler decide to give it and store it in the most appropriate
queue (based on some meta-information such as skb->priority).
	This way the behavior of the driver is simple and predictable,
you don't need to implement intserv/diffserv in the driver, and you
can easily plug any scheduling you decide on top of it by
reconfiguring the network stack.

	Have fun...

	Jean

^ permalink raw reply	[flat|nested] 24+ messages in thread
* in-driver QoS
@ 2004-06-06 18:28 Vladimir Kondratiev
  2004-06-07 14:00 ` Andi Kleen
  0 siblings, 1 reply; 24+ messages in thread
From: Vladimir Kondratiev @ 2004-06-06 18:28 UTC (permalink / raw)
  To: netdev

I'd like to discuss issue with QoS.

In 802.11 network, there is TGe (or 802.11e), working group, developing QoS 
extensions for 802.11. This group's work is close to finish. Current draft 
should be very close to the final standard.

Currently, according to TGe, NIC will support 4 different priorities (or 
access categories). Let's say, 4 distinct Tx queues will be supported by NIC. 
Each Tx queue have its own parameters.

In addition, there are separate streams (TSPEC's) that should be requested, 
i.e. before use, some initiation procedure should be performed. Sure, there 
is tear down for TSPEC as well.

Roughly, 4 access categories corresponds to diffserv, while TSPEC's - to 
intserv.

Now, question is: how will we support these QoS features in network stack?

Let's start from diffserv, it is easier.

skb->priority help determining Tx queue, but fundamental problem is with 
single Tx queue from network stack. Any smart queuing/scheduling etc. made by 
driver, will render useless while network stack provides single Tx queue.

Any ideas how to modify stack to support multiple Tx queues?

Vladimir

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

end of thread, other threads:[~2004-06-15 16:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-08 18:48 in-driver QoS Jean Tourrilhes
     [not found] ` <1086722317.1023.18.camel@jzny.localdomain>
2004-06-08 19:52   ` Jean Tourrilhes
2004-06-08 20:55     ` jamal
2004-06-08 22:01       ` Jean Tourrilhes
2004-06-09  3:46         ` jamal
2004-06-09 17:40           ` Jean Tourrilhes
2004-06-10  1:47             ` jamal
2004-06-09  5:51       ` Vladimir Kondratiev
2004-06-09 11:20         ` jamal
2004-06-09 18:27           ` Vladimir Kondratiev
2004-06-10  1:59             ` jamal
2004-06-10  5:55               ` Vladimir Kondratiev
2004-06-11 12:17                 ` jamal
2004-06-10  2:45             ` Horms
     [not found] ` <200406111619.40260.vkondra@mail.ru>
     [not found]   ` <1086960639.1068.697.camel@jzny.localdomain>
2004-06-14 20:53     ` Vladimir Kondratiev
2004-06-15 12:26       ` jamal
2004-06-15 16:35         ` Vladimir Kondratiev
  -- strict thread matches above, loose matches on Subject: below --
2004-06-06 18:28 Vladimir Kondratiev
2004-06-07 14:00 ` Andi Kleen
2004-06-07 20:35   ` Vladimir Kondratiev
2004-06-07 22:59     ` Andi Kleen
2004-06-07 23:38     ` jamal
2004-06-08  5:41       ` Vladimir Kondratiev
2004-06-08 11:28         ` jamal

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).