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 2/7] testpmd: fix whitespace
Date: Mon, 16 Jan 2023 09:27:26 -0800 [thread overview]
Message-ID: <20230116172732.84976-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20230116172732.84976-1-stephen@networkplumber.org>
The style standard is to use blank after keywords.
I.e "if (" not "if("
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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
next prev parent reply other threads:[~2023-01-16 17:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 17:27 [PATCH 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:27 ` [PATCH 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:27 ` Stephen Hemminger [this message]
2023-01-16 17:27 ` [PATCH 3/7] net/e1000: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 4/7] i40e: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 5/7] examples: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 7/7] ip_frag: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 2/7] testpmd: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 3/7] net/e1000: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 4/7] i40e: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 5/7] examples: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 7/7] ip_frag: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 0/7] add space after keywords Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 1/7] test: fix whitespace Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 2/7] testpmd: " Stephen Hemminger
2023-01-31 8:21 ` Singh, Aman Deep
2023-01-17 0:14 ` [PATCH v3 3/7] net/e1000: " Stephen Hemminger
2023-01-17 1:21 ` Wu, Wenjun1
2023-01-17 1:26 ` Su, Simei
2023-01-17 0:14 ` [PATCH v3 4/7] i40e: " Stephen Hemminger
2023-01-17 0:26 ` Xing, Beilei
2023-01-17 0:14 ` [PATCH v3 5/7] examples: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 6/7] cmdline: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 7/7] ip_frag: " Stephen Hemminger
2023-01-22 16:00 ` Konstantin Ananyev
2023-03-12 11:28 ` [PATCH v3 0/7] add space after keywords Thomas Monjalon
2023-03-14 18:06 ` Stephen Hemminger
2023-03-14 18:17 ` Thomas Monjalon
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=20230116172732.84976-3-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).