act_vlan.c (c95baf12f5077419db01313ab61c2aac007d40cd) act_vlan.c (4b61d3e8d3daebbde7ec02d593f84248fdf8bec2)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
4 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include <linux/kernel.h>

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

297 const struct tc_action_ops *ops,
298 struct netlink_ext_ack *extack)
299{
300 struct tc_action_net *tn = net_generic(net, vlan_net_id);
301
302 return tcf_generic_walker(tn, skb, cb, type, ops, extack);
303}
304
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
4 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include <linux/kernel.h>

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

297 const struct tc_action_ops *ops,
298 struct netlink_ext_ack *extack)
299{
300 struct tc_action_net *tn = net_generic(net, vlan_net_id);
301
302 return tcf_generic_walker(tn, skb, cb, type, ops, extack);
303}
304
305static void tcf_vlan_stats_update(struct tc_action *a, u64 bytes, u32 packets,
306 u64 lastuse, bool hw)
305static void tcf_vlan_stats_update(struct tc_action *a, u64 bytes, u64 packets,
306 u64 drops, u64 lastuse, bool hw)
307{
308 struct tcf_vlan *v = to_vlan(a);
309 struct tcf_t *tm = &v->tcf_tm;
310
307{
308 struct tcf_vlan *v = to_vlan(a);
309 struct tcf_t *tm = &v->tcf_tm;
310
311 tcf_action_update_stats(a, bytes, packets, false, hw);
311 tcf_action_update_stats(a, bytes, packets, drops, hw);
312 tm->lastuse = max_t(u64, tm->lastuse, lastuse);
313}
314
315static int tcf_vlan_search(struct net *net, struct tc_action **a, u32 index)
316{
317 struct tc_action_net *tn = net_generic(net, vlan_net_id);
318
319 return tcf_idr_search(tn, a, index);

--- 60 unchanged lines hidden ---
312 tm->lastuse = max_t(u64, tm->lastuse, lastuse);
313}
314
315static int tcf_vlan_search(struct net *net, struct tc_action **a, u32 index)
316{
317 struct tc_action_net *tn = net_generic(net, vlan_net_id);
318
319 return tcf_idr_search(tn, a, index);

--- 60 unchanged lines hidden ---