From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.ics.ntt-tx.co.jp (mail05.ics.ntt-tx.co.jp [210.232.35.69]) by dpdk.org (Postfix) with ESMTP id 7F27AA823 for ; Tue, 16 Jan 2018 06:16:43 +0100 (CET) Received: from gwchk03.silk.ntt-tx.co.jp (gwchk03.silk.ntt-tx.co.jp [10.107.0.111]) by mail04.ics.ntt-tx.co.jp (unknown) with ESMTP id w0G5Ggu6007953 for unknown; Tue, 16 Jan 2018 14:16:42 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id w0G5Gg8U025448 for unknown; Tue, 16 Jan 2018 14:16:42 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id QAA25443; Tue, 16 Jan 2018 14:16:42 +0900 Received: from imss03.silk.ntt-tx.co.jp (localhost [127.0.0.1]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id w0G5Gf7r009128 for unknown; Tue, 16 Jan 2018 14:16:41 +0900 Received: from mgate02.silk.ntt-tx.co.jp (smtp02.silk.ntt-tx.co.jp [10.107.0.37]) by imss03.silk.ntt-tx.co.jp (unknown) with ESMTP id w0G5Gfe5009120 for unknown; Tue, 16 Jan 2018 14:16:41 +0900 Message-Id: <201801160516.w0G5Gfe5009120@imss03.silk.ntt-tx.co.jp> Received: from localhost by mgate02.silk.ntt-tx.co.jp (unknown) id w0G5Gfwp026680 ; Tue, 16 Jan 2018 14:16:41 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: spp@dpdk.org Date: Tue, 16 Jan 2018 14:16:18 +0900 X-Mailer: git-send-email 1.9.1 In-Reply-To: <3e13a243-6c3f-d849-f2f4-67732e5a44cb@intel.com> References: <3e13a243-6c3f-d849-f2f4-67732e5a44cb@intel.com> X-TM-AS-MML: No Subject: [spp] [PATCH 07/30] doc: update jp setup manual X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2018 05:16:44 -0000 From: Hiroyuki Nakamura Remove description for registering ARP in guests and client machines which is no need for current version. Signed-off-by: Naoki Takada --- docs/spp_vf/spp_vf.md | 111 ++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/docs/spp_vf/spp_vf.md b/docs/spp_vf/spp_vf.md index 2d06e2e..786e712 100644 --- a/docs/spp_vf/spp_vf.md +++ b/docs/spp_vf/spp_vf.md @@ -46,47 +46,47 @@ of the application. spp_config_load_file() is defined in spp_config.c and default file path SPP_CONFIG_FILE_PATH is defined in its header file.. - ```c:spp_vf.c - /* set default config file path */ - strcpy(config_file_path, SPP_CONFIG_FILE_PATH); - - unsigned int main_lcore_id = 0xffffffff; - while(1) { - /* Parse dpdk parameters */ - int ret_parse = parse_dpdk_args(argc, argv); - if (unlikely(ret_parse != 0)) { - break; - } - - /* DPDK initialize */ - int ret_dpdk = rte_eal_init(argc, argv); - if (unlikely(ret_dpdk < 0)) { - break; - } - - /* Skip dpdk parameters */ - argc -= ret_dpdk; - argv += ret_dpdk; - - /* Set log level */ - rte_log_set_global_level(RTE_LOG_LEVEL); - - /* Parse application parameters */ - ret_parse = parse_app_args(argc, argv); - if (unlikely(ret_parse != 0)) { - break; - } - - RTE_LOG(INFO, APP, "Load config file(%s)\n", config_file_path); - - /* Load config */ - int ret_config = spp_config_load_file(config_file_path, 0, &g_config); - if (unlikely(ret_config != 0)) { - break; - } - - /* Get core id. */ - main_lcore_id = rte_lcore_id(); + ```c + /* set default config file path */ + strcpy(config_file_path, SPP_CONFIG_FILE_PATH); + + unsigned int main_lcore_id = 0xffffffff; + while(1) { + /* Parse dpdk parameters */ + int ret_parse = parse_dpdk_args(argc, argv); + if (unlikely(ret_parse != 0)) { + break; + } + + /* DPDK initialize */ + int ret_dpdk = rte_eal_init(argc, argv); + if (unlikely(ret_dpdk < 0)) { + break; + } + + /* Skip dpdk parameters */ + argc -= ret_dpdk; + argv += ret_dpdk; + + /* Set log level */ + rte_log_set_global_level(RTE_LOG_LEVEL); + + /* Parse application parameters */ + ret_parse = parse_app_args(argc, argv); + if (unlikely(ret_parse != 0)) { + break; + } + + RTE_LOG(INFO, APP, "Load config file(%s)\n", config_file_path); + + /* Load config */ + int ret_config = spp_config_load_file(config_file_path, 0, &g_config); + if (unlikely(ret_config != 0)) { + break; + } + + /* Get core id. */ + main_lcore_id = rte_lcore_id(); ``` spp_config_load_file() uses [jansson]() for parsing JSON. @@ -97,22 +97,25 @@ resource assignment of threads are loaded into config of spp. After importing config, each of threads are launched. - ```c:spp_vf.c - /* Start thread */ - unsigned int lcore_id = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { - if (g_core_info[lcore_id].type == SPP_CONFIG_CLASSIFIER_MAC) { - rte_eal_remote_launch(spp_classifier_mac_do, - (void *)&g_core_info[lcore_id], - lcore_id); - } else { - rte_eal_remote_launch(spp_forward, - (void *)&g_core_info[lcore_id], - lcore_id); - } + ```c + /* Start thread */ + unsigned int lcore_id = 0; + RTE_LCORE_FOREACH_SLAVE(lcore_id) { + if (g_core_info[lcore_id].type == SPP_CONFIG_CLASSIFIER_MAC) { + rte_eal_remote_launch(spp_classifier_mac_do, + (void *)&g_core_info[lcore_id], + lcore_id); + } else { + rte_eal_remote_launch(spp_forward, + (void *)&g_core_info[lcore_id], + lcore_id); } + } ``` ### Forwarding + ### Packet Cloning + + -- 1.9.1