On 06/02/2019 02:20, Jamal Hadi Salim wrote:
> The classifiers dont mod the packets. The actions do. And they
> maintain stats on the size on "entry" i.e pre-edit.
> Each action keeps its own counters. If you did something like:
>
> tc match using flower blah \
> action vlan push tag ... \
> action redirect to egress of eth0
>
> And you submited a packet of size x bytes,
> then the "match" would record x bytes.
> the "vlan action" would record x bytes.
> the "redirect" would record size x+vlaninfo bytes
> the egress of eth0 would  recorr x+vlaninfo bytes
So, I had this working for a while, by calling tcf_action_stats_update()
 directly on the correct element of tc->exts->actions[], instead of using
 tcf_exts_stats_update().  And this was fine, until I tried to port my
 code to the 5.1 kernel, with Pablo's flow action infrastructure.  On that
 it's not possible, because there is only flow_stats_update(), which takes
 a single bytes value for _all_ the actions in the rule.
Pablo, was your patch series[1] intended to change the semantics of TC
 action bytes-counters?  What are the proper semantics now?

-Ed

[1] http://patchwork.ozlabs.org/cover/1035414/

Reply via email to