From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0611.ocn.ad.jp (mogw0611.ocn.ad.jp [153.149.228.12]) by dpdk.org (Postfix) with ESMTP id 6589FA49F for ; Tue, 23 Jan 2018 01:28:47 +0100 (CET) Received: from mf-smf-ucb014.ocn.ad.jp (mf-smf-ucb014.ocn.ad.jp [153.149.227.2]) by mogw0611.ocn.ad.jp (Postfix) with ESMTP id A29D8300238; Tue, 23 Jan 2018 09:28:45 +0900 (JST) Received: from mf-smf-ucb014.ocn.ad.jp (mf-smf-ucb014 [153.149.227.2]) by mf-smf-ucb014.ocn.ad.jp (Postfix) with ESMTP id 85391C05DB; Tue, 23 Jan 2018 09:28:45 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb029 (mv-mta-ucb029.ocn.ad.jp [153.149.230.163]) by mf-smf-ucb014.ocn.ad.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id w0N0ShpN022936; Tue, 23 Jan 2018 09:28:45 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.133]) by ntt.pod01.mv-mta-ucb029 with id 1cUk1x00D2tKTyH01cUkNs; Tue, 23 Jan 2018 00:28:45 +0000 Received: from mugwort.jp (p1247-ipngn8903marunouchi.tokyo.ocn.ne.jp [153.221.64.247]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Tue, 23 Jan 2018 09:28:44 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, x-fn-spp@sl.ntt-tx.co.jp Cc: Hiroyuki Nakamura , Naoki Takada Date: Tue, 23 Jan 2018 09:28:52 +0900 Message-Id: <20180123002854.28345-7-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20180123002854.28345-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180123002854.28345-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 07/28] 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, 23 Jan 2018 00:28:48 -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..6a617c0 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 + + -- 2.13.1