pkt_cls.h (6870112c46c867f50cd27570860a05bd82614b5c) pkt_cls.h (4b61d3e8d3daebbde7ec02d593f84248fdf8bec2)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __NET_PKT_CLS_H
3#define __NET_PKT_CLS_H
4
5#include <linux/pkt_cls.h>
6#include <linux/workqueue.h>
7#include <net/sch_generic.h>
8#include <net/act_api.h>

--- 248 unchanged lines hidden (view full) ---

257 for (i = 0; i < TCA_ACT_MAX_PRIO && ((a) = (exts)->actions[i]); i++)
258#else
259#define tcf_exts_for_each_action(i, a, exts) \
260 for (; 0; (void)(i), (void)(a), (void)(exts))
261#endif
262
263static inline void
264tcf_exts_stats_update(const struct tcf_exts *exts,
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __NET_PKT_CLS_H
3#define __NET_PKT_CLS_H
4
5#include <linux/pkt_cls.h>
6#include <linux/workqueue.h>
7#include <net/sch_generic.h>
8#include <net/act_api.h>

--- 248 unchanged lines hidden (view full) ---

257 for (i = 0; i < TCA_ACT_MAX_PRIO && ((a) = (exts)->actions[i]); i++)
258#else
259#define tcf_exts_for_each_action(i, a, exts) \
260 for (; 0; (void)(i), (void)(a), (void)(exts))
261#endif
262
263static inline void
264tcf_exts_stats_update(const struct tcf_exts *exts,
265 u64 bytes, u64 packets, u64 lastuse,
265 u64 bytes, u64 packets, u64 drops, u64 lastuse,
266 u8 used_hw_stats, bool used_hw_stats_valid)
267{
268#ifdef CONFIG_NET_CLS_ACT
269 int i;
270
271 preempt_disable();
272
273 for (i = 0; i < exts->nr_actions; i++) {
274 struct tc_action *a = exts->actions[i];
275
266 u8 used_hw_stats, bool used_hw_stats_valid)
267{
268#ifdef CONFIG_NET_CLS_ACT
269 int i;
270
271 preempt_disable();
272
273 for (i = 0; i < exts->nr_actions; i++) {
274 struct tc_action *a = exts->actions[i];
275
276 tcf_action_stats_update(a, bytes, packets, lastuse, true);
276 tcf_action_stats_update(a, bytes, packets, drops,
277 lastuse, true);
277 a->used_hw_stats = used_hw_stats;
278 a->used_hw_stats_valid = used_hw_stats_valid;
279 }
280
281 preempt_enable();
282#endif
283}
284

--- 637 unchanged lines hidden ---
278 a->used_hw_stats = used_hw_stats;
279 a->used_hw_stats_valid = used_hw_stats_valid;
280 }
281
282 preempt_enable();
283#endif
284}
285

--- 637 unchanged lines hidden ---