From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A6E96423F2; Mon, 16 Jan 2023 18:27:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55B6942D13; Mon, 16 Jan 2023 18:27:37 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 441B540DFD for ; Mon, 16 Jan 2023 18:27:36 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id g23so15379820plq.12 for ; Mon, 16 Jan 2023 09:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BUpaAOKqRNaRqS6LIVN9EQNbl0LIAUMjb/eskgu53Pg=; b=quuXXgu77PemqHJ6zF8Xwaug9rflGYEPvubMHtuy7qhEiHw6jctVKOsLhuu/tUFQEW mxZF8OfMkDgb1Cc45Pz3M7sX5DL0plO5XjIl/JAUDJWiAbJcZqDVKhVQVrsWxOyd0oDx U4facX/g7JYP/iTxvVZ/cHEc0FhYC6d2mpscFFBK7tkTeXtYK37/68R72UGJa5fk70G8 dm27uEeUjR1yhRAQWtD3ywiaji6+JWSQb87hoXjpI5XnB+ZL2FgLdsbmn7FlAV04/idr yI7q9oWJwwhBVTiGLRaQPFdECDfI/T7EO5jHXB+yS94+bHZhENeini5EVfWiHuiOfyt2 QJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BUpaAOKqRNaRqS6LIVN9EQNbl0LIAUMjb/eskgu53Pg=; b=u2MtecsZRHpOUroDVphIby8bwn5aibBwuH84+jaYTxcpjU4JfSrygvNIYplBJ6cCHO lSOMLAoA0w4tGOE2VcmVcerRMvW3Tu8kFxthTkQ9uSjTSW4zn8H0pIJE5fjqOjqnEN3s Np83w3Z4QJItjOdI16z3VXxJNxMSDDUgyNny/qH0yUsWXgom90gDOL2KGtpCzWFLGLdH 0mgGRGuaW3Q0Fzl47mbR8YYFZod8IIMXLbdVwclA6VxMwmG/m6KBFR2i59qw9QRSKZQ7 BioL8Ulvs+yKSUMIsxQbU4xYoD3MQaVJzGS34FztmXCgZqs4raRlXSmkqs6RWtgPY+3v OW3g== X-Gm-Message-State: AFqh2kr0EPfy+TZrk/p+JnN6CWE5lIcEb/UL9WIZDCXAe7gXPz1zka2O NykYxWUo6+AH4QMqjV2++2ZYVcUBa/STGiO+hi8= X-Google-Smtp-Source: AMrXdXty3IlO1mp4ajbJqpVhSVLd8BXBeUEG3YZsjyV+dp6Z+tuzDOQyhcTz6QSsYjIkA/LSW9z6bQ== X-Received: by 2002:a17:902:eb8b:b0:194:6103:1e18 with SMTP id q11-20020a170902eb8b00b0019461031e18mr435754plg.65.1673890055194; Mon, 16 Jan 2023 09:27:35 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id j3-20020a170902c3c300b001945b984341sm3992635plj.100.2023.01.16.09.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:27:34 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Aman Singh , Yuying Zhang Subject: [PATCH 2/7] testpmd: fix whitespace Date: Mon, 16 Jan 2023 09:27:26 -0800 Message-Id: <20230116172732.84976-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116172732.84976-1-stephen@networkplumber.org> References: <20230116172732.84976-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The style standard is to use blank after keywords. I.e "if (" not "if(" Signed-off-by: Stephen Hemminger --- app/test-pmd/cmdline.c | 30 +++++++++++++++--------------- app/test-pmd/parameters.c | 8 ++++---- app/test-pmd/testpmd.c | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index b32dc8bfd445..615a1ea295f7 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2730,11 +2730,11 @@ parse_reta_config(const char *str, while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + if ((p0 = strchr(p,')')) == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -3242,15 +3242,15 @@ cmd_config_thresh_parsed(void *parsed_result, if (!strcmp(res->name, "txpt")) tx_pthresh = res->value; - else if(!strcmp(res->name, "txht")) + else if (!strcmp(res->name, "txht")) tx_hthresh = res->value; - else if(!strcmp(res->name, "txwt")) + else if (!strcmp(res->name, "txwt")) tx_wthresh = res->value; - else if(!strcmp(res->name, "rxpt")) + else if (!strcmp(res->name, "rxpt")) rx_pthresh = res->value; - else if(!strcmp(res->name, "rxht")) + else if (!strcmp(res->name, "rxht")) rx_hthresh = res->value; - else if(!strcmp(res->name, "rxwt")) + else if (!strcmp(res->name, "rxwt")) rx_wthresh = res->value; else { fprintf(stderr, "Unknown parameter\n"); @@ -4084,8 +4084,8 @@ cmd_vlan_offload_parsed(void *parsed_result, len = strnlen(str, STR_TOKEN_SIZE); i = 0; /* Get port_id first */ - while(i < len){ - if(str[i] == ',') + while (i < len){ + if (str[i] == ',') break; i++; @@ -4093,7 +4093,7 @@ cmd_vlan_offload_parsed(void *parsed_result, str[i]='\0'; tmp = strtoul(str, NULL, 0); /* If port_id greater that what portid_t can represent, return */ - if(tmp >= RTE_MAX_ETHPORTS) + if (tmp >= RTE_MAX_ETHPORTS) return; port_id = (portid_t)tmp; @@ -4104,17 +4104,17 @@ cmd_vlan_offload_parsed(void *parsed_result, if (!strcmp(res->what, "strip")) rx_vlan_strip_set(port_id, on); - else if(!strcmp(res->what, "stripq")){ + else if (!strcmp(res->what, "stripq")){ uint16_t queue_id = 0; /* No queue_id, return */ - if(i + 1 >= len) { + if (i + 1 >= len) { fprintf(stderr, "must specify (port,queue_id)\n"); return; } tmp = strtoul(str + i + 1, NULL, 0); /* If queue_id greater that what 16-bits can represent, return */ - if(tmp > 0xffff) + if (tmp > 0xffff) return; queue_id = (uint16_t)tmp; @@ -7252,7 +7252,7 @@ static void cmd_mac_addr_parsed(void *parsed_result, ret = rte_eth_dev_mac_addr_remove(res->port_num, &res->address); /* check the return value and print it if is < 0 */ - if(ret < 0) + if (ret < 0) fprintf(stderr, "mac_addr_cmd error: (%s)\n", strerror(-ret)); } @@ -7825,7 +7825,7 @@ static void cmd_vf_mac_addr_parsed(void *parsed_result, res->vf_num); #endif - if(ret < 0) + if (ret < 0) fprintf(stderr, "vf_mac_addr_cmd error: (%s)\n", strerror(-ret)); } diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index d597c209ba5e..e2371cfd7094 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -308,11 +308,11 @@ parse_portnuma_config(const char *q_arg) /* reset from value set at definition */ while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + if ((p0 = strchr(p,')')) == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); @@ -368,11 +368,11 @@ parse_ringnuma_config(const char *q_arg) /* reset from value set at definition */ while ((p = strchr(p0,'(')) != NULL) { ++p; - if((p0 = strchr(p,')')) == NULL) + if ((p0 = strchr(p,')')) == NULL) return -1; size = p0 - p; - if(size >= sizeof(s)) + if (size >= sizeof(s)) return -1; snprintf(s, sizeof(s), "%.*s", size, p); diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 134d79a55547..c38e8fecc50a 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2408,7 +2408,7 @@ start_packet_forwarding(int with_tx_first) test_done = 0; - if(!no_flush_rx) + if (!no_flush_rx) flush_fwd_rx_queues(); rxtx_config_display(); -- 2.39.0