aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_tcindex.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-04 14:29:15 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-04 11:21:24 -0700
commit9b0d4446b56904b59ae3809913b0ac760fa941a6 (patch)
tree1b6d353ef75496604e247b0ceec74e63cb228708 /net/sched/cls_tcindex.c
parentnet: sched: cls_u32: no need to call tcf_exts_change for newly allocated struct (diff)
downloadlinux-dev-9b0d4446b56904b59ae3809913b0ac760fa941a6.tar.xz
linux-dev-9b0d4446b56904b59ae3809913b0ac760fa941a6.zip
net: sched: avoid atomic swap in tcf_exts_change
tcf_exts_change is always called on newly created exts, which are not used on fastpath. Therefore, simple struct copy is enough. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/sched/cls_tcindex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 66924d147e97..d69f828f3fed 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -419,9 +419,9 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
}
if (old_r)
- tcf_exts_change(tp, &r->exts, &e);
+ tcf_exts_change(&r->exts, &e);
else
- tcf_exts_change(tp, &cr.exts, &e);
+ tcf_exts_change(&cr.exts, &e);
if (old_r && old_r != r) {
err = tcindex_filter_result_init(old_r);
@@ -439,7 +439,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
struct tcindex_filter *nfp;
struct tcindex_filter __rcu **fp;
- tcf_exts_change(tp, &f->result.exts, &r->exts);
+ tcf_exts_change(&f->result.exts, &r->exts);
fp = cp->h + (handle % cp->hash);
for (nfp = rtnl_dereference(*fp);