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 69FCCA034C; Wed, 9 Nov 2022 20:15:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 010F142D27; Wed, 9 Nov 2022 20:15:03 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 6180A42D27 for ; Wed, 9 Nov 2022 20:15:01 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id m14-20020a17090a3f8e00b00212dab39bcdso2807145pjc.0 for ; Wed, 09 Nov 2022 11:15:01 -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=lnR/76JWZ0FP0/lFeyLl7ljxvEGw9UPifWEz/m3GHiw=; b=QJvMFURY508ZTy2kuM9ypK7C0CmwRxEniMSYSx1/RvEfJQ+OjLkeUANpDdcW5wRaY+ +VX6GmNKl070LOhwDMSROMa4IyZP/GxwwcegDyNod8OK98UXIjXvlf5KOfLATyDQh+8y Nvo3YhvpZSA7nn+e42Cr6VSTpcKtll8T0jIOAj2uRFcBhsRbCIhBdsncBcm3VYHdJq6U NZ69S8tEhovwwwTPx4LVyG3fY5EYw/WCkddrX5VxBe6SWtA0deyWrhiwM+ZfYCxsSo8R NfN1Z8nYffR0yjY+Aj6W+xmnxKtLaJQsC+rCW9Cls4C0wck5Zt/0w6JzSDPbEiVo8mok /JYQ== 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=lnR/76JWZ0FP0/lFeyLl7ljxvEGw9UPifWEz/m3GHiw=; b=cjV1XJ+BYT8/7xpF+ZWDjzQS8uZtFqUCJjTEjgZCyf9RQrbxn+z/n/MgW1LSesk4E5 qHh2O2XpKqCzEAzHksX0GTIUJCOkxE/5pJx4A5jfeRLVFzyPIX48jjZF0ZLu4hz3k3Y+ MnssRS5vYghCO0gX5CgagagtqNet53AGmglKvnrDYeP17uyz3U5UP3CrHnsVQx3l1fqS cJ7dt2Eo3EPbnBC/unsoLpBz9pjmROIwfKNL9PHfefBrTPFk3UyRH3XIEHwpoqzXmQFm PEeml5rT5OS6omDhZjO9UvJvoPfbED5XkjmcPkot0wlBWa/FWyVnsRn1WGm6W1zdmHVF JCgg== X-Gm-Message-State: ACrzQf3Vtf2BfSdwUGo4QYeO3sfeQt8Ka7yOx3shDsM+b+1s+76HOVG5 21rHxcW7rLNFh0lYBXId314s9qytBWOdVQ== X-Google-Smtp-Source: AMsMyM61ZRs4nilqJTIukx7s45gnwb93krp3G54OyOD9xqj96g4zR3n3aK8BFVnUZGFtU77JR5qR4A== X-Received: by 2002:a17:90a:c38a:b0:213:119e:ebce with SMTP id h10-20020a17090ac38a00b00213119eebcemr64173731pjt.159.1668021300271; Wed, 09 Nov 2022 11:15:00 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id gn16-20020a17090ac79000b002130c269b6fsm1586698pjb.1.2022.11.09.11.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 11:14:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Aman Singh , Yuying Zhang Subject: [PATCH 05/14] testpmd: fix whitspace Date: Wed, 9 Nov 2022 11:14:36 -0800 Message-Id: <20221109191445.140320-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221109191445.140320-1-stephen@networkplumber.org> References: <20221109191445.140320-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 Add space after keywords. 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 8dc60e938830..ff1fd1b470af 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"); @@ -4088,8 +4088,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++; @@ -4097,7 +4097,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; @@ -4108,17 +4108,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; @@ -7207,7 +7207,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)); } @@ -7780,7 +7780,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 aed4cdcb8485..b7372e025ffd 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -306,11 +306,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); @@ -366,11 +366,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 aa7ea29f15ba..04b078a2938b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2406,7 +2406,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.35.1