2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Ben Pfaff
63e60b866f hmap: Rename hmap_moved() to hmap_node_moved().
This prepares for adding a new function that deals with a "struct hmap"
moving, as opposed to a "struct hmap_node".

Since there was only a single call to this in the whole tree, and its
caller didn't have any callers of its own at all, also move this function
from hmap.h to hmap.c.
2010-01-28 16:06:31 -08:00
Ben Pfaff
1e68c0730d hmap: Add function to mark an hmap_node as "null" and check for the mark.
This is useful in cases where one might want to know whether an hmap_node
is actually part of an hmap, without using a separate variable to indicate
it.
2009-12-07 17:07:15 -08:00
Ben Pfaff
3adb8bf048 hmap: New functions, macros for iterating buckets without comparing hashes.
Usually, the hash comparison that HMAP_FOR_EACH_WITH_HASH does is an
optimization, because comparing a hash value is usually cheaper than
comparing an entire hash map key.  But for simple hash map keys, it makes
sense to just compare the key directly, because it avoids doing two
comparisons when a single simple comparison suffices.  This commit adds new
functions and macros to support this simple case.
2009-11-04 15:01:02 -08:00
Ben Pfaff
9a757a721f hmap: Fix bug in hmap_replace().
When hmap_replace() replaces one hash table node by another, it must
ensure that any nodes following the old node also follow the new node,
by copying the "next" pointer from "old" to "new".
2009-11-04 15:01:02 -08:00
Ben Pfaff
72865317a4 New implementation of userspace datapath, based on the netdev library. 2009-07-06 09:55:06 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00