diff options
author | Damjan Marion <dmarion@me.com> | 2023-01-30 11:48:38 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2023-02-06 10:17:40 +0000 |
commit | 085757bb4930511928daa97f972cdca021e7a813 (patch) | |
tree | 5edf076e28156d9834fa37029028f2f5c5f568b9 /src/plugins/memif/memif_api.c | |
parent | 0df06b6e95b6a3261c8e9c261c7a4a661d6ea25a (diff) |
vppinfra: refactor clib_socket_init, add linux netns support
Type: improvement
Change-Id: Ida2d044bccf0bc8914b4fe7d383f827400fa6a52
Signed-off-by: Damjan Marion <dmarion@me.com>
Diffstat (limited to 'src/plugins/memif/memif_api.c')
-rw-r--r-- | src/plugins/memif/memif_api.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c index 04c2c8daab2..9a2f42a5bc7 100644 --- a/src/plugins/memif/memif_api.c +++ b/src/plugins/memif/memif_api.c @@ -48,8 +48,6 @@ void memif_main_t *mm = &memif_main; u8 is_add; u32 socket_id; - u32 len; - u8 *socket_filename; vl_api_memif_socket_filename_add_del_reply_t *rmp; int rv; @@ -65,19 +63,10 @@ void } /* socket filename */ - socket_filename = 0; mp->socket_filename[ARRAY_LEN (mp->socket_filename) - 1] = 0; - len = strlen ((char *) mp->socket_filename); - if (mp->is_add) - { - vec_validate (socket_filename, len); - memcpy (socket_filename, mp->socket_filename, len); - } - - rv = vnet_api_error ( - memif_socket_filename_add_del (is_add, socket_id, socket_filename)); - vec_free (socket_filename); + rv = vnet_api_error (memif_socket_filename_add_del ( + is_add, socket_id, (char *) mp->socket_filename)); reply: REPLY_MACRO (VL_API_MEMIF_SOCKET_FILENAME_ADD_DEL_REPLY); |