Messages in this thread | | | Date | Tue, 24 Mar 2020 11:01:46 +0100 | From | Jiri Pirko <> | 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@nxp.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); > } >
| |