summaryrefslogtreecommitdiff
path: root/lib/rculist.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some minor spelling and typos.Justin Pettit2018-03-141-1/+1
| | | | | Signed-off-by: Justin Pettit <jpettit@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* rculist: Remove postponed poisoning.Jarno Rajahalme2015-06-111-19/+17
| | | | | | | | | | | | | | | | | | | | | | | Postponed 'next' member poisoning was based on the faulty assumption that postponed functions would be called in the order they were postponed. This assumption holds only for the functions postponed by any single thread. When functions are postponed by different threads, there are no guarantees of the order in which the functions may be called, or timing between those calls after the next grace period has passed. Given this, the postponed poisoning could have executed after postponed destruction of the object containing the rculist element. This bug was revealed after the memory leaks on rule deletion were recently fixed. This patch removes the postponed 'next' member poisoning and adds documentation describing the ordering limitations in OVS RCU. Alex Wang dug out the root cause of the resulting crashes, thanks! Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Alex Wang <alexw@nicira.com>
* lib: Expose struct ovs_list definition in <openvswitch/list.h>Thomas Graf2014-12-151-1/+1
| | | | | | | | Expose the struct ovs_list definition in <openvswitch/list.h>. Keep the list access API private for now. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* list: Rename struct list to struct ovs_listThomas Graf2014-12-151-3/+4
| | | | | | | struct list is a common name and can't be used in public headers. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* classifier: Do not insert duplicate rules in indices.Jarno Rajahalme2014-11-141-8/+5
| | | | | | | | | | | | | There is no point in adding duplicate information into prefix tries. Also, since the lower-priority duplicate rules are not visible to lookups, they do not need to be in staged lookup indices directly either (the head rule is). Finally, now that cmap operations return the number of elements in the cmap, subtable's 'n_rules' member is not needed any more. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib/rculist: New RCU-iterator, single-writer doubly-linked list.Jarno Rajahalme2014-10-291-0/+403
rculist allows concurrent lockless list iteration, while a writer may be modifying the list. Multiple writers can be supported by using a mutex in addition to rculist. First user will be added in a following patch. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>