X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=fapi_5g%2Fsource%2Finclude%2Fnr5g_fapi_config_loader.h;h=bdbf9dcce150fe781219910518755f48754322eb;hb=HEAD;hp=a4cd10a1fd850d2d354c18f10b44891514f08056;hpb=9d66fca5c45c8b3e0d6eab6d51a90c8e9d2614dc;p=o-du%2Fphy.git diff --git a/fapi_5g/source/include/nr5g_fapi_config_loader.h b/fapi_5g/source/include/nr5g_fapi_config_loader.h index a4cd10a..bdbf9dc 100644 --- a/fapi_5g/source/include/nr5g_fapi_config_loader.h +++ b/fapi_5g/source/include/nr5g_fapi_config_loader.h @@ -1,6 +1,6 @@ /****************************************************************************** * -* Copyright (c) 2019 Intel. +* Copyright (c) 2021 Intel. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,13 @@ #include "nr5g_fapi_log.h" #define NR5G_FAPI_DEVICE_NAME_LEN 512 +#define NR5G_FAPI_MEMORY_ZONE_NAME_LEN 512 + +enum { + DPDK_IOVA_PA_MODE = 0, + DPDK_IOVA_VA_MODE, + DPDK_IOVA_MAX_MODE +}; typedef struct _nr5g_fapi_thread_info { pthread_t thread_id; /* ID returned by pthread_create() */ @@ -47,20 +54,32 @@ typedef struct _nr5g_fapi_config_wls_cfg { uint64_t shmem_size; } nr5g_fapi_config_wls_cfg_t; +typedef struct nr5g_fapi_config_dpdk_cfg_t { + uint8_t iova_mode; /*0 - PA mode, 1 - VA mode */ + char memory_zone[NR5G_FAPI_MEMORY_ZONE_NAME_LEN]; +} nr5g_fapi_config_dpdk_cft_t; + typedef struct _nr5g_fapi_config_log_cfg { nr5g_fapi_log_types_t level; } nr5g_fapi_config_log_cfg_t; +typedef struct _nr5g_fapi_thread_params_t { + nr5g_fapi_config_worker_cfg_t thread_worker; + nr5g_fapi_thread_info_t thread_info; +} nr5g_fapi_thread_params_t; + typedef struct _nr5g_fapi_cfg { char *prgname; - nr5g_fapi_config_worker_cfg_t mac2phy_worker; - nr5g_fapi_config_worker_cfg_t phy2mac_worker; - nr5g_fapi_config_worker_cfg_t urllc_worker; + nr5g_fapi_thread_params_t mac2phy_thread_params; + nr5g_fapi_thread_params_t phy2mac_thread_params; + nr5g_fapi_thread_params_t urllc_mac2phy_thread_params; + nr5g_fapi_thread_params_t urllc_phy2mac_thread_params; + bool is_urllc_enabled; nr5g_fapi_config_wls_cfg_t wls; nr5g_fapi_config_log_cfg_t logger; - nr5g_fapi_thread_info_t mac2phy_thread_info; - nr5g_fapi_thread_info_t phy2mac_thread_info; -} nr5g_fapi_cfg_t, *p_nr5g_fapi_cfg_t; + nr5g_fapi_config_dpdk_cft_t dpdk; +} nr5g_fapi_cfg_t, +*p_nr5g_fapi_cfg_t; p_nr5g_fapi_cfg_t nr5g_fapi_config_loader( char *prgname,