Subject: Re: [RFC PATCH v1] iproute2: add IFLA_TC support to 'ip link'

From: jamal <[email-masked]>
Date: Thu, 02 Dec 2010 05:40:28 -0500

On Wed, 2010-12-01 at 10:27 -0800, John Fastabend wrote:
> Add support to return IFLA_TC qos settings to the 'ip link'
> command. The following sets the number of traffic classes
> supported in HW and builds a priority map.
> 
> #ip link set eth3 tc num 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0
> 
> With the output from 'ip link' showing maps for interfaces with
> the ability to use HW traffic classes.

2 comments apply to the kernel patches as well - but easier to point
out here.

1) IMO, this looks like the wrong interface to use. 
Was there any reason not to use tc and instead having it show
itself embedded within "ip" abstraction? 
Example, this would suit your intent:
tc qdisc add dev eth3 hware-kinda-8021q-sched num 8 map blah bleh

You can then modify individual classes of traffic with "tc class".

[There are plenty of other chips (switching chips for example) that
implement a variety different hardware schedulers, hence the
"hardware-kinda-8021q-sched" above]

2) How does this mapping in hardware correlate to the software side
mapping? When packets of class X make it off the hardware and hit
the stack are they still going to get the same treatment as they
would have in h/ware?

cheers,
jamal