act_gact.c (c95baf12f5077419db01313ab61c2aac007d40cd) | act_gact.c (4b61d3e8d3daebbde7ec02d593f84248fdf8bec2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/sched/act_gact.c Generic actions 4 * 5 * copyright Jamal Hadi Salim (2002-4) 6 */ 7 8#include <linux/types.h> --- 157 unchanged lines hidden (view full) --- 166 if (action == TC_ACT_SHOT) 167 tcf_action_inc_drop_qstats(&gact->common); 168 169 tcf_lastuse_update(&gact->tcf_tm); 170 171 return action; 172} 173 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/sched/act_gact.c Generic actions 4 * 5 * copyright Jamal Hadi Salim (2002-4) 6 */ 7 8#include <linux/types.h> --- 157 unchanged lines hidden (view full) --- 166 if (action == TC_ACT_SHOT) 167 tcf_action_inc_drop_qstats(&gact->common); 168 169 tcf_lastuse_update(&gact->tcf_tm); 170 171 return action; 172} 173 |
174static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u32 packets, 175 u64 lastuse, bool hw) | 174static void tcf_gact_stats_update(struct tc_action *a, u64 bytes, u64 packets, 175 u64 drops, u64 lastuse, bool hw) |
176{ 177 struct tcf_gact *gact = to_gact(a); 178 int action = READ_ONCE(gact->tcf_action); 179 struct tcf_t *tm = &gact->tcf_tm; 180 | 176{ 177 struct tcf_gact *gact = to_gact(a); 178 int action = READ_ONCE(gact->tcf_action); 179 struct tcf_t *tm = &gact->tcf_tm; 180 |
181 tcf_action_update_stats(a, bytes, packets, action == TC_ACT_SHOT, hw); | 181 tcf_action_update_stats(a, bytes, packets, 182 action == TC_ACT_SHOT ? packets : drops, hw); |
182 tm->lastuse = max_t(u64, tm->lastuse, lastuse); 183} 184 185static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, 186 int bind, int ref) 187{ 188 unsigned char *b = skb_tail_pointer(skb); 189 struct tcf_gact *gact = to_gact(a); --- 121 unchanged lines hidden --- | 183 tm->lastuse = max_t(u64, tm->lastuse, lastuse); 184} 185 186static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, 187 int bind, int ref) 188{ 189 unsigned char *b = skb_tail_pointer(skb); 190 struct tcf_gact *gact = to_gact(a); --- 121 unchanged lines hidden --- |