automatic DPDK test reports
 help / color / mirror / Atom feed
From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Subject: [dpdk-test-report] |WARNING| pw71454 [PATCH] examples: add multi process crypto application
Date: Fri, 12 Jun 2020 20:08:08 +0200 (CEST)	[thread overview]
Message-ID: <20200612180808.8F34E1BFC3@dpdk.org> (raw)
In-Reply-To: <20200612180351.16844-2-arkadiuszx.kusztal@intel.com>

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

_coding style issues_


WARNING:TYPO_SPELLING: 'environement' may be misspelled - perhaps 'environment'?
#60: 
usage of cryptodev in multi process environement.

WARNING:TYPO_SPELLING: 'shoud' may be misspelled - perhaps 'should'?
#197: FILE: doc/guides/sample_app_ug/mp_crypto.rst:90:
+qp_X - positive integer (including zero), specifies which queue pair shoud be setup

ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#344: FILE: examples/mp_crypto/main.c:16:
+int
+mp_crypto_init_devs(void) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#352: FILE: examples/mp_crypto/main.c:24:
+	for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++) {
+		mp_app_devs[i].id = -1;
+	}

WARNING:MISSING_SPACE: break quoted strings at a space character
#376: FILE: examples/mp_crypto/main.c:48:
+			MP_APP_LOG(INFO, COL_RED, "- Number of devices probed by primary"
+					"process differs with current process config,"

WARNING:LONG_LINE: line over 90 characters
#395: FILE: examples/mp_crypto/main.c:67:
+				strncpy(mp_shared_data->prim_dev_name[i].name, info.device->name,

WARNING:LONG_LINE: line over 90 characters
#486: FILE: examples/mp_crypto/main.c:158:
+					&session_vectors[vectors[vector_number].session])) {

WARNING:LONG_LINE: line over 90 characters
#518: FILE: examples/mp_crypto/main.c:190:
+				MP_APP_LOG(INFO, COL_BLUE, "Initialized session = %lu", session_id);

WARNING:LONG_LINE_COMMENT: line over 90 characters
#521: FILE: examples/mp_crypto/main.c:193:
+				mp_shared_data->sessions.sym_sessions[session_id].refcnt++;

WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#521: FILE: examples/mp_crypto/main.c:193:
+				/* Actually refcnt should be incremented on demand
+				mp_shared_data->sessions.sym_sessions[session_id].refcnt++;

WARNING:BRACES: braces {} are not necessary for single statement blocks
#525: FILE: examples/mp_crypto/main.c:197:
+			if (clear_session) {
+				rte_cryptodev_sym_session_free(sess);
+			}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#540: FILE: examples/mp_crypto/main.c:212:
+	for (i = 0; i < MP_APP_MAX_VECTORS; i++) {
+		selected_vectors[MP_APP_MAX_VECTORS] = -1;
+	}

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32)
#548: FILE: examples/mp_crypto/main.c:220:
+		if (mp_app_params->enq_param.vector_number[i] >=
[...]
+				MP_APP_LOG(ERR, COL_RED,

WARNING:LONG_LINE: line over 90 characters
#552: FILE: examples/mp_crypto/main.c:224:
+						mp_app_params->enq_param.vector_number[i]);

WARNING:LONG_LINE: line over 90 characters
#565: FILE: examples/mp_crypto/main.c:237:
+				mp_shared_data->sessions.sym_sessions[session_id].refcnt++;

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#674: FILE: examples/mp_crypto/main.c:346:
+						while (__timeout <= __counter) {

WARNING:LONG_LINE: line over 90 characters
#694: FILE: examples/mp_crypto/main.c:366:
+						rte_cryptodev_socket_id(mp_app_devs[dev_id].id))) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#889: FILE: examples/mp_crypto/main.c:561:
+	if (ret < 0) {
+		rte_exit(-1, "Invalid EAL arguments!
");
+	}

WARNING:LONG_LINE: line over 90 characters
#913: FILE: examples/mp_crypto/main.c:585:
+	MP_APP_LOG(INFO, COL_BLUE, "- Setting driver %d for this process", mp_app_driver_id);

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'mp_app_init', this function's name, in a string
#926: FILE: examples/mp_crypto/main.c:598:
+			RTE_LOG(ERR, USER1, "mp_app_init:"

WARNING:LONG_LINE: line over 90 characters
#934: FILE: examples/mp_crypto/main.c:606:
+		if (rte_mp_action_register(MP_APP_IPC_NAME, mp_crypto_secondary_handler)) {

WARNING:LONG_LINE: line over 90 characters
#941: FILE: examples/mp_crypto/main.c:613:
+			MP_APP_LOG(ERR, COL_RED, "Cannot find memzone by name %s", MP_APP_PROC_SHARED_NAME);

WARNING:LONG_LINE: line over 90 characters
#949: FILE: examples/mp_crypto/main.c:621:
+	MP_APP_LOG(INFO, COL_GREEN, "Number of processes = %d", mp_shared_data->proc_counter);

WARNING:LONG_LINE: line over 90 characters
#985: FILE: examples/mp_crypto/main.c:657:
+			MP_APP_LOG(INFO, COL_NORM, "Waiting for %d out of %d seconds", counter, timeout);

WARNING:BRACES: braces {} are not necessary for any arm of this statement
#987: FILE: examples/mp_crypto/main.c:659:
+		if (counter < timeout) {
[...]
+		} else {
[...]

WARNING:LONG_LINE: line over 90 characters
#1066: FILE: examples/mp_crypto/main.c:738:
+			MP_APP_LOG(WARNING, COL_YEL, "Queue %d on dev %d not initialized", enq_qp_id, enq_dev_id);

WARNING:LONG_LINE: line over 90 characters
#1076: FILE: examples/mp_crypto/main.c:748:
+					MP_APP_LOG(INFO, COL_NORM, "Waiting for %d out of %d seconds", __counter++, 3);

WARNING:LONG_LINE: line over 90 characters
#1091: FILE: examples/mp_crypto/main.c:763:
+			MP_APP_LOG(WARNING, COL_YEL, "Queue %d on dev %d not initielized", deq_qp_id, deq_dev_id);

WARNING:LONG_LINE: line over 90 characters
#1101: FILE: examples/mp_crypto/main.c:773:
+					MP_APP_LOG(INFO, COL_NORM, "Waiting for %d out of %d seconds", __counter++, __timeout);

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32)
#1125: FILE: examples/mp_crypto/main.c:797:
+		if (process_enq && !mp_crypto_exit_flag) {
+				if (enqueued < pcks_to_enq || pcks_to_enq == 0) {

WARNING:LONG_LINE: line over 90 characters
#1130: FILE: examples/mp_crypto/main.c:802:
+					uint64_t to_enq = (MP_CRYPTO_QP_DESC_NUM - curr_offset_enq) > MP_CRYPTO_BURST_NUM ?

WARNING:LONG_LINE: line over 90 characters
#1131: FILE: examples/mp_crypto/main.c:803:
+						MP_CRYPTO_BURST_NUM : MP_CRYPTO_QP_DESC_NUM - curr_offset_enq;

WARNING:LONG_LINE: line over 90 characters
#1132: FILE: examples/mp_crypto/main.c:804:
+					if (pcks_to_enq && to_enq > pcks_to_enq - enqueued)

WARNING:LONG_LINE: line over 90 characters
#1134: FILE: examples/mp_crypto/main.c:806:
+					__enq = rte_cryptodev_enqueue_burst(enq_dev_id, enq_qp_id,

WARNING:LONG_LINE: line over 90 characters
#1138: FILE: examples/mp_crypto/main.c:810:
+					curr_offset_enq = enqueued % MP_CRYPTO_QP_DESC_NUM;

WARNING:LONG_LINE: line over 90 characters
#1139: FILE: examples/mp_crypto/main.c:811:
+					if (enq_livesign > mp_app_params->enq_param.checkpoint) {

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#1140: FILE: examples/mp_crypto/main.c:812:
+						if (process_enq && !process_deq) {

WARNING:LONG_LINE: line over 90 characters
#1142: FILE: examples/mp_crypto/main.c:814:
+								livesign_print_char[livesign_print_idx]);

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#1144: FILE: examples/mp_crypto/main.c:816:
+						if (process_enq && process_deq) {

WARNING:LONG_LINE: line over 90 characters
#1146: FILE: examples/mp_crypto/main.c:818:
+								livesign_print_char[livesign_print_idx], livesign_print_char[livesign_deq_print_idx]);

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 32)
#1159: FILE: examples/mp_crypto/main.c:831:
+		if (process_deq) {
+				if (dequeued < pcks_to_deq || pcks_to_deq == 0) {

WARNING:LONG_LINE: line over 90 characters
#1162: FILE: examples/mp_crypto/main.c:834:
+					uint64_t to_deq = (MP_CRYPTO_QP_DESC_NUM - curr_offset_deq) > MP_CRYPTO_BURST_NUM ?

WARNING:LONG_LINE: line over 90 characters
#1163: FILE: examples/mp_crypto/main.c:835:
+						MP_CRYPTO_BURST_NUM : MP_CRYPTO_QP_DESC_NUM - curr_offset_deq;

WARNING:LONG_LINE: line over 90 characters
#1165: FILE: examples/mp_crypto/main.c:837:
+					if (pcks_to_deq && to_deq > pcks_to_deq - dequeued)

WARNING:LONG_LINE: line over 90 characters
#1167: FILE: examples/mp_crypto/main.c:839:
+					__deq = rte_cryptodev_dequeue_burst(deq_dev_id, deq_qp_id,

WARNING:LONG_LINE: line over 90 characters
#1168: FILE: examples/mp_crypto/main.c:840:
+						&mp_crypto_ops_ret[curr_offset_deq], to_deq);

WARNING:LONG_LINE: line over 90 characters
#1171: FILE: examples/mp_crypto/main.c:843:
+					curr_offset_deq = dequeued % MP_CRYPTO_QP_DESC_NUM;

WARNING:LONG_LINE: line over 90 characters
#1172: FILE: examples/mp_crypto/main.c:844:
+					if (deq_livesign > mp_app_params->deq_param.checkpoint) {

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#1173: FILE: examples/mp_crypto/main.c:845:
+						if (process_deq && !process_enq) {

WARNING:LONG_LINE: line over 90 characters
#1175: FILE: examples/mp_crypto/main.c:847:
+								livesign_print_char[livesign_deq_print_idx]);

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#1177: FILE: examples/mp_crypto/main.c:849:
+						if (process_enq && process_deq) {

WARNING:LONG_LINE: line over 90 characters
#1179: FILE: examples/mp_crypto/main.c:851:
+								livesign_print_char[livesign_print_idx], livesign_print_char[livesign_deq_print_idx]);

WARNING:LONG_LINE: line over 90 characters
#1189: FILE: examples/mp_crypto/main.c:861:
+					if (mp_crypto_exit_flag && deq_stall_counter > 100000) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1189: FILE: examples/mp_crypto/main.c:861:
+					if (mp_crypto_exit_flag && deq_stall_counter > 100000) {
+						break;
+					}

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#1349: FILE: examples/mp_crypto/mp_crypto.c:5:
+int ^I^I^Imp_app_driver_id;$

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1353: FILE: examples/mp_crypto/mp_crypto.c:9:
+ * init only one need to be provided */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1363: FILE: examples/mp_crypto/mp_crypto.c:19:
+ * memzone name = MP_PROC_SHARED_MZ */

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1395: FILE: examples/mp_crypto/mp_crypto.c:51:
+	if (vector->x_type == RTE_CRYPTO_SYM_XFORM_AEAD) {
+		return mp_app_create_aead_session(dev_id, vector);
+	}

WARNING:LONG_LINE: line over 90 characters
#1435: FILE: examples/mp_crypto/mp_crypto.c:91:
+mp_crypto_create_op(struct rte_crypto_op *op, struct rte_mbuf *mbuf, uint16_t vector_number,

WARNING:LONG_LINE: line over 90 characters
#1439: FILE: examples/mp_crypto/mp_crypto.c:95:
+	uint32_t aad_pad_len = RTE_ALIGN_CEIL(session_vectors[vectors[vector_number].session].aad_len, 16);

WARNING:LONG_LINE: line over 90 characters
#1456: FILE: examples/mp_crypto/mp_crypto.c:112:
+	rte_memcpy(iv_ptr, vectors[vector_number].iv, session_vectors[vectors[vector_number].session].iv_len);

WARNING:LONG_LINE: line over 90 characters
#1460: FILE: examples/mp_crypto/mp_crypto.c:116:
+	rte_memcpy(plaintext, vectors[vector_number].plaintext.data, vectors[vector_number].plaintext.len);

WARNING:LONG_LINE: line over 90 characters
#1462: FILE: examples/mp_crypto/mp_crypto.c:118:
+	sym_op->aead.digest.phys_addr = rte_pktmbuf_iova_offset(mbuf, vectors[vector_number].plaintext.len);

WARNING:MISSING_EOF_NEWLINE: adding a line without newline at end of file
#1472: FILE: examples/mp_crypto/mp_crypto.c:128:
+}

WARNING:TYPO_SPELLING: 'informations' may be misspelled - perhaps 'information'?
#1501: FILE: examples/mp_crypto/mp_crypto.h:22:
+/* Session pool informations */

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#1508: FILE: examples/mp_crypto/mp_crypto.h:29:
+#define MAX_NUM_OF_SESSIONS ^I^I(16)$

WARNING:TYPO_SPELLING: 'informations' may be misspelled - perhaps 'information'?
#1510: FILE: examples/mp_crypto/mp_crypto.h:31:
+/* Crypto op informations */

WARNING:TYPO_SPELLING: 'informations' may be misspelled - perhaps 'information'?
#1512: FILE: examples/mp_crypto/mp_crypto.h:33:
+/* Mbuf informations */

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#1513: FILE: examples/mp_crypto/mp_crypto.h:34:
+#define MP_APP_MBUFPOOL_NAME ^I^I"MP_APP_MBUF_NAME"$

WARNING:TYPO_SPELLING: 'lenght' may be misspelled - perhaps 'length'?
#1525: FILE: examples/mp_crypto/mp_crypto.h:46:
+/* Max name lenght */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1565: FILE: examples/mp_crypto/mp_crypto.h:86:
+	 * does not increment this value */

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#1597: FILE: examples/mp_crypto/mp_crypto.h:118:
+ * memzone name = MP_PROC_SHARED_MZ */

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#1633: FILE: examples/mp_crypto/mp_crypto.h:154:
+extern int ^I^I^Imp_app_driver_id;$

WARNING:MISSING_EOF_NEWLINE: adding a line without newline at end of file
#1699: FILE: examples/mp_crypto/mp_crypto.h:220:
+#endif

WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
#1768: FILE: examples/mp_crypto/mp_crypto_parser.c:27:
+			" 
  --devtype [device name]: 			device name, the same name need to be used"

WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
#1769: FILE: examples/mp_crypto/mp_crypto_parser.c:28:
+			" across all processes. 
						--Example: --devtype=crypto_qat"

WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
#1770: FILE: examples/mp_crypto/mp_crypto_parser.c:29:
+			" 
  --config-dev [dev_id,]: 			id of device that should be"

WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
#1773: FILE: examples/mp_crypto/mp_crypto_parser.c:32:
+			" first. 
						--Example: -w 03:01.2 -w 03:01.1 -w 03:01.3 --config-dev 0,2"

WARNING:RETURN_VOID: void function return statements are not generally useful
#1802: FILE: examples/mp_crypto/mp_crypto_parser.c:61:
+	return;
+}

ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#1815: FILE: examples/mp_crypto/mp_crypto_parser.c:74:
+static void dump_test_data_options(struct mp_crypto_app_parameters
+	*test_data __rte_unused) {

WARNING:RETURN_VOID: void function return statements are not generally useful
#1818: FILE: examples/mp_crypto/mp_crypto_parser.c:77:
+	return;
+}

ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#1820: FILE: examples/mp_crypto/mp_crypto_parser.c:79:
+int16_t
+get_options(int argc, char *argv[]) {

WARNING:LONG_LINE_COMMENT: line over 90 characters
#1876: FILE: examples/mp_crypto/mp_crypto_parser.c:135:
+			/* Sanity check, unfortunately c standard does not force errno to be set

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#2278: FILE: examples/mp_crypto/mp_crypto_parser.h:26:
+	do {		\
+	printf("%s", color);			\

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#2285: FILE: examples/mp_crypto/mp_crypto_parser.h:33:
+	do {		\
+	printf("%s", color);			\

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#2292: FILE: examples/mp_crypto/mp_crypto_parser.h:40:
+	do {		\
+	printf("
%s", color);			\

WARNING:MISSING_EOF_NEWLINE: adding a line without newline at end of file
#2401: FILE: examples/mp_crypto/mp_crypto_parser.h:149:
+#endif

WARNING:MISSING_EOF_NEWLINE: adding a line without newline at end of file
#2651: FILE: examples/mp_crypto/mp_crypto_vectors.h:66:
+#endif

total: 3 errors, 85 warnings, 2488 lines checked

       reply	other threads:[~2020-06-12 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200612180351.16844-2-arkadiuszx.kusztal@intel.com>
2020-06-12 18:08 ` checkpatch [this message]
2020-06-12 20:12 ` [dpdk-test-report] |SUCCESS| pw71454 " 0-day Robot

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=20200612180808.8F34E1BFC3@dpdk.org \
    --to=checkpatch@dpdk.org \
    --cc=arkadiuszx.kusztal@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).