From: Cong Wang <xiyou.wangcong@gmail.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org, jhs@mojatatu.com,
jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, song@kernel.org, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, jolsa@kernel.org, weiyongjun1@huawei.com,
yuehaibing@huawei.com
Subject: Re: [PATCH net-next,v3 1/9] net/sched: cls_api: add helper for tc cls walker stats updating
Date: Thu, 15 Sep 2022 16:23:10 -0700 [thread overview]
Message-ID: <YyOz3qLWTS3raNpe@pop-os.localdomain> (raw)
In-Reply-To: <20220915063038.20010-2-shaozhengchao@huawei.com>
On Thu, Sep 15, 2022 at 02:30:30PM +0800, Zhengchao Shao wrote:
> The walk implementation of most tc cls modules is basically the same.
> That is, the values of count and skip are checked first. If count is
> greater than or equal to skip, the registered fn function is executed.
> Otherwise, increase the value of count. So we can reconstruct them.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
> ---
> include/net/pkt_cls.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
> index d9d90e6925e1..d3cbbabf7592 100644
> --- a/include/net/pkt_cls.h
> +++ b/include/net/pkt_cls.h
> @@ -81,6 +81,19 @@ int tcf_classify(struct sk_buff *skb,
> const struct tcf_proto *tp, struct tcf_result *res,
> bool compat_mode);
>
> +static inline bool tc_cls_stats_update(struct tcf_proto *tp,
This function name is confusing, I don't think it updates anything,
probably we only dump stats when calling ->walk(). Please use a better
name here, like tc_cls_stats_dump().
Thanks.
next prev parent reply other threads:[~2022-09-15 23:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 6:30 [PATCH net-next,v3 0/9] refactor duplicate codes in the tc cls walk function Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 1/9] net/sched: cls_api: add helper for tc cls walker stats updating Zhengchao Shao
2022-09-15 23:23 ` Cong Wang [this message]
2022-09-16 1:58 ` shaozhengchao
2022-09-15 6:30 ` [PATCH net-next,v3 2/9] net/sched: use tc_cls_stats_update() in filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 3/9] selftests/tc-testings: add selftests for bpf filter Zhengchao Shao
2022-09-15 16:00 ` Victor Nogueira
2022-09-15 6:30 ` [PATCH net-next,v3 4/9] selftests/tc-testings: add selftests for cgroup filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 5/9] selftests/tc-testings: add selftests for flow filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 6/9] selftests/tc-testings: add selftests for route filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 7/9] selftests/tc-testings: add selftests for rsvp filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 8/9] selftests/tc-testings: add selftests for tcindex filter Zhengchao Shao
2022-09-15 6:30 ` [PATCH net-next,v3 9/9] selftests/tc-testings: add list case for basic filter Zhengchao Shao
2022-09-15 16:00 ` [PATCH net-next,v3 0/9] refactor duplicate codes in the tc cls walk function Victor Nogueira
2022-09-16 1:59 ` shaozhengchao
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=YyOz3qLWTS3raNpe@pop-os.localdomain \
--to=xiyou.wangcong@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=shaozhengchao@huawei.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=yhs@fb.com \
--cc=yuehaibing@huawei.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).