summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/private.h
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-12-15 19:15:32 +0100
committerDamjan Marion <dmarion@0xa5.net>2023-03-06 13:54:06 +0000
commit8b213ee652dd69d941865fa59e1f780843016475 (patch)
treef37774b199588dcace4b1c4277b8398fc3cc0498 /src/plugins/memif/private.h
parentec5c40b83acae400a8cc1a18ad897b6365774559 (diff)
memif: autogenerate socket_ids
This patch adds an API memif_socket_filename_add_del_v2 that allows autogenerating memif socket_id when passing ~0 in the socket_id field. It opportunistically walks the hash to find a free ID to use, and returns it in the reply. socket_filename also becomes a variable length string, to accomodate for longer names (in case a netns gets passed) Type: feature Change-Id: I33fc3e1cf553af27579d6bad8691b22b530531cc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/memif/private.h')
-rw-r--r--src/plugins/memif/private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/memif/private.h b/src/plugins/memif/private.h
index ba77cc1c5dd..5d8718dd669 100644
--- a/src/plugins/memif/private.h
+++ b/src/plugins/memif/private.h
@@ -321,6 +321,7 @@ typedef struct
u32 sw_if_index;
} memif_create_if_args_t;
+u32 memif_get_unused_socket_id ();
clib_error_t *memif_socket_filename_add_del (u8 is_add, u32 sock_id,
char *sock_filename);
clib_error_t *memif_create_if (vlib_main_t *vm, memif_create_if_args_t *args);