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 2662F58CE 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 vBS4u97s025176 for unknown; Thu, 28 Dec 2017 13:56:09 +0900 Received: (from root@localhost) by gwchk03.silk.ntt-tx.co.jp (unknown) id vBS4u7PQ027331 for unknown; Thu, 28 Dec 2017 13:56:07 +0900 Received: from gwchk.silk.ntt-tx.co.jp [10.107.0.110] by gwchk03.silk.ntt-tx.co.jp with ESMTP id PAA27320; Thu, 28 Dec 2017 13:56:07 +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 vBS4u6pv011062 for unknown; Thu, 28 Dec 2017 13:56:06 +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 vBS4u6kT011028 for unknown; Thu, 28 Dec 2017 13:56:06 +0900 Message-Id: <201712280456.vBS4u6kT011028@imss03.silk.ntt-tx.co.jp> Received: from localhost by mgate01.silk.ntt-tx.co.jp (unknown) id vBS4u4b2025622 ; Thu, 28 Dec 2017 13:56:06 +0900 From: x-fn-spp@sl.ntt-tx.co.jp To: spp@dpdk.org Date: Thu, 28 Dec 2017 13:55:35 +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> X-TM-AS-MML: No Subject: [spp] [PATCH 28/57] spp_vf: change log level and add line break 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 * Change log level and add line break. * Refactoring Signed-off-by: Daiki Yamashita Signed-off-by: Yasufum Ogawa --- src/vf/classifier_mac.c | 10 +++++----- src/vf/command_proc.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vf/classifier_mac.c b/src/vf/classifier_mac.c index 0852938..cc4af2b 100644 --- a/src/vf/classifier_mac.c +++ b/src/vf/classifier_mac.c @@ -109,12 +109,12 @@ init_classifier_table(struct rte_hash **classifier_table, } rte_memcpy(ð_addr, &core_info->tx_ports[i].mac_addr, ETHER_ADDR_LEN); + ether_format_addr(mac_addr_str, sizeof(mac_addr_str), ð_addr); /* add entry to classifier mac table */ ret = rte_hash_add_key_data(*classifier_table, (void*)ð_addr, (void*)(long)i); if (unlikely(ret < 0)) { - ether_format_addr(mac_addr_str, sizeof(mac_addr_str), ð_addr); RTE_LOG(ERR, SPP_CLASSIFIER_MAC, "Cannot add entry to classifier mac table. " "ret=%d, mac_addr=%s\n", ret, mac_addr_str); @@ -123,7 +123,7 @@ init_classifier_table(struct rte_hash **classifier_table, return -1; } - RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC, "Add entry to classifier mac table. " + RTE_LOG(INFO, SPP_CLASSIFIER_MAC, "Add entry to classifier mac table. " "mac_addr=%s, if_type=%d, if_no=%d, dpdk_port=%d\n", mac_addr_str, core_info->tx_ports[i].if_type, @@ -299,7 +299,7 @@ change_update_index(struct classifier_mac_mng_info *classifier_mng_info, unsigne if (unlikely(classifier_mng_info->ref_index == classifier_mng_info->upd_index)) { RTE_LOG(DEBUG, SPP_CLASSIFIER_MAC, - "Core[%u] Change update index.", lcore_id); + "Core[%u] Change update index.\n", lcore_id); classifier_mng_info->upd_index = (classifier_mng_info->upd_index + 1) % NUM_CLASSIFIER_MAC_INFO; @@ -320,7 +320,7 @@ spp_classifier_mac_update(struct spp_core_info *core_info) classifier_mng_info->info + classifier_mng_info->upd_index; RTE_LOG(INFO, SPP_CLASSIFIER_MAC, - "Core[%u] Start update component.", lcore_id); + "Core[%u] Start update component.\n", lcore_id); /* initialize update side classifier table */ ret = init_classifier_table(&classifier_info->classifier_table, core_info); @@ -338,7 +338,7 @@ spp_classifier_mac_update(struct spp_core_info *core_info) rte_delay_us_block(CHANGE_UPDATE_INDEX_WAIT_INTERVAL); RTE_LOG(INFO, SPP_CLASSIFIER_MAC, - "Core[%u] Complete update component.", lcore_id); + "Core[%u] Complete update component.\n", lcore_id); return 0; } diff --git a/src/vf/command_proc.c b/src/vf/command_proc.c index cda72be..81bb625 100644 --- a/src/vf/command_proc.c +++ b/src/vf/command_proc.c @@ -38,7 +38,7 @@ execute_command(const struct spp_command *command) switch (command->type) { case SPP_CMDTYPE_CLASSIFIER_TABLE: - RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Execute classifier_table command."); + RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute classifier_table command.\n"); ret = spp_update_classifier_table( command->spec.classifier_table.type, command->spec.classifier_table.value, @@ -46,12 +46,12 @@ execute_command(const struct spp_command *command) break; case SPP_CMDTYPE_FLUSH: - RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Execute flush command."); + RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute flush command.\n"); ret = spp_flush(); break; case SPP_CMDTYPE_PROCESS: - RTE_LOG(DEBUG, SPP_COMMAND_PROC, "Process command is requested."); + RTE_LOG(INFO, SPP_COMMAND_PROC, "Execute process command.\n"); /* nothing to do here */ break; -- 1.9.1