* [dpdk-test-report] |WARNING| pw48617 [RFC] /net: memory interface (memif)
[not found] <20181210094256.18224-1-jgrajcia@cisco.com>
@ 2018-12-10 9:44 ` checkpatch
0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-12-10 9:44 UTC (permalink / raw)
To: test-report; +Cc: Jakub Grajciar
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/48617
_coding style issues_
WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one
ERROR:OPEN_BRACE: open brace '{' following enum go on the same line
#143: FILE: drivers/net/memif/memif.h:22:
+typedef enum memif_msg_type
+{
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#144: FILE: drivers/net/memif/memif.h:23:
+ MEMIF_MSG_TYPE_NONE = 0,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#145: FILE: drivers/net/memif/memif.h:24:
+ MEMIF_MSG_TYPE_ACK = 1,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#146: FILE: drivers/net/memif/memif.h:25:
+ MEMIF_MSG_TYPE_HELLO = 2,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#147: FILE: drivers/net/memif/memif.h:26:
+ MEMIF_MSG_TYPE_INIT = 3,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#148: FILE: drivers/net/memif/memif.h:27:
+ MEMIF_MSG_TYPE_ADD_REGION = 4,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#149: FILE: drivers/net/memif/memif.h:28:
+ MEMIF_MSG_TYPE_ADD_RING = 5,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#150: FILE: drivers/net/memif/memif.h:29:
+ MEMIF_MSG_TYPE_CONNECT = 6,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#151: FILE: drivers/net/memif/memif.h:30:
+ MEMIF_MSG_TYPE_CONNECTED = 7,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#152: FILE: drivers/net/memif/memif.h:31:
+ MEMIF_MSG_TYPE_DISCONNECT = 8,$
ERROR:OPEN_BRACE: open brace '{' following enum go on the same line
#156: FILE: drivers/net/memif/memif.h:35:
+typedef enum
+{
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#157: FILE: drivers/net/memif/memif.h:36:
+ MEMIF_RING_S2M = 0,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#158: FILE: drivers/net/memif/memif.h:37:
+ MEMIF_RING_M2S = 1$
ERROR:OPEN_BRACE: open brace '{' following enum go on the same line
#162: FILE: drivers/net/memif/memif.h:41:
+typedef enum
+{
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#163: FILE: drivers/net/memif/memif.h:42:
+ MEMIF_INTERFACE_MODE_ETHERNET = 0,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#164: FILE: drivers/net/memif/memif.h:43:
+ MEMIF_INTERFACE_MODE_IP = 1,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#165: FILE: drivers/net/memif/memif.h:44:
+ MEMIF_INTERFACE_MODE_PUNT_INJECT = 2,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#182: FILE: drivers/net/memif/memif.h:61:
+ uint8_t name[32];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#183: FILE: drivers/net/memif/memif.h:62:
+ memif_version_t min_version;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#184: FILE: drivers/net/memif/memif.h:63:
+ memif_version_t max_version;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#185: FILE: drivers/net/memif/memif.h:64:
+ memif_region_index_t max_region;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#186: FILE: drivers/net/memif/memif.h:65:
+ memif_ring_index_t max_m2s_ring;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#187: FILE: drivers/net/memif/memif.h:66:
+ memif_ring_index_t max_s2m_ring;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#188: FILE: drivers/net/memif/memif.h:67:
+ memif_log2_ring_size_t max_log2_ring_size;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#193: FILE: drivers/net/memif/memif.h:72:
+ memif_version_t version;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#194: FILE: drivers/net/memif/memif.h:73:
+ memif_interface_id_t id;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#195: FILE: drivers/net/memif/memif.h:74:
+ memif_interface_mode_t mode:8;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#196: FILE: drivers/net/memif/memif.h:75:
+ uint8_t secret[24];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#197: FILE: drivers/net/memif/memif.h:76:
+ uint8_t name[32];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#202: FILE: drivers/net/memif/memif.h:81:
+ memif_region_index_t index;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#203: FILE: drivers/net/memif/memif.h:82:
+ memif_region_size_t size;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#208: FILE: drivers/net/memif/memif.h:87:
+ uint16_t flags;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#210: FILE: drivers/net/memif/memif.h:89:
+ memif_ring_index_t index;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#211: FILE: drivers/net/memif/memif.h:90:
+ memif_region_index_t region;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#212: FILE: drivers/net/memif/memif.h:91:
+ memif_region_offset_t offset;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#213: FILE: drivers/net/memif/memif.h:92:
+ memif_log2_ring_size_t log2_ring_size;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#214: FILE: drivers/net/memif/memif.h:93:
+ uint16_t private_hdr_size;^I/* used for private metadata */$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#219: FILE: drivers/net/memif/memif.h:98:
+ uint8_t if_name[32];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#224: FILE: drivers/net/memif/memif.h:103:
+ uint8_t if_name[32];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#229: FILE: drivers/net/memif/memif.h:108:
+ uint32_t code;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#230: FILE: drivers/net/memif/memif.h:109:
+ uint8_t string[96];$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#233: FILE: drivers/net/memif/memif.h:112:
+typedef struct __attribute__ ((packed, aligned (128)))
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#235: FILE: drivers/net/memif/memif.h:114:
+ memif_msg_type_t type:16;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#236: FILE: drivers/net/memif/memif.h:115:
+ union$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#237: FILE: drivers/net/memif/memif.h:116:
+ {$
ERROR:OPEN_BRACE: open brace '{' following union go on the same line
#237: FILE: drivers/net/memif/memif.h:116:
+ union
+ {
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#238: FILE: drivers/net/memif/memif.h:117:
+ memif_msg_hello_t hello;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#239: FILE: drivers/net/memif/memif.h:118:
+ memif_msg_init_t init;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#240: FILE: drivers/net/memif/memif.h:119:
+ memif_msg_add_region_t add_region;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#241: FILE: drivers/net/memif/memif.h:120:
+ memif_msg_add_ring_t add_ring;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#242: FILE: drivers/net/memif/memif.h:121:
+ memif_msg_connect_t connect;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#243: FILE: drivers/net/memif/memif.h:122:
+ memif_msg_connected_t connected;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#244: FILE: drivers/net/memif/memif.h:123:
+ memif_msg_disconnect_t disconnect;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#245: FILE: drivers/net/memif/memif.h:124:
+ };$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#248: FILE: drivers/net/memif/memif.h:127:
+_Static_assert (sizeof (memif_msg_t) == 128,
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#248: FILE: drivers/net/memif/memif.h:127:
+_Static_assert (sizeof (memif_msg_t) == 128,
CHECK:CAMELCASE: Avoid CamelCase: <_Static_assert>
#248: FILE: drivers/net/memif/memif.h:127:
+_Static_assert (sizeof (memif_msg_t) == 128,
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#257: FILE: drivers/net/memif/memif.h:136:
+ uint16_t flags;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#259: FILE: drivers/net/memif/memif.h:138:
+ memif_region_index_t region;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#260: FILE: drivers/net/memif/memif.h:139:
+ uint32_t length;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#261: FILE: drivers/net/memif/memif.h:140:
+ memif_region_offset_t offset;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#262: FILE: drivers/net/memif/memif.h:141:
+ uint32_t metadata;$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#265: FILE: drivers/net/memif/memif.h:144:
+_Static_assert (sizeof (memif_desc_t) == 16,
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#265: FILE: drivers/net/memif/memif.h:144:
+_Static_assert (sizeof (memif_desc_t) == 16,
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#269: FILE: drivers/net/memif/memif.h:148:
+ uint8_t mark[0] __attribute__((aligned(MEMIF_CACHELINE_SIZE)))$
ERROR:OPEN_BRACE: open brace '{' following struct go on the same line
#272: FILE: drivers/net/memif/memif.h:151:
+typedef struct
+{
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#273: FILE: drivers/net/memif/memif.h:152:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline0);$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#273: FILE: drivers/net/memif/memif.h:152:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline0);
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#274: FILE: drivers/net/memif/memif.h:153:
+ uint32_t cookie;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#275: FILE: drivers/net/memif/memif.h:154:
+ uint16_t flags;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#277: FILE: drivers/net/memif/memif.h:156:
+ volatile uint16_t head;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#278: FILE: drivers/net/memif/memif.h:157:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline1);$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#278: FILE: drivers/net/memif/memif.h:157:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline1);
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#279: FILE: drivers/net/memif/memif.h:158:
+ volatile uint16_t tail;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#280: FILE: drivers/net/memif/memif.h:159:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline2);$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#280: FILE: drivers/net/memif/memif.h:159:
+ MEMIF_CACHELINE_ALIGN_MARK (cacheline2);
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#281: FILE: drivers/net/memif/memif.h:160:
+ memif_desc_t desc[0];$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#333: FILE: drivers/net/memif/memif_socket.c:35:
+ char ctl[CMSG_SPACE (sizeof (int))];
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#333: FILE: drivers/net/memif/memif_socket.c:35:
+ char ctl[CMSG_SPACE (sizeof (int))];
CHECK:SPACING: No space is necessary after a cast
#335: FILE: drivers/net/memif/memif_socket.c:37:
+ iov[0].iov_base = (void *) msg;
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#336: FILE: drivers/net/memif/memif_socket.c:38:
+ iov[0].iov_len = sizeof (memif_msg_t);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#342: FILE: drivers/net/memif/memif_socket.c:44:
+ memset (&ctl, 0, sizeof (ctl));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#342: FILE: drivers/net/memif/memif_socket.c:44:
+ memset (&ctl, 0, sizeof (ctl));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#344: FILE: drivers/net/memif/memif_socket.c:46:
+ mh.msg_controllen = sizeof (ctl);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#345: FILE: drivers/net/memif/memif_socket.c:47:
+ cmsg = CMSG_FIRSTHDR (&mh);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#346: FILE: drivers/net/memif/memif_socket.c:48:
+ cmsg->cmsg_len = CMSG_LEN (sizeof (int));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#346: FILE: drivers/net/memif/memif_socket.c:48:
+ cmsg->cmsg_len = CMSG_LEN (sizeof (int));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#349: FILE: drivers/net/memif/memif_socket.c:51:
+ rte_memcpy (CMSG_DATA (cmsg), &afd, sizeof (int));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#349: FILE: drivers/net/memif/memif_socket.c:51:
+ rte_memcpy (CMSG_DATA (cmsg), &afd, sizeof (int));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#349: FILE: drivers/net/memif/memif_socket.c:51:
+ rte_memcpy (CMSG_DATA (cmsg), &afd, sizeof (int));
WARNING:LONG_LINE: line over 90 characters
#370: FILE: drivers/net/memif/memif_socket.c:72:
+ MIF_LOG(DEBUG, "%s: Sent msg type %u.", (cc->pmd != NULL) ? rte_vdev_device_name(cc->pmd->vdev) : "memif_driver", e->msg.type);
WARNING:LONG_LINE: line over 90 characters
#395: FILE: drivers/net/memif/memif_socket.c:97:
+memif_msg_enq_disconnect(struct memif_control_channel *cc, const char *reason, int err_code)
WARNING:LONG_LINE: line over 90 characters
#399: FILE: drivers/net/memif/memif_socket.c:101:
+ MIF_LOG(WARNING, "%s: Failed to enqueue disconnect message.", (cc->pmd != NULL) ? rte_vdev_device_name(cc->pmd->vdev) : "memif_driver");
CHECK:SPACING: No space is necessary after a cast
#409: FILE: drivers/net/memif/memif_socket.c:111:
+ strncpy((char *) d->string, reason, strlen(reason));
WARNING:BRACES: braces {} are not necessary for single statement blocks
#410: FILE: drivers/net/memif/memif_socket.c:112:
+ if (cc->pmd != NULL) {
+ strncpy(cc->pmd->local_disc_string, reason, strlen(reason));
+ }
CHECK:SPACING: No space is necessary after a cast
#433: FILE: drivers/net/memif/memif_socket.c:135:
+ strncpy((char *) h->name, rte_version(), strlen(rte_version()));
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->id == i->id'
#486: FILE: drivers/net/memif/memif_socket.c:188:
+ if (((pmd->flags & ETH_MEMIF_FLAG_DISABLED) == 0) && (pmd->id == i->id)) {
WARNING:LONG_LINE: line over 90 characters
#492: FILE: drivers/net/memif/memif_socket.c:194:
+ memif_msg_enq_disconnect(pmd->cc, "Only ethernet mode supported", 0);
WARNING:LONG_LINE: line over 90 characters
#506: FILE: drivers/net/memif/memif_socket.c:208:
+ memif_msg_enq_disconnect(pmd->cc, "Secret required", 0);
CHECK:SPACING: No space is necessary after a cast
#509: FILE: drivers/net/memif/memif_socket.c:211:
+ if (strcmp(pmd->secret, (char *) i->secret) != 0) {
WARNING:LONG_LINE: line over 90 characters
#510: FILE: drivers/net/memif/memif_socket.c:212:
+ memif_msg_enq_disconnect(pmd->cc, "Incorrect secret", 0);
CHECK:SPACING: No space is necessary after a cast
#627: FILE: drivers/net/memif/memif_socket.c:329:
+ strncpy (pmd->remote_if_name, (char *) c->if_name,
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#627: FILE: drivers/net/memif/memif_socket.c:329:
+ strncpy (pmd->remote_if_name, (char *) c->if_name,
CHECK:SPACING: No space is necessary after a cast
#628: FILE: drivers/net/memif/memif_socket.c:330:
+ strlen ((char *) c->if_name));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#628: FILE: drivers/net/memif/memif_socket.c:330:
+ strlen ((char *) c->if_name));
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#649: FILE: drivers/net/memif/memif_socket.c:351:
+ memif_disconnect(rte_eth_dev_allocated(
CHECK:SPACING: No space is necessary after a cast
#680: FILE: drivers/net/memif/memif_socket.c:382:
+ strncpy((char *) i->name, rte_version(), strlen(rte_version()));
CHECK:SPACING: No space is necessary after a cast
#683: FILE: drivers/net/memif/memif_socket.c:385:
+ strncpy((char *) i->secret, pmd->secret,
CHECK:SPACING: No space is necessary after a cast
#746: FILE: drivers/net/memif/memif_socket.c:448:
+ strncpy((char *) c->if_name, name, strlen(name));
CHECK:SPACING: No space is necessary after a cast
#763: FILE: drivers/net/memif/memif_socket.c:465:
+ strncpy((char *) c->if_name, name, strlen(name));
ERROR:SPACING: space required before the open parenthesis '('
#777: FILE: drivers/net/memif/memif_socket.c:479:
+ while((elt = TAILQ_FIRST(&cc->msg_queue)) != NULL) {
ERROR:SPACING: space required before the open parenthesis '('
#795: FILE: drivers/net/memif/memif_socket.c:497:
+ while((elt = TAILQ_FIRST(&pmd->cc->msg_queue)) != NULL) {
WARNING:BRACES: braces {} are not necessary for single statement blocks
#805: FILE: drivers/net/memif/memif_socket.c:507:
+ if (TAILQ_FIRST(&pmd->cc->msg_queue) != NULL) {
+ MIF_LOG(WARNING, "%s: Unexpected message(s) in message queue.", rte_vdev_device_name(pmd->vdev));
+ }
WARNING:LONG_LINE: line over 90 characters
#806: FILE: drivers/net/memif/memif_socket.c:508:
+ MIF_LOG(WARNING, "%s: Unexpected message(s) in message queue.", rte_vdev_device_name(pmd->vdev));
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#810: FILE: drivers/net/memif/memif_socket.c:512:
+ ret = rte_intr_callback_unregister(
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#817: FILE: drivers/net/memif/memif_socket.c:519:
+ ret = rte_intr_callback_unregister_pending(
WARNING:LONG_LINE: line over 90 characters
#826: FILE: drivers/net/memif/memif_socket.c:528:
+ MIF_LOG(WARNING, "%s: Failed to unregister control channel callback.", rte_vdev_device_name(pmd->vdev));
CHECK:SPACING: No space is necessary after a cast
#877: FILE: drivers/net/memif/memif_socket.c:579:
+ iov[0].iov_base = (void *) &msg;
WARNING:BRACES: braces {} are not necessary for any arm of this statement
#895: FILE: drivers/net/memif/memif_socket.c:597:
+ if (cmsg->cmsg_type == SCM_CREDENTIALS) {
[...]
+ else if (cmsg->cmsg_type == SCM_RIGHTS) {
[...]
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#898: FILE: drivers/net/memif/memif_socket.c:600:
+ }
+ else if (cmsg->cmsg_type == SCM_RIGHTS) {
ERROR:SPACING: space required after that ',' (ctx:VxV)
#902: FILE: drivers/net/memif/memif_socket.c:604:
+ cmsg = CMSG_NXTHDR(&mh,cmsg);
^
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cc->pmd == NULL'
#905: FILE: drivers/net/memif/memif_socket.c:607:
+ if ((cc->pmd == NULL) && msg.type != MEMIF_MSG_TYPE_INIT) {
ERROR:SPACING: space required before the open parenthesis '('
#912: FILE: drivers/net/memif/memif_socket.c:614:
+ switch(msg.type) {
WARNING:ONE_SEMICOLON: Statements terminations use 1 semicolon
#1118: FILE: drivers/net/memif/memif_socket.c:820:
+ goto error;;
CHECK:SPACING: No space is necessary after a cast
#1121: FILE: drivers/net/memif/memif_socket.c:823:
+ strncpy((char *) un.sun_path, (char *) sock->filename,
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1126: FILE: drivers/net/memif/memif_socket.c:828:
+ if (ret < 0) {
+ goto error;
+ }
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1130: FILE: drivers/net/memif/memif_socket.c:832:
+ if (ret < 0) {
+ goto error;
+ }
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1134: FILE: drivers/net/memif/memif_socket.c:836:
+ if (ret < 0) {
+ goto error;
+ }
ERROR:SPACING: space required before the open brace '{'
#1199: FILE: drivers/net/memif/memif_socket.c:901:
+ if (socket == NULL){
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1199: FILE: drivers/net/memif/memif_socket.c:901:
+ if (socket == NULL){
+ return -1;
+ }
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'socket->listener != 0'
#1210: FILE: drivers/net/memif/memif_socket.c:912:
+ if ((socket->listener != 0) && (pmd->role == MEMIF_ROLE_SLAVE)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->role == MEMIF_ROLE_SLAVE'
#1210: FILE: drivers/net/memif/memif_socket.c:912:
+ if ((socket->listener != 0) && (pmd->role == MEMIF_ROLE_SLAVE)) {
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#1214: FILE: drivers/net/memif/memif_socket.c:916:
+ }
+ else if ((socket->listener == 0) &&
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1248: FILE: drivers/net/memif/memif_socket.c:950:
+ if (hash == NULL) {
+ return;
+ }
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->rx_queues == NULL'
#1281: FILE: drivers/net/memif/memif_socket.c:983:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->tx_queues == NULL'
#1281: FILE: drivers/net/memif/memif_socket.c:983:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->socket_filename == NULL'
#1281: FILE: drivers/net/memif/memif_socket.c:983:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->rx_queues == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1003:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->tx_queues == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1003:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'pmd->socket_filename == NULL'
#1301: FILE: drivers/net/memif/memif_socket.c:1003:
+ if ((pmd->rx_queues == NULL) || (pmd->tx_queues == NULL) ||
+ (pmd->socket_filename == NULL)) {
WARNING:LONG_LINE: line over 90 characters
#1314: FILE: drivers/net/memif/memif_socket.c:1016:
+ MIF_LOG(ERR, "%s: Failed to open socket.", rte_vdev_device_name(pmd->vdev));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1321: FILE: drivers/net/memif/memif_socket.c:1023:
+ sizeof (sun.sun_path) - 1);
CHECK:SPACING: No space is necessary after a cast
#1323: FILE: drivers/net/memif/memif_socket.c:1025:
+ ret = connect(sockfd, (struct sockaddr *) &sun,
ERROR:SPACING: spaces required around that '==' (ctx:WxV)
#1337: FILE: drivers/net/memif/memif_socket.c:1039:
+ if (pmd->cc ==NULL) {
^
WARNING:LONG_LINE: line over 90 characters
#1338: FILE: drivers/net/memif/memif_socket.c:1040:
+ MIF_LOG(ERR, "%s: Failed to allocate control channel.", rte_vdev_device_name(pmd->vdev));
WARNING:TYPO_SPELLING: 'controll' may be misspelled - perhaps 'control'?
#1352: FILE: drivers/net/memif/memif_socket.c:1054:
+ "for controll fd", rte_vdev_device_name(pmd->vdev));
WARNING:TYPO_SPELLING: 'mesage' may be misspelled - perhaps 'message'?
#1417: FILE: drivers/net/memif/memif_socket.h:43:
+/* Control mesage queue. */
WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#1491: FILE: drivers/net/memif/rte_eth_memif.c:40:
+static const char* valid_arguments[] = {
ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar"
#1491: FILE: drivers/net/memif/rte_eth_memif.c:40:
+static const char* valid_arguments[] = {
ERROR:OPEN_BRACE: open brace '{' following function definitions go on the next line
#1507: FILE: drivers/net/memif/rte_eth_memif.c:56:
+const char *
+memif_version(void) {
CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#1511: FILE: drivers/net/memif/rte_eth_memif.c:60:
+ return ("memif-"STR(MEMIF_VERSION_MAJOR)"."STR(MEMIF_VERSION_MINOR));
ERROR:SPACING: spaces required around that '=' (ctx:VxW)
#1522: FILE: drivers/net/memif/rte_eth_memif.c:71:
+ dev_info->max_mac_addrs= 1;
^
CHECK:SPACING: No space is necessary after a cast
#1541: FILE: drivers/net/memif/rte_eth_memif.c:90:
+ return (memif_ring_t *) p;
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1574: FILE: drivers/net/memif/rte_eth_memif.c:123:
+ size = read (mq->intr_handle.fd, &b, sizeof (b));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1574: FILE: drivers/net/memif/rte_eth_memif.c:123:
+ size = read (mq->intr_handle.fd, &b, sizeof (b));
WARNING:INDENTED_LABEL: labels should not be indented
#1593: FILE: drivers/net/memif/rte_eth_memif.c:142:
+ next_slot:
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1628: FILE: drivers/net/memif/rte_eth_memif.c:177:
+ if (d0->flags & MEMIF_DESC_FLAG_NEXT) {
+ goto next_slot;
+ }
CHECK:BRACES: Blank lines aren't necessary before a close brace '}'
#1635: FILE: drivers/net/memif/rte_eth_memif.c:184:
+
+ }
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1640: FILE: drivers/net/memif/rte_eth_memif.c:189:
+ ring->tail = mq->last_head = cur_slot;
WARNING:INDENTED_LABEL: labels should not be indented
#1701: FILE: drivers/net/memif/rte_eth_memif.c:250:
+ next_in_chain:
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1755: FILE: drivers/net/memif/rte_eth_memif.c:304:
+ ssize_t size = write (mq->intr_handle.fd, &a, sizeof (a));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1755: FILE: drivers/net/memif/rte_eth_memif.c:304:
+ ssize_t size = write (mq->intr_handle.fd, &a, sizeof (a));
WARNING:LONG_LINE: line over 90 characters
#1758: FILE: drivers/net/memif/rte_eth_memif.c:307:
+ rte_vdev_device_name(pmd->vdev), mq - pmd->tx_queues, strerror(errno));
WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line
#1809: FILE: drivers/net/memif/rte_eth_memif.c:358:
+ * Other regions contain buffers.
+ */
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1815: FILE: drivers/net/memif/rte_eth_memif.c:364:
+ (sizeof (memif_ring_t) +
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1816: FILE: drivers/net/memif/rte_eth_memif.c:365:
+ sizeof (memif_desc_t) *
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1872: FILE: drivers/net/memif/rte_eth_memif.c:421:
+ ring->head = ring->tail = 0;
CHECK:SPACING: No space is necessary after a cast
#1879: FILE: drivers/net/memif/rte_eth_memif.c:428:
+ (uint32_t) (slot * pmd->run.buffer_size);
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1886: FILE: drivers/net/memif/rte_eth_memif.c:435:
+ ring->head = ring->tail = 0;
CHECK:SPACING: No space is necessary after a cast
#1894: FILE: drivers/net/memif/rte_eth_memif.c:443:
+ (uint32_t) (slot * pmd->run.buffer_size);
CHECK:SPACING: No space is necessary after a cast
#1912: FILE: drivers/net/memif/rte_eth_memif.c:461:
+ mq->offset = (void *) mq->ring - (void *) pmd->regions[0].addr;
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1913: FILE: drivers/net/memif/rte_eth_memif.c:462:
+ mq->last_head = mq->last_tail = 0;
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1914: FILE: drivers/net/memif/rte_eth_memif.c:463:
+ mq->intr_handle.fd = eventfd (0, EFD_NONBLOCK);
ERROR:SPACING: space required after that ',' (ctx:VxV)
#1916: FILE: drivers/net/memif/rte_eth_memif.c:465:
+ MIF_LOG(WARNING,"%s: Failed to create eventfd for tx queue %d: %s.",
^
CHECK:SPACING: No space is necessary after a cast
#1927: FILE: drivers/net/memif/rte_eth_memif.c:476:
+ mq->offset = (void *) mq->ring - (void *) pmd->regions[0].addr;
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1928: FILE: drivers/net/memif/rte_eth_memif.c:477:
+ mq->last_head = mq->last_tail = 0;
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1929: FILE: drivers/net/memif/rte_eth_memif.c:478:
+ mq->intr_handle.fd = eventfd (0, EFD_NONBLOCK);
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1943: FILE: drivers/net/memif/rte_eth_memif.c:492:
+ if (ret < 0) {
+ return ret;
+ }
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#1957: FILE: drivers/net/memif/rte_eth_memif.c:506:
+ struct rte_eth_dev *eth_dev = rte_eth_dev_allocated(
ERROR:SPACING: space required before the open brace '{'
#1963: FILE: drivers/net/memif/rte_eth_memif.c:512:
+ for (i = 0; i < pmd->regions_num; i++){
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#1986: FILE: drivers/net/memif/rte_eth_memif.c:535:
+ mq->ring->head = mq->ring->tail = mq->last_head =
WARNING:BRACES: braces {} are not necessary for single statement blocks
#1989: FILE: drivers/net/memif/rte_eth_memif.c:538:
+ if (pmd->role == MEMIF_ROLE_MASTER) {
+ mq->ring->flags = MEMIF_RING_FLAG_MASK_INT;
+ }
CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#2001: FILE: drivers/net/memif/rte_eth_memif.c:550:
+ mq->ring->head = mq->ring->tail = mq->last_head =
WARNING:BRACES: braces {} are not necessary for single statement blocks
#2004: FILE: drivers/net/memif/rte_eth_memif.c:553:
+ if (pmd->role == MEMIF_ROLE_SLAVE) {
+ mq->ring->flags = MEMIF_RING_FLAG_MASK_INT;
+ }
ERROR:SPACING: space required before the open parenthesis '('
#2022: FILE: drivers/net/memif/rte_eth_memif.c:571:
+ switch(pmd->role) {
ERROR:CODE_INDENT: code indent should use tabs where possible
#2048: FILE: drivers/net/memif/rte_eth_memif.c:597:
+ uint16_t nb_tx_desc __rte_unused,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2048: FILE: drivers/net/memif/rte_eth_memif.c:597:
+ uint16_t nb_tx_desc __rte_unused,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2049: FILE: drivers/net/memif/rte_eth_memif.c:598:
+ unsigned int socket_id __rte_unused,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2049: FILE: drivers/net/memif/rte_eth_memif.c:598:
+ unsigned int socket_id __rte_unused,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2050: FILE: drivers/net/memif/rte_eth_memif.c:599:
+ const struct rte_eth_txconf *tx_conf __rte_unused)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2050: FILE: drivers/net/memif/rte_eth_memif.c:599:
+ const struct rte_eth_txconf *tx_conf __rte_unused)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2078: FILE: drivers/net/memif/rte_eth_memif.c:627:
+ uint16_t qid,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2078: FILE: drivers/net/memif/rte_eth_memif.c:627:
+ uint16_t qid,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2079: FILE: drivers/net/memif/rte_eth_memif.c:628:
+ uint16_t nb_rx_desc __rte_unused,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2079: FILE: drivers/net/memif/rte_eth_memif.c:628:
+ uint16_t nb_rx_desc __rte_unused,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2080: FILE: drivers/net/memif/rte_eth_memif.c:629:
+ unsigned int socket_id __rte_unused,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2080: FILE: drivers/net/memif/rte_eth_memif.c:629:
+ unsigned int socket_id __rte_unused,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2081: FILE: drivers/net/memif/rte_eth_memif.c:630:
+ const struct rte_eth_rxconf *rx_conf __rte_unused,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2081: FILE: drivers/net/memif/rte_eth_memif.c:630:
+ const struct rte_eth_rxconf *rx_conf __rte_unused,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#2082: FILE: drivers/net/memif/rte_eth_memif.c:631:
+ struct rte_mempool *mb_pool)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2082: FILE: drivers/net/memif/rte_eth_memif.c:631:
+ struct rte_mempool *mb_pool)$
WARNING:LONG_LINE: line over 90 characters
#2274: FILE: drivers/net/memif/rte_eth_memif.c:823:
+ strncpy(pmd->secret, secret, (strlen(secret) >= 24) ? 24 : strlen(secret));
WARNING:NAKED_SSCANF: unchecked sscanf return value
#2303: FILE: drivers/net/memif/rte_eth_memif.c:852:
+ sscanf(eth_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
+ &pmd->eth_addr.addr_bytes[0], &pmd->eth_addr.addr_bytes[1],
+ &pmd->eth_addr.addr_bytes[2], &pmd->eth_addr.addr_bytes[3],
+ &pmd->eth_addr.addr_bytes[4], &pmd->eth_addr.addr_bytes[5]);
WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2367: FILE: drivers/net/memif/rte_eth_memif.c:916:
+ unsigned long int tmp;
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2371: FILE: drivers/net/memif/rte_eth_memif.c:920:
+ if ((tmp == 0) || (tmp > 0xFFFF)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > 0xFFFF'
#2371: FILE: drivers/net/memif/rte_eth_memif.c:920:
+ if ((tmp == 0) || (tmp > 0xFFFF)) {
WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2382: FILE: drivers/net/memif/rte_eth_memif.c:931:
+ unsigned long int tmp;
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2386: FILE: drivers/net/memif/rte_eth_memif.c:935:
+ if ((tmp == 0) || (tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE'
#2386: FILE: drivers/net/memif/rte_eth_memif.c:935:
+ if ((tmp == 0) || (tmp > ETH_MEMIF_MAX_LOG2_RING_SIZE)) {
WARNING:UNNECESSARY_INT: Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary
#2398: FILE: drivers/net/memif/rte_eth_memif.c:947:
+ unsigned long int tmp;
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp == 0'
#2402: FILE: drivers/net/memif/rte_eth_memif.c:951:
+ if ((tmp == 0) || (tmp > 0xFF)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'tmp > 0xFF'
#2402: FILE: drivers/net/memif/rte_eth_memif.c:951:
+ if ((tmp == 0) || (tmp > 0xFF)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'dir == NULL'
#2429: FILE: drivers/net/memif/rte_eth_memif.c:978:
+ if ((dir == NULL) || (faccessat(-1, dir, F_OK | R_OK |
+ W_OK, AT_EACCESS) < 0)) {
WARNING:LONG_LINE: line over 90 characters
#2521: FILE: drivers/net/memif/rte_eth_memif.c:1070:
+ ret = memif_check_socket_filename(socket_filename);
WARNING:BRACES: braces {} are not necessary for single statement blocks
#2530: FILE: drivers/net/memif/rte_eth_memif.c:1079:
+ if (strcmp(pair->key, ETH_MEMIF_MAC_ARG) == 0) {
+ eth_addr = pair->value;
+ }
WARNING:BRACES: braces {} are not necessary for single statement blocks
#2544: FILE: drivers/net/memif/rte_eth_memif.c:1093:
+ if (strcmp(pair->key, ETH_MEMIF_SECRET_ARG) == 0) {
+ secret = pair->value;
+ }
ERROR:SPACING: space required after that ',' (ctx:VxV)
#2653: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))
^
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'a' - possible side-effects?
#2653: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'b' - possible side-effects?
#2653: FILE: drivers/net/memif/rte_eth_memif.h:37:
+#define memif_min(a,b) (((a) < (b)) ? (a) : (b))
WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop
#2655: FILE: drivers/net/memif/rte_eth_memif.h:39:
+#define MIF_LOG(level, fmt, args...) \
+do { \
+ rte_log(RTE_LOG_ ## level, memif_logtype, \
+ "%s(): " fmt "
", __func__, ##args); \
+} while (0)
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#2764: FILE: drivers/net/memif/rte_eth_memif.h:148:
+const char * memif_version(void);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#2782: FILE: drivers/net/memif/rte_eth_memif.h:166:
+memfd_create (const char *name, unsigned int flags)
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#2784: FILE: drivers/net/memif/rte_eth_memif.h:168:
+ return syscall (__NR_memfd_create, name, flags);$
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#2784: FILE: drivers/net/memif/rte_eth_memif.h:168:
+ return syscall (__NR_memfd_create, name, flags);
total: 29 errors, 145 warnings, 2728 lines checked
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-10 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20181210094256.18224-1-jgrajcia@cisco.com>
2018-12-10 9:44 ` [dpdk-test-report] |WARNING| pw48617 [RFC] /net: memory interface (memif) checkpatch
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).