|WARNING| pw149039 [PATCH] lib/gso: gso Adds the processing of IPV6 tcp packets

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Dec 5 10:20:40 CET 2024


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

_coding style issues_


WARNING:LEADING_SPACE: please, no spaces at the start of a line
#122: FILE: lib/gso/gso_common.h:144:
+    struct rte_ipv6_hdr *ipv6_hdr;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#124: FILE: lib/gso/gso_common.h:146:
+    ipv6_hdr = (struct rte_ipv6_hdr *)(rte_pktmbuf_mtod(pkt, char *) + l3_offset);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#125: FILE: lib/gso/gso_common.h:147:
+    ipv6_hdr->payload_len = htons(pkt->pkt_len - l3_offset - sizeof(struct rte_ipv6_hdr));$

ERROR:CODE_INDENT: code indent should use tabs where possible
#147: FILE: lib/gso/gso_tcp6.c:10:
+                            uint16_t nb_segs)$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#147: FILE: lib/gso/gso_tcp6.c:10:
+                            uint16_t nb_segs)$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#149: FILE: lib/gso/gso_tcp6.c:12:
+    struct rte_ipv6_hdr *ipv6_hdr;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#150: FILE: lib/gso/gso_tcp6.c:13:
+    struct rte_tcp_hdr *tcp_hdr;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#151: FILE: lib/gso/gso_tcp6.c:14:
+    uint32_t sent_seq;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#152: FILE: lib/gso/gso_tcp6.c:15:
+    uint16_t tail_idx, i;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#153: FILE: lib/gso/gso_tcp6.c:16:
+    uint16_t l3_offset = pkt->l2_len;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#154: FILE: lib/gso/gso_tcp6.c:17:
+    uint16_t l4_offset = l3_offset + pkt->l3_len;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#156: FILE: lib/gso/gso_tcp6.c:19:
+    ipv6_hdr = (struct rte_ipv6_hdr *)(rte_pktmbuf_mtod(pkt, char*) +$

ERROR:CODE_INDENT: code indent should use tabs where possible
#157: FILE: lib/gso/gso_tcp6.c:20:
+               l3_offset);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#157: FILE: lib/gso/gso_tcp6.c:20:
+               l3_offset);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#158: FILE: lib/gso/gso_tcp6.c:21:
+    tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv6_hdr + pkt->l3_len);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#159: FILE: lib/gso/gso_tcp6.c:22:
+    sent_seq = ntohl(tcp_hdr->sent_seq);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#160: FILE: lib/gso/gso_tcp6.c:23:
+    tail_idx = nb_segs - 1;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#162: FILE: lib/gso/gso_tcp6.c:25:
+    for (i = 0; i < nb_segs; i++) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#163: FILE: lib/gso/gso_tcp6.c:26:
+        update_ipv6_header(segs[i], l3_offset);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#163: FILE: lib/gso/gso_tcp6.c:26:
+        update_ipv6_header(segs[i], l3_offset);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#164: FILE: lib/gso/gso_tcp6.c:27:
+        update_tcp_header(segs[i], l4_offset, sent_seq, i < tail_idx);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#164: FILE: lib/gso/gso_tcp6.c:27:
+        update_tcp_header(segs[i], l4_offset, sent_seq, i < tail_idx);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#165: FILE: lib/gso/gso_tcp6.c:28:
+        sent_seq += (segs[i]->pkt_len - segs[i]->data_len);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#165: FILE: lib/gso/gso_tcp6.c:28:
+        sent_seq += (segs[i]->pkt_len - segs[i]->data_len);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#166: FILE: lib/gso/gso_tcp6.c:29:
+    }$

WARNING:BRACES: braces {} are not necessary for single statement blocks
#183: FILE: lib/gso/gso_tcp6.c:46:
+	if (hdr_offset >= pkt->pkt_len) {
+		return 0;
+	}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#318: FILE: lib/gso/gso_tunnel_tcp6.c:68:
+	if (hdr_offset >= pkt->pkt_len) {
+		return 0;
+	}

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 32)
#429: FILE: lib/gso/rte_gso.c:92:
+	} else if ((IS_IPV6_TCP(pkt->ol_flags) &&
[...]
+				pkt->ol_flags &= (~RTE_MBUF_F_TX_TCP_SEG);

total: 5 errors, 23 warnings, 322 lines checked


More information about the test-report mailing list