diff options
author | Oz Shlomo <ozsh@nvidia.com> | 2023-02-12 15:25:14 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-14 11:00:01 +0100 |
commit | ac7d27907d5445d0accaf998e1dc3ea570ed1ba6 (patch) | |
tree | 36de2edbb7c19ab7247c492a192c2047a570b3d9 /include | |
parent | 3320f36fd8ad45312c98857d36ecbef90f829497 (diff) |
net/sched: pass flow_stats instead of multiple stats args
Instead of passing 6 stats related args, pass the flow_stats.
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/pkt_cls.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index cd410a87517b..bf50829d9255 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -294,8 +294,7 @@ static inline void tcf_exts_put_net(struct tcf_exts *exts) static inline void tcf_exts_hw_stats_update(const struct tcf_exts *exts, - u64 bytes, u64 packets, u64 drops, u64 lastuse, - u8 used_hw_stats, bool used_hw_stats_valid) + struct flow_stats *stats) { #ifdef CONFIG_NET_CLS_ACT int i; @@ -306,12 +305,12 @@ tcf_exts_hw_stats_update(const struct tcf_exts *exts, /* if stats from hw, just skip */ if (tcf_action_update_hw_stats(a)) { preempt_disable(); - tcf_action_stats_update(a, bytes, packets, drops, - lastuse, true); + tcf_action_stats_update(a, stats->bytes, stats->pkts, stats->drops, + stats->lastused, true); preempt_enable(); - a->used_hw_stats = used_hw_stats; - a->used_hw_stats_valid = used_hw_stats_valid; + a->used_hw_stats = stats->used_hw_stats; + a->used_hw_stats_valid = stats->used_hw_stats_valid; } } #endif |