aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-02-11 10:55:41 +0200
committerDavid S. Miller <davem@davemloft.net>2019-02-12 13:41:33 -0500
commit8b64678e0af8f4d62a40149baedebe78503a5255 (patch)
tree0bdf025167454692d50993922b4049bc7b479b68 /kernel
parentnet: sched: traverse classifiers in chain with tcf_get_next_proto() (diff)
downloadlinux-dev-8b64678e0af8f4d62a40149baedebe78503a5255.tar.xz
linux-dev-8b64678e0af8f4d62a40149baedebe78503a5255.zip
net: sched: refactor tp insert/delete for concurrent execution
Implement unique insertion function to atomically attach tcf_proto to chain after verifying that no other tcf proto with specified priority exists. Implement delete function that verifies that tp is actually empty before deleting it. Use these functions to refactor cls API to account for concurrent tp and rule update instead of relying on rtnl lock. Add new 'deleting' flag to tcf proto. Use it to restart search when iterating over tp's on chain to prevent accessing potentially inval tp->next pointer. Extend tcf proto with spinlock that is intended to be used to protect its data from concurrent modification instead of relying on rtnl mutex. Use it to protect 'deleting' flag. Add lockdep macros to validate that lock is held when accessing protected fields. 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 'kernel')
0 files changed, 0 insertions, 0 deletions