netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>,
	netdev <netdev@vger.kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jiri Pirko <jiri@resnulli.us>, Cong Wang <xiyou.wangcong@gmail.com>
Subject: Re: TC stats / hw offload question
Date: Wed, 24 Apr 2019 15:05:05 +0100	[thread overview]
Message-ID: <ec4092a6-196d-7eca-04be-0654e762c0b2@solarflare.com> (raw)
In-Reply-To: <4cb765dd-453f-3139-bce6-6e0b31167aec@mojatatu.com>

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/

  parent reply	other threads:[~2019-04-24 14:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 19:41 TC stats / hw offload question Edward Cree
2019-02-06  2:20 ` Jamal Hadi Salim
2019-02-08 10:26   ` Edward Cree
2019-02-09 17:39     ` Jamal Hadi Salim
2019-02-11 11:44       ` Edward Cree
2019-02-14 12:39         ` Jamal Hadi Salim
2019-02-14 15:17           ` Andy Gospodarek
2019-02-18 18:56           ` Edward Cree
2019-02-18 19:37             ` Edward Cree
2019-04-24 14:05   ` Edward Cree [this message]
2019-04-24 14:11     ` Pablo Neira Ayuso
2019-04-24 15:03       ` Edward Cree
2019-04-25 13:23         ` Edward Cree
2019-04-25 22:33           ` Pablo Neira Ayuso
2019-04-26 12:13             ` Edward Cree
2019-04-26 12:42               ` Jamal Hadi Salim
2019-04-26 18:49               ` Pablo Neira Ayuso
2019-04-29 14:11                 ` Edward Cree
2019-04-29 15:21                   ` Pablo Neira Ayuso
2019-04-29 16:25                     ` Edward Cree
2019-04-29 19:14                       ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec4092a6-196d-7eca-04be-0654e762c0b2@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).