[dpdk-test-report] |WARNING| pw31117 [PATCH RFC 3/6] lib/librte_vhost: add vhost_user backend support

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Nov 2 17:10:00 CET 2017


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

_coding style issues_


WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#145: FILE: lib/librte_vhost/rte_vhost_crypto.h:110:
+		unsigned nb_elts, unsigned cache_size, int socket_id);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#145: FILE: lib/librte_vhost/rte_vhost_crypto.h:110:
+		unsigned nb_elts, unsigned cache_size, int socket_id);

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#246: FILE: lib/librte_vhost/vhost_crypto.c:55:
+#define INHDR_LEN ^I^I(sizeof(struct virtio_crypto_inhdr))$

ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#279: FILE: lib/librte_vhost/vhost_crypto.c:88:
+#define GPA_TO_VVA(t, m, a)						\
+		(t)(uintptr_t)rte_vhost_gpa_to_vva(m, a)

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#283: FILE: lib/librte_vhost/vhost_crypto.c:92:
+#define REQ_OP_OFFSET ^I^I(IV_OFFSET + VHOST_CRYPTO_MAX_IV_LEN)$

ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#431: FILE: lib/librte_vhost/vhost_crypto.c:240:
+static int
+transform_cipher_param(struct rte_crypto_sym_xform *xform,
+		VhostUserCryptoSessionParam *param) {

ERROR:SPACING: space required before the open parenthesis '('
#519: FILE: lib/librte_vhost/vhost_crypto.c:328:
+	switch(sess_param->op_type) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#700: FILE: lib/librte_vhost/vhost_crypto.c:509:
+	if (unlikely(to_move)) {
+		left -= to_move;
+	}

ERROR:SPACING: space prohibited before that ',' (ctx:WxV)
#838: FILE: lib/librte_vhost/vhost_crypto.c:647:
+	rte_hexdump(stdout ,"", dst, to_write);
 	                   ^

ERROR:SPACING: space required after that ',' (ctx:WxV)
#838: FILE: lib/librte_vhost/vhost_crypto.c:647:
+	rte_hexdump(stdout ,"", dst, to_write);
 	                   ^

ERROR:SPACING: space prohibited before that ',' (ctx:WxV)
#849: FILE: lib/librte_vhost/vhost_crypto.c:658:
+		rte_hexdump(stdout ,"", dst, to_write);
 		                   ^

ERROR:SPACING: space required after that ',' (ctx:WxV)
#849: FILE: lib/librte_vhost/vhost_crypto.c:658:
+		rte_hexdump(stdout ,"", dst, to_write);
 		                   ^

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#914: FILE: lib/librte_vhost/vhost_crypto.c:723:
+		unsigned nb_elts, unsigned cache_size, int socket_id)

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#914: FILE: lib/librte_vhost/vhost_crypto.c:723:
+		unsigned nb_elts, unsigned cache_size, int socket_id)

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#957: FILE: lib/librte_vhost/vhost_crypto.c:766:
+	snprintf(name, 127, "HASH_VHOST_CRYPT_%u", (unsigned)vid);

ERROR:SPACING: space prohibited before that ',' (ctx:WxV)
#1063: FILE: lib/librte_vhost/vhost_crypto.c:872:
+	rte_hexdump(stdout ,"IV:", iv_data, cipher->para.iv_len);
 	                   ^

ERROR:SPACING: space required after that ',' (ctx:WxV)
#1063: FILE: lib/librte_vhost/vhost_crypto.c:872:
+	rte_hexdump(stdout ,"IV:", iv_data, cipher->para.iv_len);
 	                   ^

ERROR:SPACING: space prohibited before that ',' (ctx:WxV)
#1074: FILE: lib/librte_vhost/vhost_crypto.c:883:
+	rte_hexdump(stdout ,"SRC:", vc_req->src_data, cipher->para.src_data_len);
 	                   ^

ERROR:SPACING: space required after that ',' (ctx:WxV)
#1074: FILE: lib/librte_vhost/vhost_crypto.c:883:
+	rte_hexdump(stdout ,"SRC:", vc_req->src_data, cipher->para.src_data_len);
 	                   ^

WARNING:TYPO_SPELLING: 'retrive' may be misspelled - perhaps 'retrieve'?
#1255: FILE: lib/librte_vhost/vhost_crypto.c:1064:
+		VC_LOG_ERR("Failed to retrive req");

ERROR:OPEN_BRACE: that open brace { should be on the previous line
#1259: FILE: lib/librte_vhost/vhost_crypto.c:1068:
+	if (unlikely(req->header.opcode != VIRTIO_CRYPTO_CIPHER_ENCRYPT &&
+			req->header.opcode != VIRTIO_CRYPTO_CIPHER_DECRYPT))
+	{

WARNING:TYPO_SPELLING: 'unecessary' may be misspelled - perhaps 'unnecessary'?
#1274: FILE: lib/librte_vhost/vhost_crypto.c:1083:
+	/* one branch to avoid unecessary table lookup */

total: 12 errors, 10 warnings, 1404 lines checked


More information about the test-report mailing list