1 /******************************************************************************
3 * Copyright (c) 2019 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
20 #include "nr5g_fapi_std.h"
21 #include "nr5g_fapi_common_types.h"
22 #include "nr5g_fapi_args.h"
23 #include "nr5g_fapi_config_loader.h"
24 #include "nr5g_fapi_dpdk.h"
25 #include "nr5g_fapi_framework.h"
26 #include "nr5g_fapi_cmd.h"
32 const char *config_file = NULL;
33 p_nr5g_fapi_cfg_t config = NULL;
35 if (NULL == (config_file = nr5g_fapi_parse_args(argc, argv))) {
36 NR5G_FAPI_LOG(ERROR_LOG, ("Config file parsing error"));
40 if (NULL == (config = nr5g_fapi_config_loader(argv[0], config_file))) {
41 NR5G_FAPI_LOG(ERROR_LOG, ("Config file loading error"));
45 nr5g_fapi_dpdk_init(config);
47 if (FAILURE == nr5g_fapi_framework_init(config)) {
48 NR5G_FAPI_LOG(ERROR_LOG, ("ORAN_5G_FAPI init failed"));
51 NR5G_FAPI_LOG(INFO_LOG, ("ORAN_5G_FAPI init successful"));
53 nr5g_fapi_cmgr((void *)config);
54 nr5g_fapi_dpdk_wait(config);
55 pthread_attr_destroy(&config->phy2mac_thread_info.thread_attr);
56 pthread_attr_destroy(&config->mac2phy_thread_info.thread_attr);
57 pthread_attr_destroy(&config->urllc_thread_info.thread_attr);