summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorVijayabhaskar Katamreddy <vkatamre@cisco.com>2022-05-13 13:07:19 +0000
committerOle Tr�an <otroan@employees.org>2022-05-19 13:35:33 +0000
commit8b874fc6a8ca58d420edee870e9ba8ef6fe439ae (patch)
tree44fa3dd8e316fc9fdea50cfa37364bc3e8a76366 /src/vppinfra
parentadd6a384e9444dfba86ae493a07bf3641e74126e (diff)
ip: reassembly - pacing reassembly timeouts
Type: fix Pace the main thread activity for reassembly timeouts, to avoid barrier syncs Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com> Change-Id: If8c62a05c7d28bfa6ac530c2cd5124834b4e8a70
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/pool.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/vppinfra/pool.h b/src/vppinfra/pool.h
index 2a356291051..dd581efeeab 100644
--- a/src/vppinfra/pool.h
+++ b/src/vppinfra/pool.h
@@ -555,11 +555,22 @@ do { \
_pool_var(rv); \
})
-#define pool_foreach_index(i,v) \
- if (v) \
- for (i = pool_get_first_index (v); \
- i < vec_len (v); \
- i = pool_get_next_index (v, i)) \
+#define pool_foreach_index(i, v) \
+ if (v) \
+ for (i = pool_get_first_index (v); i < vec_len (v); \
+ i = pool_get_next_index (v, i))
+
+/* Iterate pool by index from s to e */
+#define pool_foreach_stepping_index(i, s, e, v, body) \
+ for ((i) = (s); (i) < (e); (i) = pool_get_next_index (v, i)) \
+ { \
+ if (!pool_is_free_index ((v), (i))) \
+ do \
+ { \
+ body; \
+ } \
+ while (0); \
+ }
/**
* @brief Remove all elements from a pool in a safe way