summaryrefslogtreecommitdiff
path: root/net/sched/act_mirred.c
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-10-30 17:09:06 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-31 04:07:51 +0300
commite38226786022d2d8e5876ab7bc37e82b0eb57e65 (patch)
treebd7467ea5f747e37672228c41d99c3d64ee3995f /net/sched/act_mirred.c
parentabbb0d33632ce931ca9c814813ee131351f6b92f (diff)
downloadlinux-e38226786022d2d8e5876ab7bc37e82b0eb57e65.tar.xz
net: sched: update action implementations to support flags
Extend struct tc_action with new "tcfa_flags" field. Set the field in tcf_idr_create() function and provide new helper tcf_idr_create_from_flags() that derives 'cpustats' boolean from flags value. Update individual hardware-offloaded actions init() to pass their "flags" argument to new helper in order to skip percpu stats allocation when user requested it through flags. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_mirred.c')
-rw-r--r--net/sched/act_mirred.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 17ed19d6dff4..b6e1b5bbb4da 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -148,8 +148,8 @@ static int tcf_mirred_init(struct net *net, struct nlattr *nla,
NL_SET_ERR_MSG_MOD(extack, "Specified device does not exist");
return -EINVAL;
}
- ret = tcf_idr_create(tn, index, est, a,
- &act_mirred_ops, bind, true);
+ ret = tcf_idr_create_from_flags(tn, index, est, a,
+ &act_mirred_ops, bind, flags);
if (ret) {
tcf_idr_cleanup(tn, index);
return ret;