Skip to contentSkip to conversation

in-driver QoS

DISCUSSION Vladimir Kondratiev 3 participants 7 messages Jun 6, 2004 – Jun 8, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 1 line

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

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 think today's drivers can do that already by just plugging the queue most of the time, unless they really want a packet.

Disadvantage will be more use of CPU time to refill driver queues, but at the relatively slow WLAN speeds that shouldn't be a big issue.

BTW the standard qdisc pfifo_fast already has three queues, selected by the old TOS. That may even be good enough for you already. Users can fine tune it by using firewall rules that change the TOS for specific protocols etc.

-Andi

#2 lore raw

How could I use these multiple qdiscs? If I use existing driver framework, I have hard_start_xmit, that represent single queue. Do you have any examples how driver can access qdiscs directly? I.e. I have 4 queues in the driver, I want to fill it separately, start/stop incoming queues from stack etc.

Note also, we are talking about 100Mbps above MAC, which translates to about 150 Mbps, within next 2 years. 100Mbps above MAC is criteria for TGn working group in IEEE (high throughput).

Vladimir.

Quoted 18 lines · Andi Kleen
Quoted 1 line

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

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 think today's drivers can do that already by just plugging the queue most of the time, unless they really want a packet.

Disadvantage will be more use of CPU time to refill driver queues, but at the relatively slow WLAN speeds that shouldn't be a big issue.

BTW the standard qdisc pfifo_fast already has three queues, selected by the old TOS. That may even be good enough for you already. Users can fine tune it by using firewall rules that change the TOS for specific protocols etc.

-Andi

#3 lore raw
Quoted 4 lines · On Mon, 7 Jun 2004 23:35:04 +0300 Vladimir Kondratiev <[email protected]> wrote:

How could I use these multiple qdiscs? If I use existing driver framework, I have hard_start_xmit, that represent single queue. Do you have any examples how driver can access qdiscs directly? I.e. I have 4 queues in the driver, I want to fill it separately, start/stop incoming queues from stack etc.

Normally it would be configured by the user tools (using tc)

-Andi

#4 lore raw
In reply to Vladimir Kondratiev
Quoted 4 lines · Vladimir Kondratiev

How could I use these multiple qdiscs? If I use existing driver framework, I have hard_start_xmit, that represent single queue. Do you have any examples how driver can access qdiscs directly? I.e. I have 4 queues in the driver, I want to fill it separately, start/stop incoming queues from stack etc.

Maybe you can explain a little more: Do these 4 queues translate to 4 DMA rings or channles on the NIC? Could you not use a tag like fwmark to select DMA to send to?
Explain the packet path once it hits the driver.

Quoted 3 lines

Note also, we are talking about 100Mbps above MAC, which translates to about 150 Mbps, within next 2 years. 100Mbps above MAC is criteria for TGn working group in IEEE (high throughput).

Are these wireless NICs? Whats the big deal about 150Mbps?

cheers,
jamal

#5 lore raw
Quoted 8 lines · jamal
Quoted 5 lines · Vladimir Kondratiev

How could I use these multiple qdiscs? If I use existing driver framework, I have hard_start_xmit, that represent single queue. Do you have any examples how driver can access qdiscs directly? I.e. I have 4 queues in the driver, I want to fill it separately, start/stop incoming queues from stack etc.

Maybe you can explain a little more: Do these 4 queues translate to 4

Exactly

Quoted 3 lines

DMA rings or channles on the NIC? Could you not use a tag like fwmark to select DMA to send to?
Explain the packet path once it hits the driver.

Let's put aside integrated service. For diff serv,
NIC have 4 DMA queues. These 4 queues acts as 4 independent 802.11 channels with different backoff and contention window parameters. Actually, it is dictated by TGe, and should be common for wireless stack. Queue consumption depends on conditions on air and access point settings. Access point set these different parameters for queues, and may change it time to time.

I think it would be not good to rely on 'tc' to provide proper mix of packets. Meanwhile, it is what I use, but it is not proper solution.

Quoted 6 lines
Quoted 4 lines

Note also, we are talking about 100Mbps above MAC, which translates to about 150 Mbps, within next 2 years. 100Mbps above MAC is criteria for TGn working group in IEEE (high throughput).

Are these wireless NICs? Whats the big deal about 150Mbps?

Nothing special, but Andi mentioned that ...

Quoted 3 lines

Disadvantage will be more use of CPU time to refill driver queues, but at the relatively slow WLAN speeds that shouldn't be a big issue.

... and I want to note that it is not very slow network.

Vladimir.

#6 lore raw
Quoted 10 lines · Vladimir Kondratiev
Quoted 3 lines

DMA rings or channles on the NIC? Could you not use a tag like fwmark to select DMA to send to?
Explain the packet path once it hits the driver.

Let's put aside integrated service. For diff serv,
NIC have 4 DMA queues. These 4 queues acts as 4 independent 802.11 channels with different backoff and contention window parameters. Actually, it is dictated by TGe, and should be common for wireless stack. Queue consumption depends on conditions on air and access point settings. Access point set these different parameters for queues, and may change it time to time.

Ok, Now that you explain this i dont think other people understood you when you started talking about qos. We have discussed this topic on netdev before under differnt context.

So the 4 DMA queues are infact different QoS levels? Another way to use multiple tx DMA channels is to parallelize sending. Are there multiple receive channels as well?
BTW, what is TGe?

The only obstacle i see at the moment in the architecture is we stop the transmit path if a DMA ring is full. That is making assumption there is only one DMA path. To work around this you could have 4 independent virtual netdevices on top of the real physical device - something like a tamed down bonding driver; this is not a very good abstraction because there is only one physical MAC.
Another scheme is to mark the fwmark or priority with the right DMA path selection. Once it gets to the driver you try to send to the correct ring and if thats full, you go to the next lower priority ring etc and when theres no more DMA paths left you drop. The disadvantage with such a scheme is complexity in keeping track of busy DMA paths.

I am trying to think of a clean way - maybe i need to get some caffeine first. Jeff? Andi?

cheers,
jamal