From 68c28a4828c904b83c51dbf2d97b2fe1bfa94413 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 20 Sep 2024 09:19:43 +0200 Subject: [PATCH] Modify default xran DPDK socket memory/limit to 0 The default values set by xran for DPDK socket memory/limit is 8192. It is changed when the variable for the memory size, given down to xran, is non-zero (cf also previous patch). Since the last patch, if nothing is given in OAI configuration, OAI will pass down a size of 8192. However, a configuration value of 0 is a valid choice (it is a pre-allocation, DPDK will allocate dynamically), so modify the default in xran to be 0 so that all sizes, including 0, can be given to DPDK. Note that the currently used implementation of xran will always try to allocate this memory on NUMA node 0. If you want to use another one, this field has to be set to 0 (no pre-allocation), and DPDK will allocate it dynamically. Co-authored-by: Sagar Arora --- .../E/oaioran_E.patch | 19 +++++++++++++++---- radio/fhi_72/CMakeLists.txt | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch b/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch index a40aefac2b..e1915cd996 100644 --- a/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch +++ b/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch @@ -1,5 +1,5 @@ diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h -index 7508117..0dbe0bd 100644 +index 7508117..ce17ebd 100644 --- a/fhi_lib/app/src/common.h +++ b/fhi_lib/app/src/common.h @@ -28,7 +28,7 @@ @@ -7,7 +7,7 @@ index 7508117..0dbe0bd 100644 #include -#define VERSIONX "oran_e_maintenance_release_v1.0" -+#define VERSIONX "oran_e_maintenance_release_v1.3" ++#define VERSIONX "oran_e_maintenance_release_v1.4" #define APP_O_DU 0 #define APP_O_RU 1 @@ -136,9 +136,20 @@ index 7d3afc5..e2f1f21 100644 inline int xran_prepare_iq_symbol_portion( struct rte_mbuf *mbuf, diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c -index b6ba257..b53325f 100644 +index b6ba257..1618f65 100644 --- a/fhi_lib/lib/ethernet/ethdi.c +++ b/fhi_lib/lib/ethernet/ethdi.c +@@ -326,8 +326,8 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, + char bbdev_wdev[32] = ""; + char bbdev_vdev[32] = ""; + char iova_mode[32] = "--iova-mode=pa"; +- char socket_mem[32] = "--socket-mem=8192"; +- char socket_limit[32] = "--socket-limit=8192"; ++ char socket_mem[32] = "--socket-mem=0"; ++ char socket_limit[32] = "--socket-limit=0"; + char ring_name[32] = ""; + int32_t xran_port = -1; + portid_t port_id; @@ -335,6 +335,7 @@ xran_ethdi_init_dpdk_io(char *name, const struct xran_io_cfg *io_cfg, uint16_t count; @@ -183,7 +194,7 @@ index e6d3067..8e0abee 100644 static int16_t saturateAbs(int16_t inVal) { diff --git a/fhi_lib/lib/src/xran_bfp_uplane.cpp b/fhi_lib/lib/src/xran_bfp_uplane.cpp -index a345df4..109b05a 100644 +index a345df4..2a94e01 100644 --- a/fhi_lib/lib/src/xran_bfp_uplane.cpp +++ b/fhi_lib/lib/src/xran_bfp_uplane.cpp @@ -90,7 +90,7 @@ namespace BFP_UPlane diff --git a/radio/fhi_72/CMakeLists.txt b/radio/fhi_72/CMakeLists.txt index 5794848afd..2f1b0a356e 100644 --- a/radio/fhi_72/CMakeLists.txt +++ b/radio/fhi_72/CMakeLists.txt @@ -9,7 +9,7 @@ endif() pkg_check_modules(dpdk REQUIRED libdpdk) pkg_check_modules(numa REQUIRED numa) -find_package(xran 5.1.3 EXACT REQUIRED) # E release -> 5 +find_package(xran 5.1.4 EXACT REQUIRED) # E release -> 5 # Ignore xran-specific warning: we don't care/can't change the following warning, so suppress # alignment 1 of 'struct XYZ' is less than 2