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 * @brief This file is test MAC wls lib main process
22 * @ingroup group_testmacwls
23 * @author Intel Corporation
33 #define WLS_TEST_DEV_NAME "wls"
34 #define WLS_TEST_MSG_ID 1
35 #define WLS_TEST_MSG_SIZE 100
36 #define WLS_TEST_MEM_SIZE 2126512128
42 p_fapi_api_queue_elem_t p_list_elem;
44 unsigned int n= N_MAC_MSGS;
48 ret = mac_dpdk_init();
51 printf("\n[MAC] DPDK Init - Failed\n");
54 printf("\n[MAC] DPDK Init - Done\n");
56 wls_mac_init(WLS_TEST_DEV_NAME, WLS_TEST_MEM_SIZE);
57 printf("\n[MAC] WLS Init - Done\n");
59 for (i=0; i< N_MAC_MSGS; i++)
61 p_list_elem = wls_mac_create_elem(WLS_TEST_MSG_ID, WLS_TEST_MSG_SIZE, 1, 0);
62 printf("\n[MAC] MAC Create Element %d- Done\n", i);
66 wls_mac_send_msg_to_phy((void *)p_list_elem);
67 printf("\n[MAC] Send to FAPI %d- Done\n",i);
71 // Receive from FAPI WLS
74 printf("\n[MAC] Exiting...\n");