hsa: move vcl test apps to hsa 35/20335/6
authorFlorin Coras <fcoras@cisco.com>
Tue, 25 Jun 2019 19:55:15 +0000 (12:55 -0700)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 26 Jun 2019 02:15:20 +0000 (02:15 +0000)
Type: refactor

Change-Id: I352975585c1091bfc5b85d7f8fe985f9059820a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
12 files changed:
MAINTAINERS
src/plugins/hs_apps/CMakeLists.txt
src/plugins/hs_apps/sapi/quic_echo.c [moved from src/plugins/hs_apps/quic_echo.c with 100% similarity]
src/plugins/hs_apps/sapi/tcp_echo.c [moved from src/plugins/hs_apps/tcp_echo.c with 100% similarity]
src/plugins/hs_apps/sapi/udp_echo.c [moved from src/plugins/hs_apps/udp_echo.c with 100% similarity]
src/plugins/hs_apps/vcl/sock_test.h [moved from src/vcl/sock_test.h with 98% similarity]
src/plugins/hs_apps/vcl/sock_test_client.c [moved from src/vcl/sock_test_client.c with 99% similarity]
src/plugins/hs_apps/vcl/sock_test_server.c [moved from src/vcl/sock_test_server.c with 99% similarity]
src/plugins/hs_apps/vcl/vcl_test.h [moved from src/vcl/vcl_test.h with 100% similarity]
src/plugins/hs_apps/vcl/vcl_test_client.c [moved from src/vcl/vcl_test_client.c with 99% similarity]
src/plugins/hs_apps/vcl/vcl_test_server.c [moved from src/vcl/vcl_test_server.c with 99% similarity]
src/vcl/CMakeLists.txt

index 4e6ccd0..573a1b5 100644 (file)
@@ -411,6 +411,9 @@ F:  extras/vom/vom/
 Plugin - Host Stack Applications
 I:     hsa
 M:     Florin Coras <fcoras@cisco.com>
+M:     Dave Wallace <dwallacelf@gmail.com>
+M:     Aloys Augustin <aloaugus@cisco.com>
+M:     Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
 F:     src/plugins/hs_apps/
 
 THE REST
index e7885c3..bf1f49c 100644 (file)
@@ -11,6 +11,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+##############################################################################
+# vpp builtin hs apps
+##############################################################################
 add_vpp_plugin(hs_apps
   SOURCES
   echo_client.c
@@ -20,24 +23,46 @@ add_vpp_plugin(hs_apps
   proxy.c
 )
 
-option(VPP_BUILD_SESSION_ECHO_APPS "Build session echo apps." ON)
-if(VPP_BUILD_SESSION_ECHO_APPS)
+##############################################################################
+# vpp external hs apps that use the "raw" session layer api
+##############################################################################
+option(VPP_BUILD_HS_SAPI_APPS "Build hs apps that use the session api." ON)
+if(VPP_BUILD_HS_SAPI_APPS)
   add_vpp_executable(tcp_echo
-    SOURCES tcp_echo.c
+    SOURCES sapi/tcp_echo.c
     LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
     DEPENDS api_headers
     NO_INSTALL
   )
   add_vpp_executable(quic_echo
-    SOURCES quic_echo.c
+    SOURCES sapi/quic_echo.c
     LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
     DEPENDS api_headers
     NO_INSTALL
   )
   add_vpp_executable(udp_echo
-    SOURCES udp_echo.c
+    SOURCES sapi/udp_echo.c
     LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
     DEPENDS api_headers
     NO_INSTALL
   )
-endif(VPP_BUILD_SESSION_ECHO_APPS)
+endif(VPP_BUILD_HS_SAPI_APPS)
+
+##############################################################################
+# vcl tests
+##############################################################################
+option(VPP_BUILD_VCL_TESTS "Build vcl tests." ON)
+if(VPP_BUILD_VCL_TESTS)
+  foreach(test
+    vcl_test_server
+    vcl_test_client
+    sock_test_server
+    sock_test_client
+  )
+    add_vpp_executable(${test}
+      SOURCES "vcl/${test}.c"
+      LINK_LIBRARIES vppcom pthread
+      NO_INSTALL
+    )
+  endforeach()
+endif(VPP_BUILD_VCL_TESTS)
similarity index 98%
rename from src/vcl/sock_test.h
rename to src/plugins/hs_apps/vcl/sock_test.h
index 082c72e..9f7f437 100644 (file)
@@ -20,7 +20,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <vcl/vcl_test.h>
+#include <hs_apps/vcl/vcl_test.h>
 
 #define SOCK_TEST_AF_UNIX_FILENAME    "/tmp/ldp_server_af_unix_socket"
 #define SOCK_TEST_MIXED_EPOLL_DATA    "Hello, world! (over an AF_UNIX socket)"
similarity index 99%
rename from src/vcl/sock_test_client.c
rename to src/plugins/hs_apps/vcl/sock_test_client.c
index a28feee..ea89987 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <arpa/inet.h>
-#include <vcl/sock_test.h>
+#include <hs_apps/vcl/sock_test.h>
 #include <fcntl.h>
 #ifndef VCL_TEST
 #include <sys/un.h>
similarity index 99%
rename from src/vcl/sock_test_server.c
rename to src/plugins/hs_apps/vcl/sock_test_server.c
index 2e678c3..59dae17 100644 (file)
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <time.h>
 #include <ctype.h>
-#include <vcl/sock_test.h>
+#include <hs_apps/vcl/sock_test.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
similarity index 99%
rename from src/vcl/vcl_test_client.c
rename to src/plugins/hs_apps/vcl/vcl_test_client.c
index 42476ff..1ead146 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdio.h>
 #include <time.h>
 #include <arpa/inet.h>
-#include <vcl/vcl_test.h>
+#include <hs_apps/vcl/vcl_test.h>
 #include <pthread.h>
 
 typedef struct
similarity index 99%
rename from src/vcl/vcl_test_server.c
rename to src/plugins/hs_apps/vcl/vcl_test_server.c
index 173bada..62292ad 100644 (file)
@@ -23,7 +23,7 @@
 #include <ctype.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <vcl/vcl_test.h>
+#include <hs_apps/vcl/vcl_test.h>
 #include <sys/epoll.h>
 #include <vppinfra/mem.h>
 #include <pthread.h>
index 2578a37..ab0a6ad 100644 (file)
@@ -40,27 +40,8 @@ add_vpp_library(vcl_ldpreload
 
 add_vpp_headers(vcl
   ldp.h
-  sock_test.h
   ldp_glibc_socket.h
-  vcl_test.h
   vppcom.h
   vcl_locked.h
   ldp_socket_wrapper.h
-)
-
-##############################################################################
-# vcl tests
-##############################################################################
-option(VPP_BUILD_VCL_TESTS "Build vcl tests." ON)
-if(VPP_BUILD_VCL_TESTS)
-  foreach(test
-    vcl_test_server
-    vcl_test_client
-    sock_test_server
-    sock_test_client
-  )
-    add_vpp_executable(${test} SOURCES ${test}.c LINK_LIBRARIES vppcom pthread
-                      NO_INSTALL)
-  endforeach()
-endif(VPP_BUILD_VCL_TESTS)
-
+)
\ No newline at end of file