act_skbedit.c (d053cf0d771f6547cb0537759a9af63cf402908d) | act_skbedit.c (4b61d3e8d3daebbde7ec02d593f84248fdf8bec2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2008, Intel Corporation. 4 * 5 * Author: Alexander Duyck <alexander.h.duyck@intel.com> 6 */ 7 8#include <linux/module.h> --- 60 unchanged lines hidden (view full) --- 69 return action; 70 71err: 72 qstats_drop_inc(this_cpu_ptr(d->common.cpu_qstats)); 73 return TC_ACT_SHOT; 74} 75 76static void tcf_skbedit_stats_update(struct tc_action *a, u64 bytes, | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2008, Intel Corporation. 4 * 5 * Author: Alexander Duyck <alexander.h.duyck@intel.com> 6 */ 7 8#include <linux/module.h> --- 60 unchanged lines hidden (view full) --- 69 return action; 70 71err: 72 qstats_drop_inc(this_cpu_ptr(d->common.cpu_qstats)); 73 return TC_ACT_SHOT; 74} 75 76static void tcf_skbedit_stats_update(struct tc_action *a, u64 bytes, |
77 u32 packets, u64 lastuse, bool hw) | 77 u64 packets, u64 drops, 78 u64 lastuse, bool hw) |
78{ 79 struct tcf_skbedit *d = to_skbedit(a); 80 struct tcf_t *tm = &d->tcf_tm; 81 | 79{ 80 struct tcf_skbedit *d = to_skbedit(a); 81 struct tcf_t *tm = &d->tcf_tm; 82 |
82 tcf_action_update_stats(a, bytes, packets, false, hw); | 83 tcf_action_update_stats(a, bytes, packets, drops, hw); |
83 tm->lastuse = max_t(u64, tm->lastuse, lastuse); 84} 85 86static const struct nla_policy skbedit_policy[TCA_SKBEDIT_MAX + 1] = { 87 [TCA_SKBEDIT_PARMS] = { .len = sizeof(struct tc_skbedit) }, 88 [TCA_SKBEDIT_PRIORITY] = { .len = sizeof(u32) }, 89 [TCA_SKBEDIT_QUEUE_MAPPING] = { .len = sizeof(u16) }, 90 [TCA_SKBEDIT_MARK] = { .len = sizeof(u32) }, --- 290 unchanged lines hidden --- | 84 tm->lastuse = max_t(u64, tm->lastuse, lastuse); 85} 86 87static const struct nla_policy skbedit_policy[TCA_SKBEDIT_MAX + 1] = { 88 [TCA_SKBEDIT_PARMS] = { .len = sizeof(struct tc_skbedit) }, 89 [TCA_SKBEDIT_PRIORITY] = { .len = sizeof(u32) }, 90 [TCA_SKBEDIT_QUEUE_MAPPING] = { .len = sizeof(u16) }, 91 [TCA_SKBEDIT_MARK] = { .len = sizeof(u32) }, --- 290 unchanged lines hidden --- |