Subject: Re: [RFC PATCH] net: add a rate_limit attribute to netdev_queue and a rtnetlink

From: Jamal Hadi Salim <[email-masked]>
Date: Sun, 14 Jul 2013 13:44:12 -0400

On 13-07-10 11:10 PM, John Fastabend wrote:

>
>> Will this be usable in the case that more than one queue shares a rate?
>
> Here I must not understand the question. Each queue has independent
> rate limiters. At least in the hardware supported by ixgbe. Maybe
> other hardware has a different implementation?
>

I think Tom might be alluding to scenarios where a rate (as a resource)
is shared by multiple ingress as well as egress interfaces (in your case
queues). This is a very popular use case with tc (in particular in
conjunction with IFB).
In such a case, the rate by itself would need to modeled as an indexable 
attribute.

Some hardware (example modern broadcom switching chips, maybe yours)
are not capable; So the index would have local semantics as in your 
case. But I know hardware that does support shared rates.
Maybe you could come up with IFLA_QUEUE_RATE_LOCAL vs
IFLA_QUEUE_RATE_GLOBAL which will encapsulate a global index
for the shared rate.

cheers,
jamal