DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Subject: [PATCH v2 05/14] testpmd: fix whitespace
Date: Wed,  9 Nov 2022 11:53:22 -0800	[thread overview]
Message-ID: <20221109195331.143473-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20221109195331.143473-1-stephen@networkplumber.org>

Add space after keywords.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test-pmd/cmdline.c    | 31 ++++++++++++++++---------------
 app/test-pmd/parameters.c | 10 ++++++----
 app/test-pmd/testpmd.c    |  2 +-
 3 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 8dc60e938830..7721006cc310 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2730,11 +2730,12 @@ parse_reta_config(const char *str,
 
 	while ((p = strchr(p0,'(')) != NULL) {
 		++p;
-		if((p0 = strchr(p,')')) == NULL)
+		p0 = strchr(p, ')');
+		if (p0 == 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 +3243,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 +4089,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 +4098,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 +4109,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 +7208,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 +7781,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..7fc6d91f0210 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -306,11 +306,12 @@ parse_portnuma_config(const char *q_arg)
 	/* reset from value set at definition */
 	while ((p = strchr(p0,'(')) != NULL) {
 		++p;
-		if((p0 = strchr(p,')')) == NULL)
+		p0 = strchr(p, ')');
+		if (p0 == 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 +367,12 @@ parse_ringnuma_config(const char *q_arg)
 	/* reset from value set at definition */
 	while ((p = strchr(p0,'(')) != NULL) {
 		++p;
-		if((p0 = strchr(p,')')) == NULL)
+		p0 = strchr(p, ')');
+		if (p0 == 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


  parent reply	other threads:[~2022-11-09 19:54 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:14 [PATCH 00/14] whitespace around keywords Stephen Hemminger
2022-11-09 19:14 ` [PATCH 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 02/14] cmdline: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 03/14] timer: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 04/14] ip_frag: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 05/14] testpmd: fix whitspace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 06/14] test: fix whitespace Stephen Hemminger
2022-11-09 19:14 ` [PATCH 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 19:28   ` Dumitrescu, Cristian
2022-11-09 19:14 ` [PATCH 08/14] examples/vhost: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 09/14] l3fwd: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 10/14] examples: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 11/14] bus/pci: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 12/14] net/e1000: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 13/14] net/i40e: " Stephen Hemminger
2022-11-09 19:14 ` [PATCH 14/14] net/bnx2x: " Stephen Hemminger
2022-11-09 19:53 ` [PATCH v2 00/14] whitespace after keywords Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 02/14] cmdline: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 03/14] timer: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 04/14] ip_frag: " Stephen Hemminger
2022-11-09 19:53   ` Stephen Hemminger [this message]
2022-11-09 19:53   ` [PATCH v2 06/14] test: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 08/14] examples/vhost: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 09/14] l3fwd: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 10/14] examples: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 11/14] bus/pci: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 12/14] net/e1000: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 13/14] net/i40e: " Stephen Hemminger
2022-11-09 19:53   ` [PATCH v2 14/14] net/bnx2x: " Stephen Hemminger
2022-11-09 23:24 ` [PATCH v3 00/14] whitespace after keywords Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 01/14] eal: fix whitespace Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 02/14] cmdline: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 03/14] timer: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 04/14] ip_frag: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 05/14] testpmd: " Stephen Hemminger
2022-11-11  6:30     ` Zhang, Yuying
2022-11-11  7:12       ` Zhang, Yuying
2022-11-09 23:24   ` [PATCH v3 06/14] test: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 07/14] examples/qos_sched: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 08/14] examples/vhost: " Stephen Hemminger
2022-11-10  1:48     ` Xia, Chenbo
2022-11-09 23:24   ` [PATCH v3 09/14] l3fwd: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 10/14] examples: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 11/14] bus/pci: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 12/14] net/e1000: " Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 13/14] net/i40e: " Stephen Hemminger
2022-11-11  6:23     ` Zhang, Yuying
2022-11-11  7:12       ` Zhang, Yuying
2022-11-11 16:48       ` Stephen Hemminger
2022-11-09 23:24   ` [PATCH v3 14/14] net/bnx2x: " Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109195331.143473-6-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).