[ovs-dev] [PATCH 01/22] id-pool: re-factor recirculation id allocator into stand-alone id pool
Ben Pfaff
blp at nicira.com
Mon Nov 10 16:33:35 UTC 2014
On Mon, Nov 10, 2014 at 01:47:48PM +0900, Simon Horman wrote:
> Refactor the lock-free portion of the recirculation id allocator
> into stand-alone id pool. This is in preparation for re-using
> that portion to allocate bucket ids which are part of (draft)
> Open Flow 1.5 groups.
>
> EXT-350
> Signed-off-by: Simon Horman <simon.horman at netronome.com>
Applied, thanks! I folded in the following stylistic changes and edited
the commit message slightly (note in particular the "ONF-JIRA" tag
described in CONTRIBUTING.md).
diff --git a/lib/id-pool.c b/lib/id-pool.c
index e6d7827..625cd52 100644
--- a/lib/id-pool.c
+++ b/lib/id-pool.c
@@ -16,10 +16,9 @@
*/
#include <config.h>
-
+#include "id-pool.h"
#include "hmap.h"
#include "hash.h"
-#include "id-pool.h"
struct id_node {
struct hmap_node node;
diff --git a/lib/id-pool.h b/lib/id-pool.h
index 71784ba..a68b0a2 100644
--- a/lib/id-pool.h
+++ b/lib/id-pool.h
@@ -24,19 +24,21 @@
struct id_pool;
struct id_pool *id_pool_create(uint32_t base, uint32_t n_ids);
-void id_pool_destroy(struct id_pool *pool);
-uint32_t id_pool_alloc_id(struct id_pool *pool);
-void id_pool_free_id(struct id_pool *pool, uint32_t id);
-void id_pool_add(struct id_pool *pool, uint32_t id);
+void id_pool_destroy(struct id_pool *);
+uint32_t id_pool_alloc_id(struct id_pool *);
+void id_pool_free_id(struct id_pool *, uint32_t id);
+void id_pool_add(struct id_pool *, uint32_t id);
/*
* ID pool.
* ========
*
* Pool of unique 32bit ids.
+ *
+ *
+ * Thread-safety
* =============
*
* APIs are not thread safe.
- *
*/
-#endif
+#endif /* id-pool.h */
More information about the dev
mailing list