From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 625D3A2EEB for ; Thu, 12 Sep 2019 12:48:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50D532D13; Thu, 12 Sep 2019 12:48:43 +0200 (CEST) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id B4CD91E93D for ; Thu, 12 Sep 2019 12:48:41 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id y72so15718856pfb.12 for ; Thu, 12 Sep 2019 03:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=Emf14rfMINp+XJxIXpAhFQ50Rlsn4E9jFByEZJgepog=; b=GoBDgI3RRBHKh+Qp+g2+yGQAjol/BXTrvI2qZMzvYVBGz0SslTas4T/ePeo6aU5lM+ DtqUZwnVyvaLSN2ieOVnlGf9EY1L1pFzeTuOHCFMpsX5ILcej80tiGg/V5PIPVY8Z4vq /ay3H/ltcwTq1zrgRaZJg3di2W/esa/ovOAZMolBzkCGdmpE8cJrY0sBEDaZxNeDGq9M r3koCAmofusz9FWHzmaSdrkNvr0jQkHVcNer2Ul9pdItD7LW4HQX0LJmntrKvwjeeLl3 ndLQNcr2/ugg94WNmvXPzV5i0hW7b2MAxhUNBd7yb1IT5r9l+y3tQdDqzDy9su2Wtjnx Ty4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Emf14rfMINp+XJxIXpAhFQ50Rlsn4E9jFByEZJgepog=; b=r7c54U71vCzScB7zTu5KEUFP1s/Lm7ii6nhOUA0nPs/XkA75gW4AYJyJtxvECAcWSN /+FvcA0Fz4XZA9YhAoJew+8Os+YkdXKgVvsJHlB9zN6/csVROle/B4Uyea6UMec6J4QP cRq1Bzyobab28Az/mVj24jB28ABwr9VJ+0YunxwO9xZuCFfma+dBBEP8UzP/aPDrawDd gSfE1n8btJotx3BhjRW8xA7UsVzxBzrQcfLuQFU7/9UZW6Rp4I1mppKuRSEazE4p7pie JJjW2AqGBYELt4fX78KjX5j8VOrOx2ZuIruIfdhYdzdqvWHIrb07FleBOOfn1I9RPkQD bIaA== X-Gm-Message-State: APjAAAUz8xZf8G+bo2kIASSM8XibblxMOol1spGZGxre5a0N/lO67YrW UEw77Z408gLUXYfiLme7/uVgvNj9 X-Google-Smtp-Source: APXvYqyu7w05O/bn+z2OTLz0ARyTb7gL/KEYEGegrjgVue/zyGIPHZLgLBqfsh7KTpKbuABWi4buKw== X-Received: by 2002:a17:90a:fa13:: with SMTP id cm19mr10674099pjb.120.1568285320926; Thu, 12 Sep 2019 03:48:40 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id t3sm26034930pfe.7.2019.09.12.03.48.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 03:48:40 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Thu, 12 Sep 2019 19:48:23 +0900 Message-Id: <20190912104824.21519-9-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912104824.21519-1-yasufum.o@gmail.com> References: <20190912104824.21519-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 8/9] spp_pcap: revise util func for status command 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: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa As previous patch for spp_vf, this update is to rename it to iterate_lcore_info() and add comments as refactoring. Signed-off-by: Yasufumi Ogawa --- src/pcap/cmd_runner.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pcap/cmd_runner.c b/src/pcap/cmd_runner.c index 63658a5..ac5181d 100644 --- a/src/pcap/cmd_runner.c +++ b/src/pcap/cmd_runner.c @@ -61,12 +61,9 @@ const char *CAPTURE_STATUS_STRINGS[] = { "", /* termination */ }; -/** - * Iterate core information for number of available cores to - * append response for status command. - */ +/* Iterate core info to create response of spp_pcap status */ static int -spp_iterate_core_info(struct sppwk_lcore_params *params) +iterate_lcore_info(struct sppwk_lcore_params *params) { int ret; int lcore_id; @@ -78,8 +75,7 @@ spp_iterate_core_info(struct sppwk_lcore_params *params) ret = spp_pcap_get_core_status(lcore_id, params); if (unlikely(ret != 0)) { RTE_LOG(ERR, PCAP_RUNNER, - "Cannot iterate core information. " - "(core = %d)\n", lcore_id); + "Failed to get lcore %d\n", lcore_id); return SPPWK_RET_NG; } } @@ -524,7 +520,7 @@ append_core_value(const char *name, char **output, lcore_params.output = tmp_buff; lcore_params.lcore_proc = append_pcap_core_element_value; - ret = spp_iterate_core_info(&lcore_params); + ret = iterate_lcore_info(&lcore_params); if (unlikely(ret != SPPWK_RET_OK)) { spp_strbuf_free(lcore_params.output); return SPPWK_RET_NG; -- 2.17.1