Add hindex_next_node_with_hash() api which gets a next hindex node with the same hash as the parameter node or null if there is no such next node. This api will be used is a subsequent patch.
Signed-off-by: Darrell Ball <[email protected]> --- lib/hindex.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/hindex.h b/lib/hindex.h index 876c5a9..f70d086 100644 --- a/lib/hindex.h +++ b/lib/hindex.h @@ -154,6 +154,15 @@ hindex_node_with_hash(const struct hindex *hindex, size_t hash) return node; } +/* Returns the next node in 'hindex' with the same 'hash' of node, or a null + * pointer if no more nodes have that hash value. Node must be a valid + * non-null node. */ +static inline struct hindex_node * +hindex_next_node_with_hash(const struct hindex_node *node) +{ + return node->s; +} + /* Iteration. */ /* Iterates through every node in HINDEX. */ -- 1.9.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
