Merge remote-tracking branch 'origin/oran-iova-config' into integration_2025_w02 (!3189)
fhi_72: allow to provide dpdk_iova_mode to xran
- Introduce a gNB configuration option that enables users to select the
desired IOVA mode for DPDK ("PA" or "VA") with dpdk_iova_mode
parameters in fhi_72 configuration section. If not set, the default
remains PA mode to ensure backward compatibility with existing
configurations. Detailed information about IOVA modes, including their
advantages and disadvantages, can be found in the DPDK documentation:
Memory in DPDK Part 2: Deep Dive into IOVA
- Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability for the docker container.
- Switch to IOVA VA mode in the FHI7.2 pipeline and reduce the required
capabilities for the docker container.
This commit is contained in:
@@ -472,7 +472,9 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in
|
||||
}
|
||||
io_cfg->bbdev_dev[0] = NULL; // BBDev dev name; max devices = 1
|
||||
io_cfg->bbdev_mode = XRAN_BBDEV_NOT_USED; // DPDK for BBDev
|
||||
io_cfg->dpdkIoVaMode = 0; // IOVA mode
|
||||
int dpdk_iova_mode_idx = config_paramidx_fromname((paramdef_t *)fhip, nump, ORAN_CONFIG_DPDK_IOVA_MODE);
|
||||
AssertFatal(dpdk_iova_mode_idx >= 0,"Index for dpdk_iova_mode config option not found!");
|
||||
io_cfg->dpdkIoVaMode = config_get_processedint(config_get_if(), (paramdef_t *)&fhip[dpdk_iova_mode_idx]); // IOVA mode
|
||||
io_cfg->dpdkMemorySize = *gpd(fhip, nump, ORAN_CONFIG_DPDK_MEM_SIZE)->uptr; // DPDK max memory allocation
|
||||
|
||||
/* the following core assignment is needed for rte_eal_init() function within xran library;
|
||||
@@ -586,7 +588,11 @@ static bool set_fh_init(struct xran_fh_init *fh_init, enum xran_category xran_ca
|
||||
}
|
||||
|
||||
paramdef_t fhip[] = ORAN_GLOBALPARAMS_DESC;
|
||||
checkedparam_t fhip_CheckParams[] = ORAN_GLOBALPARAMS_CHECK_DESC;
|
||||
static_assert(sizeofArray(fhip) == sizeofArray(fhip_CheckParams),
|
||||
"fhip and fhip_CheckParams should have the same size");
|
||||
int nump = sizeofArray(fhip);
|
||||
config_set_checkfunctions(fhip, fhip_CheckParams, nump);
|
||||
int ret = config_get(config_get_if(), fhip, nump, CONFIG_STRING_ORAN);
|
||||
if (ret <= 0) {
|
||||
printf("problem reading section \"%s\"\n", CONFIG_STRING_ORAN);
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#define ORAN_CONFIG_NETHPERPORT "eth_lines"
|
||||
#define ORAN_CONFIG_NETHSPEED "eth_speed"
|
||||
#define ORAN_CONFIG_DPDK_MEM_SIZE "dpdk_mem_size"
|
||||
#define ORAN_CONFIG_DPDK_IOVA_MODE "dpdk_iova_mode"
|
||||
#define ORAN_CONFIG_ECPRI_OWDM "owdm_enable"
|
||||
|
||||
// clang-format off
|
||||
@@ -53,8 +54,28 @@
|
||||
{ORAN_CONFIG_NETHPERPORT, "number of links per port\n", 0, .uptr=NULL, .defuintval=1, TYPE_UINT, 0}, \
|
||||
{ORAN_CONFIG_NETHSPEED, "ethernet speed link\n", 0, .uptr=NULL, .defuintval=10, TYPE_UINT, 0}, \
|
||||
{ORAN_CONFIG_DPDK_MEM_SIZE, "DPDK huge page pre-allocation in MiB\n", 0, .uptr=NULL, .defuintval=8192, TYPE_UINT, 0}, \
|
||||
{ORAN_CONFIG_DPDK_IOVA_MODE, "DPDK IOVA mode\n", 0, .strptr=NULL, .defstrval="PA", TYPE_STRING, 0}, \
|
||||
{ORAN_CONFIG_ECPRI_OWDM, "eCPRI One-Way Delay Measurements\n", PARAMFLAG_BOOL, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
#define ORAN_GLOBALPARAMS_CHECK_DESC { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s3a = { config_checkstr_assign_integer, \
|
||||
{"PA", "VA"}, {0, 1}, 2} }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
|
||||
// clang-format on
|
||||
|
||||
#define CONFIG_STRING_ORAN_FH "fh_config"
|
||||
|
||||
Reference in New Issue
Block a user