diff --git a/examples_sw/apps/rdma_service/client/main.cpp b/examples_sw/apps/rdma_service/client/main.cpp index fea76a98..c7e0ea1a 100644 --- a/examples_sw/apps/rdma_service/client/main.cpp +++ b/examples_sw/apps/rdma_service/client/main.cpp @@ -67,6 +67,9 @@ constexpr auto const defMinSize = 1024; constexpr auto const defMaxSize = 64 * 1024; constexpr auto const defNRepsThr = 1000; constexpr auto const defNRepsLat = 100; +constexpr auto const def_encryption_required = false; +constexpr auto const def_compression_required = false; +constexpr auto const def_dpi_required = false; int main(int argc, char *argv[]) { @@ -96,7 +99,10 @@ int main(int argc, char *argv[]) ("min_size,n", boost::program_options::value(), "Minimal transfer size") ("max_size,x", boost::program_options::value(), "Maximum transfer size") ("reps_thr,r", boost::program_options::value(), "Number of reps, throughput") - ("reps_lat,l", boost::program_options::value(), "Number of reps, latency"); + ("reps_lat,l", boost::program_options::value(), "Number of reps, latency") + ("encryption,e", boost::program_options::value(), "Encryption required") + ("compression,c", boost::program_options::value(), "Compression required") + ("dpi,p", boost::program_options::value(), "DPI required"); boost::program_options::variables_map commandLineArgs; boost::program_options::store(boost::program_options::parse_command_line(argc, argv, programDescription), commandLineArgs); @@ -112,6 +118,9 @@ int main(int argc, char *argv[]) uint32_t max_size = defMaxSize; uint32_t n_reps_thr = defNRepsThr; uint32_t n_reps_lat = defNRepsLat; + bool encryption_required = def_encryption_required; + bool compression_required = def_compression_required; + bool dpi_required = def_dpi_required; // Read the actual arguments from the command line and parse them to variables for further usage, for setting the experiment correctly if(commandLineArgs.count("bitstream") > 0) { @@ -134,6 +143,9 @@ int main(int argc, char *argv[]) if(commandLineArgs.count("max_size") > 0) max_size = commandLineArgs["max_size"].as(); if(commandLineArgs.count("reps_thr") > 0) n_reps_thr = commandLineArgs["reps_thr"].as(); if(commandLineArgs.count("reps_lat") > 0) n_reps_lat = commandLineArgs["reps_lat"].as(); + if(commandLineArgs.count("encryption") > 0) encryption_required = commandLineArgs["encryption"].as(); + if(commandLineArgs.count("compression") > 0) compression_required = commandLineArgs["compression"].as(); + if(commandLineArgs.count("dpi") > 0) dpi_required = commandLineArgs["dpi"].as(); // ----------------------------------------------------------------------------------------------------------------------- // RDMA client side @@ -145,7 +157,7 @@ int main(int argc, char *argv[]) std::cout << "rdma_client: Target-vfid: " << defTargetVfid << std::endl; std::cout << "rdma_client: Current process ID: " << getpid() << std::endl; # endif - cThread cthread(defTargetVfid, getpid(), cs_dev); + cThread cthread(defTargetVfid, getpid(), cs_dev, nullptr, nullptr, encryption_required, compression_required, dpi_required); // Get memory in the max size of the experiment. Argument is a cs_alloc-struct: Huge Page, max size, is remote // This operation attaches the buffer to the Thread, which is required for the cLib constructor for RDMA-capabilities diff --git a/sw/include/cDefs.hpp b/sw/include/cDefs.hpp index 5cd50148..d2fa9e02 100644 --- a/sw/include/cDefs.hpp +++ b/sw/include/cDefs.hpp @@ -549,7 +549,7 @@ struct ibvQ { uint64_t aes_high = (uint64_t)(aes_key >> 64); uint64_t aes_low = (uint64_t)(aes_key); - printf("%s: QPN 0x%06x, PSN 0x%06x, VADDR %016lx, SIZE %08x, IP 0x%08x\n, AES-key 0x%lx%016lx\n, Compression %d\n, DPI %d\n", + printf("%s: QPN 0x%06x, PSN 0x%06x, VADDR %016lx, SIZE %08x, IP 0x%08x, AES-key 0x%lx%016lx, Compression %d, DPI %d\n", name, qpn, psn, (uint64_t)vaddr, size, ip_addr, aes_high, aes_low, compression_enabled, dpi_enabled); } }; diff --git a/sw/include/cThread.hpp b/sw/include/cThread.hpp index a86b5054..5e0b2179 100644 --- a/sw/include/cThread.hpp +++ b/sw/include/cThread.hpp @@ -67,8 +67,8 @@ class cThread : public bThread { * @brief Ctor, Dtor * The cThread inherits from the bThread. Thus, the constructor of the bThread is called with the arguments for vfid, hpid, dev, scheduler and uisr */ - cThread(int32_t vfid, pid_t hpid, uint32_t dev, cSched *csched = nullptr, void (*uisr)(int) = nullptr) : - bThread(vfid, hpid, dev, csched, uisr) { + cThread(int32_t vfid, pid_t hpid, uint32_t dev, cSched *csched = nullptr, void (*uisr)(int) = nullptr, bool encryption_required = false, bool compression_required = false, bool dpi_required = false) : + bThread(vfid, hpid, dev, csched, uisr, encryption_required, compression_required, dpi_required) { # ifdef VERBOSE std::cout << "cThread: Created an instance with vfid " << vfid << ", hpid " << hpid << ", device " << dev << std::endl; # endif