From patchwork Wed Oct 22 11:53:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Helin" X-Patchwork-Id: 920 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 4C9A27EA7; Wed, 22 Oct 2014 13:45:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 10C617E99 for ; Wed, 22 Oct 2014 13:45:22 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 22 Oct 2014 04:52:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,768,1406617200"; d="scan'208";a="593702016" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 22 Oct 2014 04:53:38 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s9MBrbCR020579; Wed, 22 Oct 2014 19:53:37 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s9MBrYut024651; Wed, 22 Oct 2014 19:53:37 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9MBrYIW024647; Wed, 22 Oct 2014 19:53:34 +0800 From: Helin Zhang To: dev@dpdk.org Date: Wed, 22 Oct 2014 19:53:23 +0800 Message-Id: <1413978810-24610-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1413978810-24610-1-git-send-email-helin.zhang@intel.com> References: <1411634427-746-1-git-send-email-helin.zhang@intel.com> <1413978810-24610-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 1/8] app/testpmd: code style fix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix several code style issues. Signed-off-by: Helin Zhang --- app/test-pmd/cmdline.c | 28 +++++++++++++++------------- app/test-pmd/config.c | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 0b972f9..9de574d 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -1579,7 +1579,7 @@ parse_reta_config(const char *str, struct rte_eth_rss_reta *reta_conf) nb_queue = (uint8_t)int_fld[FLD_QUEUE]; if (hash_index >= ETH_RSS_RETA_NUM_ENTRIES) { - printf("Invalid RETA hash index=%d",hash_index); + printf("Invalid RETA hash index=%d", hash_index); return -1; } @@ -1596,22 +1596,24 @@ parse_reta_config(const char *str, struct rte_eth_rss_reta *reta_conf) static void cmd_set_rss_reta_parsed(void *parsed_result, - __attribute__((unused)) struct cmdline *cl, - __attribute__((unused)) void *data) + __attribute__((unused)) struct cmdline *cl, + __attribute__((unused)) void *data) { int ret; struct rte_eth_rss_reta reta_conf; struct cmd_config_rss_reta *res = parsed_result; - memset(&reta_conf,0,sizeof(struct rte_eth_rss_reta)); + memset(&reta_conf, 0, sizeof(struct rte_eth_rss_reta)); if (!strcmp(res->list_name, "reta")) { if (parse_reta_config(res->list_of_items, &reta_conf)) { - printf("Invalid RSS Redirection Table config entered\n"); + printf("Invalid RSS Redirection Table config " + "entered\n"); return; } ret = rte_eth_dev_rss_reta_update(res->port_id, &reta_conf); if (ret != 0) - printf("Bad redirection table parameter, return code = %d \n",ret); + printf("Bad redirection table parameter, " + "return code = %d\n", ret); } } @@ -1673,19 +1675,19 @@ static void cmd_showport_reta_parsed(void *parsed_result, } cmdline_parse_token_string_t cmd_showport_reta_show = - TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, show, "show"); + TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, show, "show"); cmdline_parse_token_string_t cmd_showport_reta_port = - TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, port, "port"); + TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, port, "port"); cmdline_parse_token_num_t cmd_showport_reta_port_id = - TOKEN_NUM_INITIALIZER(struct cmd_showport_reta, port_id, UINT8); + TOKEN_NUM_INITIALIZER(struct cmd_showport_reta, port_id, UINT8); cmdline_parse_token_string_t cmd_showport_reta_rss = - TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, rss, "rss"); + TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, rss, "rss"); cmdline_parse_token_string_t cmd_showport_reta_reta = - TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, reta, "reta"); + TOKEN_STRING_INITIALIZER(struct cmd_showport_reta, reta, "reta"); cmdline_parse_token_num_t cmd_showport_reta_mask_lo = - TOKEN_NUM_INITIALIZER(struct cmd_showport_reta,mask_lo,UINT64); + TOKEN_NUM_INITIALIZER(struct cmd_showport_reta, mask_lo, UINT64); cmdline_parse_token_num_t cmd_showport_reta_mask_hi = - TOKEN_NUM_INITIALIZER(struct cmd_showport_reta,mask_hi,UINT64); + TOKEN_NUM_INITIALIZER(struct cmd_showport_reta, mask_hi, UINT64); cmdline_parse_inst_t cmd_showport_reta = { .f = cmd_showport_reta_parsed, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 2a1b93f..84c59b7 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -764,7 +764,7 @@ rxtx_config_display(void) void port_rss_reta_info(portid_t port_id,struct rte_eth_rss_reta *reta_conf) { - uint8_t i,j; + uint8_t i, j; int ret; if (port_id_is_invalid(port_id))