diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2020-03-30 08:12:57 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-03-31 10:09:19 +0000 |
commit | 53f06a0148cd7ece2d48a3396e3e63f248d066e9 (patch) | |
tree | 5108380d38447fe01163ce6f0711431b4691848d | |
parent | e6b4a5ac1463226930bbe14bb7b058616df85073 (diff) |
vlib: move pci api types from vnet/pci to vlib/pci
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1a60809a8bbbbb8ac8b65ab990d51aae1229647f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
-rw-r--r-- | src/cmake/api.cmake | 3 | ||||
-rw-r--r-- | src/vlib/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/vlib/pci/pci_types.api (renamed from src/vnet/pci/pci_types.api) | 0 | ||||
-rw-r--r-- | src/vlib/pci/pci_types_api.c (renamed from src/vnet/pci/pci_types_api.c) | 16 | ||||
-rw-r--r-- | src/vlib/pci/pci_types_api.h (renamed from src/vnet/pci/pci_types_api.h) | 0 | ||||
-rw-r--r-- | src/vnet/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/vnet/devices/virtio/virtio.api | 2 | ||||
-rw-r--r-- | src/vnet/devices/virtio/virtio_api.c | 2 |
8 files changed, 12 insertions, 32 deletions
diff --git a/src/cmake/api.cmake b/src/cmake/api.cmake index c936f731632..fe2cad6bc46 100644 --- a/src/cmake/api.cmake +++ b/src/cmake/api.cmake @@ -150,6 +150,5 @@ function(vpp_add_api_files name dir component) endfunction() add_custom_target(api_headers - DEPENDS vlibmemory_api_headers vnet_api_headers vpp_api_headers + DEPENDS vlibmemory_api_headers vnet_api_headers vpp_api_headers vlib_api_headers ) - diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt index cc27d886675..c2a0d63f4d8 100644 --- a/src/vlib/CMakeLists.txt +++ b/src/vlib/CMakeLists.txt @@ -63,6 +63,7 @@ add_vpp_library(vlib node_cli.c node_format.c pci/pci.c + pci/pci_types_api.c physmem.c punt.c punt_node.c @@ -103,6 +104,7 @@ add_vpp_library(vlib node.h pci/pci_config.h pci/pci.h + pci/pci_types_api.h physmem_funcs.h physmem.h punt.h @@ -116,5 +118,10 @@ add_vpp_library(vlib vlib.h vmbus/vmbus.h + API_FILES + pci/pci_types.api + LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS} + + DEPENDS api_headers ) diff --git a/src/vnet/pci/pci_types.api b/src/vlib/pci/pci_types.api index d3654af536c..d3654af536c 100644 --- a/src/vnet/pci/pci_types.api +++ b/src/vlib/pci/pci_types.api diff --git a/src/vnet/pci/pci_types_api.c b/src/vlib/pci/pci_types_api.c index 5d1abec5af8..025548aec13 100644 --- a/src/vnet/pci/pci_types_api.c +++ b/src/vlib/pci/pci_types_api.c @@ -14,21 +14,9 @@ */ #include <vlibapi/api_types.h> -#include <vnet/pci/pci_types_api.h> +#include <vlib/pci/pci_types_api.h> -#define vl_typedefs /* define message structures */ -#include <vnet/vnet_all_api_h.h> -#undef vl_typedefs - -#define vl_endianfun /* define message structures */ -#include <vnet/vnet_all_api_h.h> -#undef vl_endianfun - -/* instantiate all the print functions we know about */ -#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) -#define vl_printfun -#include <vnet/vnet_all_api_h.h> -#undef vl_printfun +#include <vlib/pci/pci_types.api_types.h> void pci_address_decode (const vl_api_pci_address_t * in, vlib_pci_addr_t * out) diff --git a/src/vnet/pci/pci_types_api.h b/src/vlib/pci/pci_types_api.h index 16e126d5c99..16e126d5c99 100644 --- a/src/vnet/pci/pci_types_api.h +++ b/src/vlib/pci/pci_types_api.h diff --git a/src/vnet/CMakeLists.txt b/src/vnet/CMakeLists.txt index 95068f96e9a..1574c3daa70 100644 --- a/src/vnet/CMakeLists.txt +++ b/src/vnet/CMakeLists.txt @@ -1516,20 +1516,6 @@ list(APPEND VNET_HEADERS list(APPEND VNET_API_FILES syslog/syslog.api) ############################################################################## -# PCI -############################################################################## - -list (APPEND VNET_SOURCES - pci/pci_types_api.c -) - -list(APPEND VNET_HEADERS - pci/pci_types_api.h -) - -list(APPEND VNET_API_FILES pci/pci_types.api) - -############################################################################## # Tunnel Endpoint Information Base ############################################################################## diff --git a/src/vnet/devices/virtio/virtio.api b/src/vnet/devices/virtio/virtio.api index efbcba8fa43..34f00fad22c 100644 --- a/src/vnet/devices/virtio/virtio.api +++ b/src/vnet/devices/virtio/virtio.api @@ -17,7 +17,7 @@ option version = "2.0.0"; import "vnet/interface_types.api"; import "vnet/ethernet/ethernet_types.api"; -import "vnet/pci/pci_types.api"; +import "vlib/pci/pci_types.api"; /** \brief Initialize a new virtio pci interface with the given parameters diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c index 4d98e725fde..96ed927dc38 100644 --- a/src/vnet/devices/virtio/virtio_api.c +++ b/src/vnet/devices/virtio/virtio_api.c @@ -25,7 +25,7 @@ #include <vnet/ip/ip.h> #include <vnet/devices/virtio/virtio.h> #include <vnet/devices/virtio/pci.h> -#include <vnet/pci/pci_types_api.h> +#include <vlib/pci/pci_types_api.h> #include <vnet/vnet_msg_enum.h> |