On 08/05/2019 15:02, Jamal Hadi Salim wrote: > The lazy thing most people have done is essentially assume that > there is a stat per filter rule... > I wouldnt call it the 'the right thing' Yup, that's why I'm trying to not do that ;-)
> Yes, the index at tc semantics level is per-action type. > So "mirred index 1" and "drop index 1" are not the same stats counter. Ok, then that kills the design I used here that relied entirely on the index to specify counters. I guess instead I'll have to go with the approach Pablo suggested, passing an array of struct flow_stats in the callback, thus using the index into that array (which corresponds to the index in f->exts->actions) to identify different counters. Which means I will have to change all the existing drivers, which will largely revert (from the drivers' perspective) the change when Pablo took f->exts away from them — they will go back to calling something that looks a lot like tcf_exts_stats_update(). However, that'll mean the API has in-tree users, so it might be considered mergeable(?) -Ed