aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-12-19 04:50:01 -0800
committerDave Barach <openvpp@barachs.net>2018-01-05 19:00:45 +0000
commit90a63988fa01685626b6d6a01b79ea5370f7fbac (patch)
tree69951111b8f8c43c5dbfc61cc5b133f74a58ddda /src/vppinfra
parente6bfeab1c352ae73a19361c038e2a06a58c035db (diff)
sock api: add infra for bootstrapping shm clients
- add function to sock client that bootstraps shm api - allow sock clients to request custom shm ring configs Change-Id: Iabc1dd4f0dc8bbf8ba24de37f4966339fcf86107 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/file.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vppinfra/file.h b/src/vppinfra/file.h
index 6ebf5122567..4231a39b723 100644
--- a/src/vppinfra/file.h
+++ b/src/vppinfra/file.h
@@ -122,6 +122,13 @@ clib_file_set_data_available_to_write (clib_file_main_t * um,
return was_available != 0;
}
+always_inline clib_file_t *
+clib_file_get (clib_file_main_t * fm, u32 file_index)
+{
+ if (pool_is_free_index (fm->file_pool, file_index))
+ return 0;
+ return pool_elt_at_index (fm->file_pool, file_index);
+}
#endif /* included_clib_file_h */