net: qos offload add flow status with dropped count
This patch adds a drop frames counter to tc flower offloading. Reporting h/w dropped frames is necessary for some actions. Some actions like police action and the coming introduced stream gate action would produce dropped frames which is necessary for user. Status update shows how many filtered packets increasing and how many dropped in those packets. v2: Changes - Update commit comments suggest by Jiri Pirko. Signed-off-by: Po Liu <Po.Liu@nxp.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1450,12 +1450,12 @@ static int tcf_ct_search(struct net *net, struct tc_action **a, u32 index)
|
||||
return tcf_idr_search(tn, a, index);
|
||||
}
|
||||
|
||||
static void tcf_stats_update(struct tc_action *a, u64 bytes, u32 packets,
|
||||
u64 lastuse, bool hw)
|
||||
static void tcf_stats_update(struct tc_action *a, u64 bytes, u64 packets,
|
||||
u64 drops, u64 lastuse, bool hw)
|
||||
{
|
||||
struct tcf_ct *c = to_ct(a);
|
||||
|
||||
tcf_action_update_stats(a, bytes, packets, false, hw);
|
||||
tcf_action_update_stats(a, bytes, packets, drops, hw);
|
||||
c->tcf_tm.lastuse = max_t(u64, c->tcf_tm.lastuse, lastuse);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user