diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6f896119..e4ae0c4c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,6 +34,7 @@ if(LIBDPDK_STATIC_FOUND) enable_testing() add_subdirectory(tests) add_subdirectory(apps) + add_subdirectory(tools) else() message(WARNING "DPDK not found and RTE_SDK is not set. Building only msg_gen.") add_subdirectory(apps/msg_gen) diff --git a/src/apps/CMakeLists.txt b/src/apps/CMakeLists.txt index 905eea0c..a4b3c39e 100644 --- a/src/apps/CMakeLists.txt +++ b/src/apps/CMakeLists.txt @@ -1,9 +1,5 @@ include_directories(../modules) -add_subdirectory(pktgen) add_subdirectory(machnet) add_subdirectory(msg_gen) -add_subdirectory(ping) add_subdirectory(rocksdb_server) -add_subdirectory(jring_perf) -add_subdirectory(jring2_perf) diff --git a/src/apps/hello_world/CMakeLists.txt b/src/apps/hello_world/CMakeLists.txt deleted file mode 100644 index 09cce407..00000000 --- a/src/apps/hello_world/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(target_name hello_world) -add_executable (${target_name} main.cc) -target_link_libraries(${target_name} PUBLIC glog core machnet_shim rt gflags) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt new file mode 100644 index 00000000..eb2ceb0b --- /dev/null +++ b/src/tools/CMakeLists.txt @@ -0,0 +1,6 @@ +include_directories(../modules) + +add_subdirectory(pktgen) +add_subdirectory(ping) +add_subdirectory(jring_perf) +add_subdirectory(jring2_perf) diff --git a/src/apps/jring2_perf/CMakeLists.txt b/src/tools/jring2_perf/CMakeLists.txt similarity index 100% rename from src/apps/jring2_perf/CMakeLists.txt rename to src/tools/jring2_perf/CMakeLists.txt diff --git a/src/apps/jring2_perf/main.cc b/src/tools/jring2_perf/main.cc similarity index 100% rename from src/apps/jring2_perf/main.cc rename to src/tools/jring2_perf/main.cc diff --git a/src/apps/jring_perf/CMakeLists.txt b/src/tools/jring_perf/CMakeLists.txt similarity index 100% rename from src/apps/jring_perf/CMakeLists.txt rename to src/tools/jring_perf/CMakeLists.txt diff --git a/src/apps/jring_perf/main.cc b/src/tools/jring_perf/main.cc similarity index 100% rename from src/apps/jring_perf/main.cc rename to src/tools/jring_perf/main.cc diff --git a/src/apps/ping/CMakeLists.txt b/src/tools/ping/CMakeLists.txt similarity index 100% rename from src/apps/ping/CMakeLists.txt rename to src/tools/ping/CMakeLists.txt diff --git a/src/apps/ping/README.md b/src/tools/ping/README.md similarity index 86% rename from src/apps/ping/README.md rename to src/tools/ping/README.md index 7bb9c70a..bfe74590 100644 --- a/src/apps/ping/README.md +++ b/src/tools/ping/README.md @@ -33,9 +33,8 @@ Other legal configuration options are safely ignored (for example, `engine_threa ### Running -From `${REPOROOT}/build/src/apps/ping`: +From `${REPOROOT}/build/src/tools/ping`: ```bash sudo GLOG_logtostderr=1 ./ping --remote_ip 10.0.0.1 ``` -**Attention**: Currently the utility expects the remote host to be specified with its IP address. This will be fixed in the future to support hostnames as well. diff --git a/src/apps/ping/main.cc b/src/tools/ping/main.cc similarity index 100% rename from src/apps/ping/main.cc rename to src/tools/ping/main.cc diff --git a/src/apps/pktgen/CMakeLists.txt b/src/tools/pktgen/CMakeLists.txt similarity index 100% rename from src/apps/pktgen/CMakeLists.txt rename to src/tools/pktgen/CMakeLists.txt diff --git a/src/apps/pktgen/README.md b/src/tools/pktgen/README.md similarity index 89% rename from src/apps/pktgen/README.md rename to src/tools/pktgen/README.md index d1e27139..09abffd2 100644 --- a/src/apps/pktgen/README.md +++ b/src/tools/pktgen/README.md @@ -30,7 +30,7 @@ When running in this mode the application is actively generating packets. It als # Send packets to a remote host. REMOTE_IP="10.0.0.254" cd ${REPOROOT}/build/ -sudo GLOG_logtostderr=1 ./src/apps/pktgen/pktgen --remote_ip $REMOTE_IP --active-generator +sudo GLOG_logtostderr=1 ./src/tools/pktgen/pktgen --remote_ip $REMOTE_IP --active-generator # If ran from a different directory, you may need to specify the path to the config file: sudo GLOG_logtostderr=1 ./pktgen --config_file ${REPOROOT}/src/apps/machnet/config.json --remote_ip $REMOTE_IP --active-generator @@ -41,7 +41,7 @@ The above command will run the `pktgen` application to a remote machine with IP ```bash # From ${REPOROOT}/build/ -sudo GLOG_logtostderr=1 ./src/apps/pktgen/pktgen --remote_ip $REMOTE_IP --active-generator --pkt_size 1500 +sudo GLOG_logtostderr=1 ./src/tools/pktgen/pktgen --remote_ip $REMOTE_IP --active-generator --pkt_size 1500 ``` ### Running in ping mode (RTT measurement) @@ -53,7 +53,7 @@ The `pktgen` is collecting roundtrip time measurements. When stopping the apppli ```bash REMOTE_IP="10.0.0.254" # From ${REPOROOT}/build/ -sudo GLOG_logtostderr=1 ./src/apps/pktgen/pktgen --remote_ip $REMOTE_IP --ping +sudo GLOG_logtostderr=1 ./src/tools/pktgen/pktgen --remote_ip $REMOTE_IP --ping ``` If you want RTT measurements printed every 1 second, add option `--v=1` to the previous invocation. @@ -66,12 +66,12 @@ To save the samples in a log file add option: `--rtt_log path/to/file`. When running in this mode the application is only bouncing packets to the remote host. It does not generate any other packets. -From `${REPOROOT}/build/src/apps/pktgen`: +From `${REPOROOT}/build/src/tools/pktgen`: ```bash REMOTE_IP="10.0.0.254" # From ${REPOROOT}/build/ -sudo GLOG_logtostderr=1 ./src/apps/pktgen/pktgen +sudo GLOG_logtostderr=1 ./src/tools/pktgen/pktgen ``` The above command will run the `pktgen` application in **passive** mode on local machine. It will send all received packets to the originating remote server. diff --git a/src/apps/pktgen/main.cc b/src/tools/pktgen/main.cc similarity index 100% rename from src/apps/pktgen/main.cc rename to src/tools/pktgen/main.cc