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 <sagar.arora@openairinterface.org>
This commit is contained in:
Robert Schmidt
2024-09-21 07:12:07 +02:00
co-authored by Sagar Arora
parent 513f0beb37
commit 68c28a4828
2 changed files with 16 additions and 5 deletions
@@ -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 <rte_mbuf.h>
-#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
+1 -1
View File
@@ -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