Re: [PATCH v3 net-next 09/10] selftests/tc-testing: test that taprio can only be attached as root

Vladimir Oltean
2023-08-07T19:06:21Z

On Thu, Aug 03, 2023 at 11:43:16AM -0700, Vinicius Costa Gomes wrote:
> Hmmm, I think that this test discovered another bug (perhaps even two).
> When it fails here's the json I get (edited for clarity):
>
> [{"kind":"taprio","handle":"8001:","root":true,"refcnt":9,
> "options":{
> "tc":0,
> "map":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
> "queues":[],
> "clockid":"TAI",
> "base_time":0,
> "cycle_time":0,
> "cycle_time_extension":0,
> {
> "base_time":0,
> "cycle_time":20000000,
> "cycle_time_extension":0,
> "schedule":[{"index":0,"cmd":"S","gatemask":"0xff","interval":20000000}]
> }}}]
>
> Thinking out loud: If I am reading this right, there's no "oper"
> schedule, only an "admin" schedule. So the first bug is probably a
> taprio bug when deciding if it should create an "open" vs. "admin"
> schedule.
>
> The second bug seems to be in the way that q_taprio in iproute2
> handles the admin schedule, is just an object inside another, which
> seems to be invalid.
>
> Does it make sense?

Yes, it makes sense, thanks. I've sent some iproute2 patches that fix
the user space issues, and I'll soon send a v4 which takes into
consideration the fact that the admin schedule may not become
operational right away.