summaryrefslogtreecommitdiff
path: root/lib/tnl-ports.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-11-13 11:54:31 -0800
committerJarno Rajahalme <jrajahalme@nicira.com>2014-11-14 15:55:44 -0800
commitde4ad4a21569fa63912be87c1b2e858d888dc1b0 (patch)
tree2da5fe6b86685ccf3c695b28ebdb910c9b7707a5 /lib/tnl-ports.c
parentf47eef15b78a642659e019412125d6c2775acb84 (diff)
downloadopenvswitch-de4ad4a21569fa63912be87c1b2e858d888dc1b0.tar.gz
classifier: Lockless and robust classifier iteration.
Previously, accurate iteration required writers to be excluded during iteration. This patch adds an rculist to struct cls_subtable, and a corresponding list node to struct cls_rule, which makes iteration more straightforward, and allows the iterators to remain ignorant of the internals of the cls_match. This new list allows iteration of rules in the classifier by traversing the RCU-friendly subtables vector, and the rculist of rules in each subtable. Classifier modifications may be performed concurrently, but whether or not the concurrent iterator sees those changes depends on the timing of change. More specifically, an concurrent iterator: - May or may not see a rule that is being inserted or removed. - Will see either the new or the old version of a rule that is replaced. - Will see all the other rules (that are not being modified). Finally, The subtable's rculist also allows to make classifier_rule_overlaps() lockless, which this patch also does. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/tnl-ports.c')
0 files changed, 0 insertions, 0 deletions