diff options
author | Damjan Marion <damarion@cisco.com> | 2022-05-20 13:05:38 +0200 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-09-26 08:12:57 +0000 |
commit | b70497124840fb6d9e8e5cf7239a41cb2bc7013c (patch) | |
tree | 090c957135d3e99db69d74ef5091bab8aaa21490 | |
parent | 617d429d2e38ac0cdb107dbfd86301b36d9f8e31 (diff) |
api: keep api common code in vlibapi
Type: refactor
Change-Id: I6edbff9a02fcb3c592ccfe8f47ddb3f848be1b6d
Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r-- | src/vat2/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/vlibapi/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/vlibapi/memory_shared.c (renamed from src/vlibmemory/memory_shared.c) | 0 | ||||
-rw-r--r-- | src/vlibapi/memory_shared.h (renamed from src/vlibmemory/memory_shared.h) | 0 | ||||
-rw-r--r-- | src/vlibmemory/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/vlibmemory/memory_api.h | 2 | ||||
-rw-r--r-- | src/vlibmemory/memory_client.h | 2 | ||||
-rw-r--r-- | src/vlibmemory/socket_client.h | 2 |
8 files changed, 18 insertions, 22 deletions
diff --git a/src/vat2/CMakeLists.txt b/src/vat2/CMakeLists.txt index 108e184b570..6f843c34661 100644 --- a/src/vat2/CMakeLists.txt +++ b/src/vat2/CMakeLists.txt @@ -44,9 +44,10 @@ add_vpp_executable(test_vat2 ENABLE_EXPORTS NO_INSTALL DEPENDS api_headers LINK_LIBRARIES + vppinfra vlibmemoryclient + vlibapi svm - vppinfra vppapiclient Threads::Threads dl diff --git a/src/vlibapi/CMakeLists.txt b/src/vlibapi/CMakeLists.txt index e6937a6db01..95bb4cf7469 100644 --- a/src/vlibapi/CMakeLists.txt +++ b/src/vlibapi/CMakeLists.txt @@ -11,16 +11,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -install( - FILES - api_helper_macros.h +add_vpp_library (vlibapi + SOURCES + api_shared.c + node_serialize.c + memory_shared.c + + INSTALL_HEADERS api.h - vat_helper_macros.h api_common.h + api_helper_macros.h api_types.h - - DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/vlibapi - - COMPONENT vpp-dev + vat_helper_macros.h + memory_shared.h ) + diff --git a/src/vlibmemory/memory_shared.c b/src/vlibapi/memory_shared.c index 77a610b9434..77a610b9434 100644 --- a/src/vlibmemory/memory_shared.c +++ b/src/vlibapi/memory_shared.c diff --git a/src/vlibmemory/memory_shared.h b/src/vlibapi/memory_shared.h index 4c4773d060b..4c4773d060b 100644 --- a/src/vlibmemory/memory_shared.h +++ b/src/vlibapi/memory_shared.h diff --git a/src/vlibmemory/CMakeLists.txt b/src/vlibmemory/CMakeLists.txt index d14e9cad954..2ee4dd08ba9 100644 --- a/src/vlibmemory/CMakeLists.txt +++ b/src/vlibmemory/CMakeLists.txt @@ -14,17 +14,13 @@ add_vpp_library (vlibmemory SOURCES memory_api.c - memory_shared.c socket_api.c memclnt_api.c vlib_api_cli.c vlib_api.c - ../vlibapi/api_shared.c - ../vlibapi/node_serialize.c INSTALL_HEADERS vl_memory_msg_enum.h - memory_shared.h vl_memory_api_h.h socket_client.h memory_api.h @@ -36,19 +32,16 @@ add_vpp_library (vlibmemory memclnt.api vlib.api - LINK_LIBRARIES vppinfra svm vlib + LINK_LIBRARIES vppinfra svm vlib vlibapi ) add_dependencies(vlibmemory vlibmemory_api_headers) add_vpp_library (vlibmemoryclient SOURCES - memory_shared.c memory_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) diff --git a/src/vlibmemory/memory_api.h b/src/vlibmemory/memory_api.h index 843bf8935b2..4a1573c6544 100644 --- a/src/vlibmemory/memory_api.h +++ b/src/vlibmemory/memory_api.h @@ -23,7 +23,7 @@ #include <svm/queue.h> #include <vlib/vlib.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); int vl_mem_api_init (const char *region_name); diff --git a/src/vlibmemory/memory_client.h b/src/vlibmemory/memory_client.h index a0168693a4b..3b8f671415c 100644 --- a/src/vlibmemory/memory_client.h +++ b/src/vlibmemory/memory_client.h @@ -18,7 +18,7 @@ #ifndef SRC_VLIBMEMORY_MEMORY_CLIENT_H_ #define SRC_VLIBMEMORY_MEMORY_CLIENT_H_ -#include <vlibmemory/memory_shared.h> +#include <vlibapi/memory_shared.h> #include <setjmp.h> /* diff --git a/src/vlibmemory/socket_client.h b/src/vlibmemory/socket_client.h index 231290088b3..619b7f4fccc 100644 --- a/src/vlibmemory/socket_client.h +++ b/src/vlibmemory/socket_client.h @@ -20,7 +20,7 @@ #include <vppinfra/file.h> #include <vppinfra/time.h> -#include <vlibmemory/memory_shared.h> +#include <vlibapi/memory_shared.h> typedef struct { |