diff --git a/CMakeLists.txt b/CMakeLists.txt index 936938ed23..30721256a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -498,7 +498,6 @@ target_link_libraries(shlib_loader PRIVATE CONFIG_LIB) ########################################################## add_boolean_option(ENABLE_LDPC_T2 OFF "Build support for LDPC Offload to T2 library" OFF) -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig") if (ENABLE_LDPC_T2) pkg_check_modules(LIBDPDK_T2 REQUIRED libdpdk=20.11.9) find_library(PMD_T2 NAMES rte_baseband_accl_ldpc HINTS ${LIBDPDK_T2_LIBRARY_DIRS}) diff --git a/doc/LDPC_T2_OFFLOAD_SETUP.md b/doc/LDPC_T2_OFFLOAD_SETUP.md index d6335ecbaf..10c91fea33 100644 --- a/doc/LDPC_T2_OFFLOAD_SETUP.md +++ b/doc/LDPC_T2_OFFLOAD_SETUP.md @@ -70,13 +70,10 @@ the host machine* # Modifications in the OAI code ## DPDK lib and PMD path specification -Path to the DPDK lib and Accelercomm PMD for operating the card is specified in the `CMakeLists.txt` file, in -*LDPC OFFLOAD library* section. Modify following line based on the location of -`libdpdk.pc` file associated with the target DPDK library on your system. By default, the path is set to `/usr/local/lib/x86_64-linux-gnu/pkgconfig`. +If DPDK library was installed into custom path, you have to point to the right directory with `PKG_CONFIG_PATH`, prior to the OAI build. Sample command to set the DPDK path to `/opt/dpdk-t2/lib64/pkgconfig/`: ``` -set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/x86_64-linux-gnu/pkgconfig") +export PKG_CONFIG_PATH=/opt/dpdk-t2/lib64/pkgconfig/:$PKG_CONFIG_PATH ``` - ## T2 card DPDK initialization Following lines in `openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c` file has to be modified based on your system requirements. By default, PCI address of the T2 card is set to 41:00.0 and cores 14 and 15 are assigned to the DPDK. @@ -109,6 +106,7 @@ source oaienv cd cmake_targets ./build_oai -w USRP --ninja --gNB -P --build-lib "ldpc_t2" -C ``` + Shared object file *libldpc_t2.so* is created during the compilation. This object is conditionally compiled. Selection of the library to compile is done using *--build-lib ldpc_t2*. *Required poll mode driver has to be present on the host machine and required DPDK version has to be installed on the host, prior to the build of OAI* diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c index dafdf28644..2f05e93f32 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_decoder_offload.c @@ -941,7 +941,7 @@ int32_t LDPCinit() int dev_id = 0; struct rte_bbdev_info info; struct active_device *ad = active_devs; - char *dpdk_dev = "41:00.0"; //PCI address of the card + char *dpdk_dev = "d8:00.0"; //PCI address of the card char *argv_re[] = {"bbdev", "-a", dpdk_dev, "-l", "14-15", "--file-prefix=b6", "--"}; // EAL initialization, if already initialized (init in xran lib) try to probe DPDK device ret = rte_eal_init(5, argv_re);