Commit b32b9e83 authored by Robert Schmidt's avatar Robert Schmidt

O-RAN 7.2: make DPDK system core configurable

system_core is the core reserved for DPDK control threads. It was
hardcoded to 0, but it seems that one some systems, CPU 0 cannot be
reasonably isolated from kernel threads. Make it therefore configurable
(default: 0)

Closes: #732 (suggestion 1)
Suggested-by: default avatarAndrew Sergeev <andrew.sergeev@adtran.com>
parent 0fb0a9a4
...@@ -601,6 +601,8 @@ Edit the sample OAI gNB configuration file and check following parameters: ...@@ -601,6 +601,8 @@ Edit the sample OAI gNB configuration file and check following parameters:
that is employed by the xRAN library (`xran_fh_init` and `xran_fh_config` that is employed by the xRAN library (`xran_fh_init` and `xran_fh_config`
structs in the code): structs in the code):
* `dpdk_devices`: PCI addresses of NIC VFs binded to the DPDK * `dpdk_devices`: PCI addresses of NIC VFs binded to the DPDK
* `system_core`: absolute CPU core ID for DPDK control threads
(`rte_mp_handle`, `eal-intr-thread`, `iavf-event-thread`)
* `io_core`: absolute CPU core ID for XRAN library * `io_core`: absolute CPU core ID for XRAN library
* `worker_cores`: array of absolute CPU core IDs for XRAN library * `worker_cores`: array of absolute CPU core IDs for XRAN library
* `du_addr`: DU C- and U-plane MAC-addresses (format `UU:VV:WW:XX:YY:ZZ`, * `du_addr`: DU C- and U-plane MAC-addresses (format `UU:VV:WW:XX:YY:ZZ`,
......
...@@ -500,7 +500,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in ...@@ -500,7 +500,7 @@ static bool set_fh_io_cfg(struct xran_io_cfg *io_cfg, const paramdef_t *fhip, in
io_cfg->dpdkIoVaMode = 0; /* IOVA mode */ io_cfg->dpdkIoVaMode = 0; /* IOVA mode */
io_cfg->dpdkMemorySize = 0; /* DPDK memory size */ io_cfg->dpdkMemorySize = 0; /* DPDK memory size */
io_cfg->core = *gpd(fhip, nump, ORAN_CONFIG_IO_CORE)->iptr; io_cfg->core = *gpd(fhip, nump, ORAN_CONFIG_IO_CORE)->iptr;
io_cfg->system_core = 0; /* TODO how called in sample app? */ io_cfg->system_core = *gpd(fhip, nump, ORAN_CONFIG_SYSTEM_CORE)->iptr;
io_cfg->pkt_proc_core = get_u64_mask(gpd(fhip, nump, ORAN_CONFIG_WORKER_CORES)); io_cfg->pkt_proc_core = get_u64_mask(gpd(fhip, nump, ORAN_CONFIG_WORKER_CORES));
io_cfg->pkt_proc_core_64_127 = 0x0; // bitmap 0 -> no core io_cfg->pkt_proc_core_64_127 = 0x0; // bitmap 0 -> no core
io_cfg->pkt_aux_core = 0; /* sapmle app says 0 = "do not start" */ io_cfg->pkt_aux_core = 0; /* sapmle app says 0 = "do not start" */
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#define CONFIG_STRING_ORAN "fhi_72" #define CONFIG_STRING_ORAN "fhi_72"
#define ORAN_CONFIG_DPDK_DEVICES "dpdk_devices" #define ORAN_CONFIG_DPDK_DEVICES "dpdk_devices"
#define ORAN_CONFIG_SYSTEM_CORE "system_core"
#define ORAN_CONFIG_IO_CORE "io_core" #define ORAN_CONFIG_IO_CORE "io_core"
#define ORAN_CONFIG_WORKER_CORES "worker_cores" #define ORAN_CONFIG_WORKER_CORES "worker_cores"
#define ORAN_CONFIG_DU_ADDR "du_addr" #define ORAN_CONFIG_DU_ADDR "du_addr"
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
// TODO: ethernet addr check // TODO: ethernet addr check
#define ORAN_GLOBALPARAMS_DESC { \ #define ORAN_GLOBALPARAMS_DESC { \
{ORAN_CONFIG_DPDK_DEVICES, "PCI addr of devices for DPDK\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \ {ORAN_CONFIG_DPDK_DEVICES, "PCI addr of devices for DPDK\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
{ORAN_CONFIG_SYSTEM_CORE, "DPDK control threads core\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
{ORAN_CONFIG_IO_CORE, "DPDK Core used for IO\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ {ORAN_CONFIG_IO_CORE, "DPDK Core used for IO\n", PARAMFLAG_MANDATORY, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \
{ORAN_CONFIG_WORKER_CORES, "CPU Cores to use for workers\n", PARAMFLAG_MANDATORY, .uptr=NULL, .defintarrayval=NULL,TYPE_UINTARRAY, 0}, \ {ORAN_CONFIG_WORKER_CORES, "CPU Cores to use for workers\n", PARAMFLAG_MANDATORY, .uptr=NULL, .defintarrayval=NULL,TYPE_UINTARRAY, 0}, \
{ORAN_CONFIG_DU_ADDR, "Ether addr of DU\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \ {ORAN_CONFIG_DU_ADDR, "Ether addr of DU\n", PARAMFLAG_MANDATORY, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \
......
...@@ -284,6 +284,7 @@ log_config : { ...@@ -284,6 +284,7 @@ log_config : {
fhi_72 = { fhi_72 = {
dpdk_devices = ("0000:31:06.0", "0000:31:06.1"); dpdk_devices = ("0000:31:06.0", "0000:31:06.1");
system_core = 0;
io_core = 4; io_core = 4;
worker_cores = (2); worker_cores = (2);
du_addr = ("76:76:64:6e:00:01", "76:76:64:6e:00:01"); du_addr = ("76:76:64:6e:00:01", "76:76:64:6e:00:01");
......
...@@ -272,6 +272,7 @@ log_config : ...@@ -272,6 +272,7 @@ log_config :
fhi_72 = { fhi_72 = {
dpdk_devices = ("0000:31:06.0", "0000:31:06.1"); dpdk_devices = ("0000:31:06.0", "0000:31:06.1");
system_core = 0;
io_core = 4; io_core = 4;
worker_cores = (2); worker_cores = (2);
du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67"); du_addr = ("00:11:22:33:44:66", "00:11:22:33:44:67");
......
...@@ -275,6 +275,7 @@ log_config : ...@@ -275,6 +275,7 @@ log_config :
fhi_72 = { fhi_72 = {
dpdk_devices = ("0000:31:06.0", "0000:31:06.1"); dpdk_devices = ("0000:31:06.0", "0000:31:06.1");
system_core = 0;
io_core = 4; io_core = 4;
worker_cores = (2); worker_cores = (2);
du_addr = ("00:11:22:33:44:99", "00:11:22:33:44:99"); du_addr = ("00:11:22:33:44:99", "00:11:22:33:44:99");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment