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 0CAD52B9A for ; Thu, 28 Dec 2017 05:56:10 +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 vBS4u9ie025181 for unknown; Thu, 28 Dec 2017 13:56:09 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id vBS4u5k9027242 for unknown; Thu, 28 Dec 2017 13:56:05 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id PAA27229; Thu, 28 Dec 2017 13:56:05 +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 vBS4u5Ch010956 for unknown; Thu, 28 Dec 2017 13:56:05 +0900 Received: from mgate01.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 vBS4u5QP010953 for unknown; Thu, 28 Dec 2017 13:56:05 +0900 Message-Id: <201712280456.vBS4u5QP010953@imss03.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id vBS4u4ai025622 ; Thu, 28 Dec 2017 13:56:05 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: spp@dpdk.org Date: Thu, 28 Dec 2017 13:55:17 +0900 X-Mailer: git-send-email 1.9.1 In-Reply-To: <4aae78ff-3b6c-cdfe-a8b7-24ec08b73935@lab.ntt.co.jp> References: <4aae78ff-3b6c-cdfe-a8b7-24ec08b73935@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-MML: No Subject: [spp] [PATCH 10/57] spp_vf: add command acceptance calling 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: Thu, 28 Dec 2017 04:56:12 -0000 From: Hiroyuki Nakamura spp_vf supports command for modifying classifier table. * Add functions for command acceptance. Signed-off-by: Kentaro Watanabe Signed-off-by: Yasufum Ogawa --- src/vf/spp_vf.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c index 4fb25a4..805c582 100644 --- a/src/vf/spp_vf.c +++ b/src/vf/spp_vf.c @@ -10,6 +10,7 @@ #include "ringlatencystats.h" #include "classifier_mac.h" #include "spp_forward.h" +#include "command_proc.h" /* define */ #define SPP_CORE_STATUS_CHECK_MAX 5 @@ -910,6 +911,14 @@ ut_main(int argc, char *argv[]) } /* 他機能部初期化 */ + /* コマンド機能部初期化 */ + int ret_command_init = spp_command_proc_init( + g_startup_param.server_ip, + g_startup_param.server_port); + if (unlikely(ret_command_init != 0)) { + break; + } + #ifdef SPP_RINGLATENCYSTATS_ENABLE /* RING滞留時間 */ int ret_ringlatency = spp_ringlatencystats_init( SPP_RING_LATENCY_STATS_SAMPLING_INTERVAL, g_if_info.num_ring); @@ -950,8 +959,10 @@ ut_main(int argc, char *argv[]) #else { #endif - /* コマンド受付追加予定箇所 */ - /* 戻り値等があれば、判定文も追加予定 */ + /* コマンド受付 */ + spp_command_proc_do(); + + /* CPUを占有しない様に1秒スリープ */ sleep(1); #ifdef SPP_RINGLATENCYSTATS_ENABLE /* RING滞留時間 */ @@ -1132,7 +1143,7 @@ spp_flush(void) core_info = &g_core_info[core_cnt]; if (core_info->type == SPP_CONFIG_CLASSIFIER_MAC) { -// ret_classifier = spp_classifier_mac_update(core_info); + ret_classifier = spp_classifier_mac_update(core_info); if (unlikely(ret_classifier < 0)) { RTE_LOG(ERR, APP, "Flush error. ( component = classifier_mac)\n"); return SPP_RET_NG; -- 1.9.1