2424#include " srsran/phy/upper/rx_softbuffer_pool.h"
2525#include " srsran/phy/upper/unique_rx_softbuffer.h"
2626#include " srsran/support/test_utils.h"
27- #ifdef DPDK_FOUND
27+ #ifdef HWACC_PUSCH_ENABLED
2828#include " srsran/hal/dpdk/bbdev/bbdev_acc.h"
2929#include " srsran/hal/dpdk/bbdev/bbdev_acc_factory.h"
3030#include " srsran/hal/dpdk/dpdk_eal_factory.h"
3131#include " srsran/hal/phy/upper/channel_processors/pusch/ext_harq_buffer_context_repository_factory.h"
3232#include " srsran/hal/phy/upper/channel_processors/pusch/hal_factories.h"
3333#include " srsran/hal/phy/upper/channel_processors/pusch/hw_accelerator_pusch_dec_factory.h"
34- #endif // DPDK_FOUND
34+ #endif // HWACC_PUSCH_ENABLED
3535#include < getopt.h>
3636
3737// / \cond
@@ -42,30 +42,30 @@ static unsigned nof_ldpc_iterations = 6;
4242
4343static std::string decoder_type = " generic" ;
4444
45- #ifdef DPDK_FOUND
45+ #ifdef HWACC_PUSCH_ENABLED
4646static bool test_harq = true ;
4747static bool ext_softbuffer = true ;
4848static bool std_out_sink = true ;
4949static std::string hal_log_level = " error" ;
5050static std::string eal_arguments = " " ;
51- #endif // DPDK_FOUND
51+ #endif // HWACC_PUSCH_ENABLED
5252
5353static void usage (const char * prog)
5454{
5555 fmt::print (" Usage: {} [-T X] [-e] [-i X] [-x] [-y] [-z error|warning|info|debug] [-h] [eal_args ...]\n " , prog);
5656 fmt::print (" \t -T PUSCH decoder type [generic,acc100][Default {}]\n " , decoder_type);
5757 fmt::print (" \t -e Use LDPC decoder early stop [Default {}]\n " , use_early_stop);
5858 fmt::print (" \t -i Number of LDPC iterations [Default {}]\n " , nof_ldpc_iterations);
59- #ifdef DPDK_FOUND
59+ #ifdef HWACC_PUSCH_ENABLED
6060 fmt::print (" \t -x Use the host's memory for the soft-buffer [Default {}]\n " , !ext_softbuffer);
6161 fmt::print (" \t -y Force logging output written to a file [Default {}]\n " , std_out_sink ? " std_out" : " file" );
6262 fmt::print (" \t -z Set logging level for the HAL [Default {}]\n " , hal_log_level);
6363 fmt::print (" \t eal_args EAL arguments\n " );
64- #endif // DPDK_FOUND
64+ #endif // HWACC_PUSCH_ENABLED
6565 fmt::print (" \t -h This help\n " );
6666}
6767
68- #ifdef DPDK_FOUND
68+ #ifdef HWACC_PUSCH_ENABLED
6969// Separates EAL and non-EAL arguments.
7070// The function assumes that 'eal_arg' flags the start of the EAL arguments and that no more non-EAL arguments follow.
7171static std::string capture_eal_args (int * argc, char *** argv)
@@ -96,7 +96,7 @@ static std::string capture_eal_args(int* argc, char*** argv)
9696
9797 return eal_argv;
9898}
99- #endif // DPDK_FOUND
99+ #endif // HWACC_PUSCH_ENABLED
100100
101101static void parse_args (int argc, char ** argv)
102102{
@@ -112,7 +112,7 @@ static void parse_args(int argc, char** argv)
112112 case ' i' :
113113 nof_ldpc_iterations = strtol (optarg, nullptr , 10 );
114114 break ;
115- #ifdef DPDK_FOUND
115+ #ifdef HWACC_PUSCH_ENABLED
116116 case ' x' :
117117 ext_softbuffer = false ;
118118 break ;
@@ -122,7 +122,7 @@ static void parse_args(int argc, char** argv)
122122 case ' z' :
123123 hal_log_level = std::string (optarg);
124124 break ;
125- #endif // DPDK_FOUND
125+ #endif // HWACC_PUSCH_ENABLED
126126 case ' h' :
127127 default :
128128 usage (argv[0 ]);
@@ -156,7 +156,7 @@ static std::shared_ptr<pusch_decoder_factory> create_generic_pusch_decoder_facto
156156
157157static std::shared_ptr<hal::hw_accelerator_pusch_dec_factory> create_hw_accelerator_pusch_dec_factory ()
158158{
159- #ifdef DPDK_FOUND
159+ #ifdef HWACC_PUSCH_ENABLED
160160 srslog::sink* log_sink =
161161 std_out_sink ? srslog::create_stdout_sink () : srslog::create_file_sink (" pusch_decoder_vectortest.log" );
162162 srslog::set_default_sink (*log_sink);
@@ -198,9 +198,9 @@ static std::shared_ptr<hal::hw_accelerator_pusch_dec_factory> create_hw_accelera
198198
199199 // ACC100 hardware-accelerator implementation.
200200 return create_hw_accelerator_pusch_dec_factory (hw_decoder_config);
201- #else // DPDK_FOUND
201+ #else // HWACC_PUSCH_ENABLED
202202 return nullptr ;
203- #endif // DPDK_FOUND
203+ #endif // HWACC_PUSCH_ENABLED
204204}
205205
206206static std::shared_ptr<pusch_decoder_factory> create_acc100_pusch_decoder_factory ()
@@ -245,10 +245,10 @@ static std::shared_ptr<pusch_decoder_factory> create_pusch_decoder_factory()
245245
246246int main (int argc, char ** argv)
247247{
248- #ifdef DPDK_FOUND
248+ #ifdef HWACC_PUSCH_ENABLED
249249 // Separate EAL and non-EAL arguments.
250250 eal_arguments = capture_eal_args (&argc, &argv);
251- #endif // DPDK_FOUND
251+ #endif // HWACC_PUSCH_ENABLED
252252
253253 // Parse generic arguments.
254254 parse_args (argc, argv);
@@ -287,11 +287,11 @@ int main(int argc, char** argv)
287287 pool_config.max_nof_codeblocks = nof_codeblocks;
288288 pool_config.expire_timeout_slots = 10 ;
289289 pool_config.external_soft_bits = false ;
290- #ifdef DPDK_FOUND
290+ #ifdef HWACC_PUSCH_ENABLED
291291 if (decoder_type == " acc100" ) {
292292 pool_config.external_soft_bits = ext_softbuffer;
293293 }
294- #endif // DPDK_FOUND
294+ #endif // HWACC_PUSCH_ENABLED
295295
296296 // Create Rx softbuffer pool.
297297 std::unique_ptr<rx_softbuffer_pool> pool = create_rx_softbuffer_pool (pool_config);
0 commit comments