summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-08-26 15:44:58 +0200
committerDavid S. Miller <davem@davemloft.net>2019-08-26 23:17:43 +0200
commit97394bef5622cb32fd1e5d152251090da6c238b9 (patch)
treed6dbb13c5f9133a57c5f417f506d7dbae8b58f7a /net/sched
parentnet: sched: protect block offload-related fields with rw_semaphore (diff)
downloadlinux-97394bef5622cb32fd1e5d152251090da6c238b9.tar.xz
linux-97394bef5622cb32fd1e5d152251090da6c238b9.zip
net: sched: change tcf block offload counter type to atomic_t
As a preparation for running proto ops functions without rtnl lock, change offload counter type to atomic. This is necessary to allow updating the counter by multiple concurrent users when offloading filters to hardware from unlocked classifiers. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 959b7ca1ca02..f2c2f8159e35 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -629,7 +629,7 @@ static void tc_indr_block_call(struct tcf_block *block,
static bool tcf_block_offload_in_use(struct tcf_block *block)
{
- return block->offloadcnt;
+ return atomic_read(&block->offloadcnt);
}
static int tcf_block_offload_cmd(struct tcf_block *block,