api: keep api common code in vlibapi

Type: refactor
Change-Id: I6edbff9a02fcb3c592ccfe8f47ddb3f848be1b6d
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2022-05-20 13:05:38 +02:00
committed by Ole Tr�an
parent 617d429d2e
commit b704971248
8 changed files with 19 additions and 23 deletions

View File

@ -44,9 +44,10 @@ add_vpp_executable(test_vat2 ENABLE_EXPORTS NO_INSTALL
DEPENDS api_headers DEPENDS api_headers
LINK_LIBRARIES LINK_LIBRARIES
vlibmemoryclient
svm
vppinfra vppinfra
vlibmemoryclient
vlibapi
svm
vppapiclient vppapiclient
Threads::Threads Threads::Threads
dl dl

View File

@ -11,16 +11,18 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
install( add_vpp_library (vlibapi
FILES SOURCES
api_helper_macros.h api_shared.c
node_serialize.c
memory_shared.c
INSTALL_HEADERS
api.h api.h
vat_helper_macros.h
api_common.h api_common.h
api_helper_macros.h
api_types.h api_types.h
vat_helper_macros.h
DESTINATION memory_shared.h
${CMAKE_INSTALL_INCLUDEDIR}/vlibapi
COMPONENT vpp-dev
) )

View File

@ -14,17 +14,13 @@
add_vpp_library (vlibmemory add_vpp_library (vlibmemory
SOURCES SOURCES
memory_api.c memory_api.c
memory_shared.c
socket_api.c socket_api.c
memclnt_api.c memclnt_api.c
vlib_api_cli.c vlib_api_cli.c
vlib_api.c vlib_api.c
../vlibapi/api_shared.c
../vlibapi/node_serialize.c
INSTALL_HEADERS INSTALL_HEADERS
vl_memory_msg_enum.h vl_memory_msg_enum.h
memory_shared.h
vl_memory_api_h.h vl_memory_api_h.h
socket_client.h socket_client.h
memory_api.h memory_api.h
@ -36,19 +32,16 @@ add_vpp_library (vlibmemory
memclnt.api memclnt.api
vlib.api vlib.api
LINK_LIBRARIES vppinfra svm vlib LINK_LIBRARIES vppinfra svm vlib vlibapi
) )
add_dependencies(vlibmemory vlibmemory_api_headers) add_dependencies(vlibmemory vlibmemory_api_headers)
add_vpp_library (vlibmemoryclient add_vpp_library (vlibmemoryclient
SOURCES SOURCES
memory_shared.c
memory_client.c memory_client.c
socket_client.c socket_client.c
../vlibapi/api_shared.c
../vlibapi/node_serialize.c
LINK_LIBRARIES vppinfra svm LINK_LIBRARIES vppinfra svm vlibapi
) )
add_dependencies(vlibmemoryclient vlibmemory_api_headers) add_dependencies(vlibmemoryclient vlibmemory_api_headers)

View File

@ -23,7 +23,7 @@
#include <svm/queue.h> #include <svm/queue.h>
#include <vlib/vlib.h> #include <vlib/vlib.h>
#include <vlibapi/api.h> #include <vlibapi/api.h>
#include <vlibmemory/memory_shared.h> #include <vlibapi/memory_shared.h>
svm_queue_t *vl_api_client_index_to_input_queue (u32 index); svm_queue_t *vl_api_client_index_to_input_queue (u32 index);
int vl_mem_api_init (const char *region_name); int vl_mem_api_init (const char *region_name);

View File

@ -18,7 +18,7 @@
#ifndef SRC_VLIBMEMORY_MEMORY_CLIENT_H_ #ifndef SRC_VLIBMEMORY_MEMORY_CLIENT_H_
#define SRC_VLIBMEMORY_MEMORY_CLIENT_H_ #define SRC_VLIBMEMORY_MEMORY_CLIENT_H_
#include <vlibmemory/memory_shared.h> #include <vlibapi/memory_shared.h>
#include <setjmp.h> #include <setjmp.h>
/* /*

View File

@ -20,7 +20,7 @@
#include <vppinfra/file.h> #include <vppinfra/file.h>
#include <vppinfra/time.h> #include <vppinfra/time.h>
#include <vlibmemory/memory_shared.h> #include <vlibapi/memory_shared.h>
typedef struct typedef struct
{ {