automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [dpdk-test-report] |WARNING| pw46720 net/softnic: add support for vxlan encap
Date: Fri, 19 Oct 2018 11:25:11 +0200 (CEST)	[thread overview]
Message-ID: <20181019092511.A5F4D1B197@dpdk.org> (raw)
In-Reply-To: <1539345127-179889-1-git-send-email-cristian.dumitrescu@intel.com>

Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/46720

_coding style issues_


CHECK:BRACES: braces {} should be used on all arms of this statement
#70: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1522:
+			if (strcmp(tokens[t0 + 2 + 2], "ipv4") == 0)
[...]
+			else if (strcmp(tokens[t0 + 2 + 2], "ipv6") == 0)
[...]
+			else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#74: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1526:
+			else {

CHECK:BRACES: braces {} should be used on all arms of this statement
#86: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1538:
+			if (strcmp(tokens[t0 + 2 + 4], "on") == 0)
[...]
+			else if (strcmp(tokens[t0 + 2 + 4], "off") == 0)
[...]
+			else {
[...]

CHECK:BRACES: Unbalanced braces around else statement
#90: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:1542:
+			else {

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 3'
#136: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3656:
+		if ((n_tokens < 3) ||
+			strcmp(tokens[0], "ether") ||
+			softnic_parse_mac_addr(tokens[1], &a->encap.vxlan.ether.da) ||
+			softnic_parse_mac_addr(tokens[2], &a->encap.vxlan.ether.sa))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 4'
#150: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3670:
+			if ((n_tokens < 4) ||
+				softnic_parser_read_uint32(&pcp, tokens[1]) ||
+				(pcp > 7) ||
+				softnic_parser_read_uint32(&dei, tokens[2]) ||
+				(dei > 1) ||
+				softnic_parser_read_uint32(&vid, tokens[3]) ||
+				(vid > 0xFFF))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pcp > 7'
#150: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3670:
+			if ((n_tokens < 4) ||
+				softnic_parser_read_uint32(&pcp, tokens[1]) ||
+				(pcp > 7) ||
+				softnic_parser_read_uint32(&dei, tokens[2]) ||
+				(dei > 1) ||
+				softnic_parser_read_uint32(&vid, tokens[3]) ||
+				(vid > 0xFFF))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dei > 1'
#150: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3670:
+			if ((n_tokens < 4) ||
+				softnic_parser_read_uint32(&pcp, tokens[1]) ||
+				(pcp > 7) ||
+				softnic_parser_read_uint32(&dei, tokens[2]) ||
+				(dei > 1) ||
+				softnic_parser_read_uint32(&vid, tokens[3]) ||
+				(vid > 0xFFF))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'vid > 0xFFF'
#150: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3670:
+			if ((n_tokens < 4) ||
+				softnic_parser_read_uint32(&pcp, tokens[1]) ||
+				(pcp > 7) ||
+				softnic_parser_read_uint32(&dei, tokens[2]) ||
+				(dei > 1) ||
+				softnic_parser_read_uint32(&vid, tokens[3]) ||
+				(vid > 0xFFF))

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#169: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3689:
+		/* ipv4 <sa> <da> <dscp> <ttl>
+		   | ipv6 <sa> <da> <flow_label> <dscp> <hop_limit> */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#169: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3689:
+		   | ipv6 <sa> <da> <flow_label> <dscp> <hop_limit> */

CHECK:BRACES: braces {} should be used on all arms of this statement
#170: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3690:
+		if (strcmp(tokens[0], "ipv4") == 0) {
[...]
+		} else if (strcmp(tokens[0], "ipv6") == 0) {
[...]
+		} else
[...]

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 5'
#174: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3694:
+			if ((n_tokens < 5) ||
+				softnic_parse_ipv4_addr(tokens[1], &sa) ||
+				softnic_parse_ipv4_addr(tokens[2], &da) ||
+				softnic_parser_read_uint8(&dscp, tokens[3]) ||
+				(dscp > 64) ||
+				softnic_parser_read_uint8(&ttl, tokens[4]))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dscp > 64'
#174: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3694:
+			if ((n_tokens < 5) ||
+				softnic_parse_ipv4_addr(tokens[1], &sa) ||
+				softnic_parse_ipv4_addr(tokens[2], &da) ||
+				softnic_parser_read_uint8(&dscp, tokens[3]) ||
+				(dscp > 64) ||
+				softnic_parser_read_uint8(&ttl, tokens[4]))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 6'
#195: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3715:
+			if ((n_tokens < 6) ||
+				softnic_parse_ipv6_addr(tokens[1], &sa) ||
+				softnic_parse_ipv6_addr(tokens[2], &da) ||
+				softnic_parser_read_uint32(&flow_label, tokens[3]) ||
+				softnic_parser_read_uint8(&dscp, tokens[4]) ||
+				(dscp > 64) ||
+				softnic_parser_read_uint8(&hop_limit, tokens[5]))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dscp > 64'
#195: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3715:
+			if ((n_tokens < 6) ||
+				softnic_parse_ipv6_addr(tokens[1], &sa) ||
+				softnic_parse_ipv6_addr(tokens[2], &da) ||
+				softnic_parser_read_uint32(&flow_label, tokens[3]) ||
+				softnic_parser_read_uint8(&dscp, tokens[4]) ||
+				(dscp > 64) ||
+				softnic_parser_read_uint8(&hop_limit, tokens[5]))

CHECK:BRACES: Unbalanced braces around else statement
#213: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3733:
+		} else

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 3'
#217: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3737:
+		if ((n_tokens < 3) ||
+			strcmp(tokens[0], "udp") ||
+			softnic_parser_read_uint16(&a->encap.vxlan.udp.sp, tokens[1]) ||
+			softnic_parser_read_uint16(&a->encap.vxlan.udp.dp, tokens[2]))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'n_tokens < 2'
#228: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3748:
+		if ((n_tokens < 2) ||
+			strcmp(tokens[0], "vxlan") ||
+			softnic_parser_read_uint32(&a->encap.vxlan.vxlan.vni, tokens[1]) ||
+			(a->encap.vxlan.vxlan.vni > 0xFFFFFF))

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'a->encap.vxlan.vxlan.vni > 0xFFFFFF'
#228: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3748:
+		if ((n_tokens < 2) ||
+			strcmp(tokens[0], "vxlan") ||
+			softnic_parser_read_uint32(&a->encap.vxlan.vxlan.vni, tokens[1]) ||
+			(a->encap.vxlan.vxlan.vni > 0xFFFFFF))

WARNING:LONG_LINE: line over 90 characters
#230: FILE: drivers/net/softnic/rte_eth_softnic_cli.c:3750:
+			softnic_parser_read_uint32(&a->encap.vxlan.vxlan.vni, tokens[1]) ||

total: 0 errors, 3 warnings, 18 checks, 214 lines checked

           reply	other threads:[~2018-10-19  9:25 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1539345127-179889-1-git-send-email-cristian.dumitrescu@intel.com>]

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=20181019092511.A5F4D1B197@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=cristian.dumitrescu@intel.com \
    --cc=test-report@dpdk.org \
    /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).