Subject: Re: taprio testing - Any help?

From: Vinicius Costa Gomes <[email-masked]>
Date: Fri, 11 Oct 2019 14:26:55 -0700

Hi,

Murali Karicheri <[email-masked]> writes:

> Hi Vinicius,
>
> On 10/11/2019 04:12 PM, Vinicius Costa Gomes wrote:
>> Hi Murali,
>> 
>> Murali Karicheri <[email-masked]> writes:
>> 
>>> Hi,
>>>
>>> I am testing the taprio (802.1Q Time Aware Shaper) as part of my
>>> pre-work to implement taprio hw offload and test.
>>>
>>> I was able to configure tap prio on my board and looking to do
>>> some traffic test and wondering how to play with the tc command
>>> to direct traffic to a specfic queue. For example I have setup
>>> taprio to create 5 traffic classes as shows below;-
>>>
>>> Now I plan to create iperf streams to pass through different
>>> gates. Now how do I use tc filters to mark the packets to
>>> go through these gates/queues? I heard about skbedit action
>>> in tc filter to change the priority field of SKB to allow
>>> the above mapping to happen. Any example that some one can
>>> point me to?
>> 
>> What I have been using for testing these kinds of use cases (like iperf)
>> is to use an iptables rule to set the priority for some kinds of traffic.
>> 
>> Something like this:
>> 
>> sudo iptables -t mangle -A POSTROUTING -p udp --dport 7788 -j CLASSIFY --set-class 0:3
> Let me try this. Yes. This is what I was looking for. I was trying
> something like this and I was getting an error
>
> tc filter add  dev eth0 parent 100: protocol ip prio 10 u32 match ip 
> dport 10000 0xffff flowid 100:3
> RTNETLINK answers: Operation not supported
> We have an error talking to the kernel, -1

Hmm, taprio (or mqprio for that matter) doesn't support tc filter
blocks, so this won't work for those qdiscs.

I never thought about adding support for it, it looks very interesting.
Thanks for pointing this out. I will add this to my todo list, but
anyone should feel free to beat me to it :-)

Cheers,
--
Vinicius