X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fapi_5g%2Fsource%2Finclude%2Fnr5g_fapi_config_loader.h;fp=fapi_5g%2Fsource%2Finclude%2Fnr5g_fapi_config_loader.h;h=a4cd10a1fd850d2d354c18f10b44891514f08056;hp=0000000000000000000000000000000000000000;hb=9d66fca5c45c8b3e0d6eab6d51a90c8e9d2614dc;hpb=2fbf70096f64af622da983e88c5a64e90ad9bdbd diff --git a/fapi_5g/source/include/nr5g_fapi_config_loader.h b/fapi_5g/source/include/nr5g_fapi_config_loader.h new file mode 100644 index 0000000..a4cd10a --- /dev/null +++ b/fapi_5g/source/include/nr5g_fapi_config_loader.h @@ -0,0 +1,69 @@ +/****************************************************************************** +* +* Copyright (c) 2019 Intel. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ + +/** + * @file This file consist of FAPI internal functions. + * + **/ + +#ifndef NR5G_FAPI_CONFIG_LOADER_H_ +#define NR5G_FAPI_CONFIG_LOADER_H_ + +#include "nr5g_fapi_std.h" +#include "nr5g_fapi_common_types.h" +#include "nr5g_fapi_dpdk.h" +#include "nr5g_fapi_log.h" + +#define NR5G_FAPI_DEVICE_NAME_LEN 512 + +typedef struct _nr5g_fapi_thread_info { + pthread_t thread_id; /* ID returned by pthread_create() */ + pthread_attr_t thread_attr; +} nr5g_fapi_thread_info_t; + +typedef struct _nr5g_fapi_config_worker_cfg { + uint8_t core_id; + uint8_t thread_priority; + uint8_t thread_sched_policy; +} nr5g_fapi_config_worker_cfg_t; + +typedef struct _nr5g_fapi_config_wls_cfg { + char device_name[NR5G_FAPI_DEVICE_NAME_LEN]; + uint64_t shmem_size; +} nr5g_fapi_config_wls_cfg_t; + +typedef struct _nr5g_fapi_config_log_cfg { + nr5g_fapi_log_types_t level; +} nr5g_fapi_config_log_cfg_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_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; + +p_nr5g_fapi_cfg_t nr5g_fapi_config_loader( + char *prgname, + const char *cfg_fname); + +#endif // NR5G_FAPI_CONFIG_LOADER_H_