memif: autogenerate socket_ids 34/34734/5
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>
Wed, 15 Dec 2021 18:15:32 +0000 (19:15 +0100)
committerDamjan Marion <dmarion@0xa5.net>
Mon, 6 Mar 2023 13:54:06 +0000 (13:54 +0000)
commit8b213ee652dd69d941865fa59e1f780843016475
treef37774b199588dcace4b1c4277b8398fc3cc0498
parentec5c40b83acae400a8cc1a18ad897b6365774559
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>
src/plugins/memif/memif.api
src/plugins/memif/memif.c
src/plugins/memif/memif_api.c
src/plugins/memif/memif_test.c
src/plugins/memif/private.h