[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200324100146.GR11304@nanopsycho.orion>
Date: Tue, 24 Mar 2020 11:01:46 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Po Liu <Po.Liu@....com>
Cc: davem@...emloft.net, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, vinicius.gomes@...el.com,
claudiu.manoil@....com, vladimir.oltean@....com,
alexandru.marginean@....com, xiaoliang.yang_1@....com,
roy.zang@....com, mingkai.hu@....com, jerry.huang@....com,
leoyang.li@....com, michael.chan@...adcom.com, vishal@...lsio.com,
saeedm@...lanox.com, leon@...nel.org, jiri@...lanox.com,
idosch@...lanox.com, alexandre.belloni@...tlin.com,
UNGLinuxDriver@...rochip.com, kuba@...nel.org, jhs@...atatu.com,
xiyou.wangcong@...il.com, simon.horman@...ronome.com,
pablo@...filter.org, moshe@...lanox.com, m-karicheri2@...com,
andre.guedes@...ux.intel.com, stephen@...workplumber.org
Subject: Re: [v1,net-next 1/5] net: qos offload add flow status with dropped
count
Tue, Mar 24, 2020 at 04:47:39AM CET, Po.Liu@....com wrote:
>Add the hardware tc flower offloading with dropped frame counter for
>status update. action ops->stats_update only loaded by the
>tcf_exts_stats_update() and tcf_exts_stats_update() only loaded by
>matchall and tc flower hardware filter. But the stats_update only set
>the dropped count as default false in the ops->stats_update. This
>patch add the dropped counter to action stats update. Its dropped counter
>update by the hardware offloading driver.
>This is changed by replacing the drop flag with dropped frame counter.
I just read this paragraph 3 times, I'm unable to decypher :(
>
>Driver side should update how many "packets" it filtered and how many
>"dropped" in those "packets".
>
[...]
> return action;
> }
>
>-static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u32 packets,
>- u64 lastuse, bool hw)
>+static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u64 packets,
>+ u64 lastuse, u64 dropped, bool hw)
> {
> struct tcf_gact *gact = to_gact(a);
> int action = READ_ONCE(gact->tcf_action);
> struct tcf_t *tm = &gact->tcf_tm;
>
>- tcf_action_update_stats(a, bytes, packets, action == TC_ACT_SHOT, hw);
>+ tcf_action_update_stats(a, bytes, packets,
>+ (action == TC_ACT_SHOT) ? packets : 0, hw);
Avoid ()s here.
> tm->lastuse = max_t(u64, tm->lastuse, lastuse);
> }
>
Powered by blists - more mailing lists