|WARNING| pw161782 [PATCH] examples/l2fwd_acl: add ACL-based L2 forwarding example
checkpatch at dpdk.org
checkpatch at dpdk.org
Mon Feb 23 08:58:06 CET 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/161782
_coding style issues_
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#197: FILE: examples/l2fwd_acl/main.c:32:
+ uint8_t proto;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#198: FILE: examples/l2fwd_acl/main.c:33:
+ uint32_t src_ip;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#199: FILE: examples/l2fwd_acl/main.c:34:
+ uint32_t dst_ip;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#200: FILE: examples/l2fwd_acl/main.c:35:
+ uint16_t src_port;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#201: FILE: examples/l2fwd_acl/main.c:36:
+ uint16_t dst_port;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#205: FILE: examples/l2fwd_acl/main.c:40:
+ PROTO_FIELD,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#206: FILE: examples/l2fwd_acl/main.c:41:
+ SRC_FIELD,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#207: FILE: examples/l2fwd_acl/main.c:42:
+ DST_FIELD,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#208: FILE: examples/l2fwd_acl/main.c:43:
+ SPORT_FIELD,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#209: FILE: examples/l2fwd_acl/main.c:44:
+ DPORT_FIELD$
WARNING:LONG_LINE: line length of 102 exceeds 100 columns
#216: FILE: examples/l2fwd_acl/main.c:51:
+ { RTE_ACL_FIELD_TYPE_BITMASK, sizeof(uint8_t), PROTO_FIELD, 0, offsetof(struct pkt_key, proto) },
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#216: FILE: examples/l2fwd_acl/main.c:51:
+ { RTE_ACL_FIELD_TYPE_BITMASK, sizeof(uint8_t), PROTO_FIELD, 0, offsetof(struct pkt_key, proto) },$
WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#217: FILE: examples/l2fwd_acl/main.c:52:
+ { RTE_ACL_FIELD_TYPE_MASK, sizeof(uint32_t), SRC_FIELD, 1, offsetof(struct pkt_key, src_ip) },
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#217: FILE: examples/l2fwd_acl/main.c:52:
+ { RTE_ACL_FIELD_TYPE_MASK, sizeof(uint32_t), SRC_FIELD, 1, offsetof(struct pkt_key, src_ip) },$
WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#218: FILE: examples/l2fwd_acl/main.c:53:
+ { RTE_ACL_FIELD_TYPE_MASK, sizeof(uint32_t), DST_FIELD, 2, offsetof(struct pkt_key, dst_ip) },
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#218: FILE: examples/l2fwd_acl/main.c:53:
+ { RTE_ACL_FIELD_TYPE_MASK, sizeof(uint32_t), DST_FIELD, 2, offsetof(struct pkt_key, dst_ip) },$
WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#219: FILE: examples/l2fwd_acl/main.c:54:
+ { RTE_ACL_FIELD_TYPE_RANGE, sizeof(uint16_t), SPORT_FIELD, 3, offsetof(struct pkt_key, src_port) },
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#219: FILE: examples/l2fwd_acl/main.c:54:
+ { RTE_ACL_FIELD_TYPE_RANGE, sizeof(uint16_t), SPORT_FIELD, 3, offsetof(struct pkt_key, src_port) },$
WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#220: FILE: examples/l2fwd_acl/main.c:55:
+ { RTE_ACL_FIELD_TYPE_RANGE, sizeof(uint16_t), DPORT_FIELD, 3, offsetof(struct pkt_key, dst_port) },
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#220: FILE: examples/l2fwd_acl/main.c:55:
+ { RTE_ACL_FIELD_TYPE_RANGE, sizeof(uint16_t), DPORT_FIELD, 3, offsetof(struct pkt_key, dst_port) },$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#226: FILE: examples/l2fwd_acl/main.c:61:
+ if (sig == SIGINT || sig == SIGTERM)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#227: FILE: examples/l2fwd_acl/main.c:62:
+ force_quit = true;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#227: FILE: examples/l2fwd_acl/main.c:62:
+ force_quit = true;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#233: FILE: examples/l2fwd_acl/main.c:68:
+ int opt;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#234: FILE: examples/l2fwd_acl/main.c:69:
+ while ((opt = getopt(argc, argv, "p:")) != -1) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#235: FILE: examples/l2fwd_acl/main.c:70:
+ switch (opt) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#235: FILE: examples/l2fwd_acl/main.c:70:
+ switch (opt) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#236: FILE: examples/l2fwd_acl/main.c:71:
+ case 'p':$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#236: FILE: examples/l2fwd_acl/main.c:71:
+ case 'p':$
ERROR:CODE_INDENT: code indent should use tabs where possible
#237: FILE: examples/l2fwd_acl/main.c:72:
+ portmask = strtoul(optarg, NULL, 16);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#237: FILE: examples/l2fwd_acl/main.c:72:
+ portmask = strtoul(optarg, NULL, 16);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#238: FILE: examples/l2fwd_acl/main.c:73:
+ break;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#238: FILE: examples/l2fwd_acl/main.c:73:
+ break;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#239: FILE: examples/l2fwd_acl/main.c:74:
+ default:$
ERROR:CODE_INDENT: code indent should use tabs where possible
#240: FILE: examples/l2fwd_acl/main.c:75:
+ return -1;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#240: FILE: examples/l2fwd_acl/main.c:75:
+ return -1;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#241: FILE: examples/l2fwd_acl/main.c:76:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#241: FILE: examples/l2fwd_acl/main.c:76:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#242: FILE: examples/l2fwd_acl/main.c:77:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#243: FILE: examples/l2fwd_acl/main.c:78:
+ return 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#251: FILE: examples/l2fwd_acl/main.c:86:
+ struct rte_acl_param prm = {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#252: FILE: examples/l2fwd_acl/main.c:87:
+ .name = "acl_ctx",$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#252: FILE: examples/l2fwd_acl/main.c:87:
+ .name = "acl_ctx",$
ERROR:CODE_INDENT: code indent should use tabs where possible
#253: FILE: examples/l2fwd_acl/main.c:88:
+ .socket_id = rte_socket_id(),$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#253: FILE: examples/l2fwd_acl/main.c:88:
+ .socket_id = rte_socket_id(),$
ERROR:CODE_INDENT: code indent should use tabs where possible
#254: FILE: examples/l2fwd_acl/main.c:89:
+ .rule_size = RTE_ACL_RULE_SZ(NUM_FIELDS),$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#254: FILE: examples/l2fwd_acl/main.c:89:
+ .rule_size = RTE_ACL_RULE_SZ(NUM_FIELDS),$
ERROR:CODE_INDENT: code indent should use tabs where possible
#255: FILE: examples/l2fwd_acl/main.c:90:
+ .max_rule_num = MAX_RULES$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#255: FILE: examples/l2fwd_acl/main.c:90:
+ .max_rule_num = MAX_RULES$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#256: FILE: examples/l2fwd_acl/main.c:91:
+ };$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#258: FILE: examples/l2fwd_acl/main.c:93:
+ struct rte_acl_ctx *ctx = rte_acl_create(&prm);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#259: FILE: examples/l2fwd_acl/main.c:94:
+ if (!ctx)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#260: FILE: examples/l2fwd_acl/main.c:95:
+ rte_exit(EXIT_FAILURE, "ACL create failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#260: FILE: examples/l2fwd_acl/main.c:95:
+ rte_exit(EXIT_FAILURE, "ACL create failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#262: FILE: examples/l2fwd_acl/main.c:97:
+ struct acl_rule rule;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#263: FILE: examples/l2fwd_acl/main.c:98:
+ memset(&rule, 0, sizeof(rule));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#265: FILE: examples/l2fwd_acl/main.c:100:
+ rule.data.priority = 10;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#266: FILE: examples/l2fwd_acl/main.c:101:
+ rule.data.category_mask = 1;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#267: FILE: examples/l2fwd_acl/main.c:102:
+ rule.data.userdata = 1;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#269: FILE: examples/l2fwd_acl/main.c:104:
+ rule.field[PROTO_FIELD].value.u8 = IPPROTO_TCP;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#270: FILE: examples/l2fwd_acl/main.c:105:
+ rule.field[PROTO_FIELD].mask_range.u8 = 0xFF;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#272: FILE: examples/l2fwd_acl/main.c:107:
+ rule.field[SRC_FIELD].value.u32 =$
ERROR:CODE_INDENT: code indent should use tabs where possible
#273: FILE: examples/l2fwd_acl/main.c:108:
+ rte_be_to_cpu_32(RTE_IPV4(172,17,166,200));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#273: FILE: examples/l2fwd_acl/main.c:108:
+ rte_be_to_cpu_32(RTE_IPV4(172,17,166,200));$
ERROR:SPACING: space required after that ',' (ctx:VxV)
#273: FILE: examples/l2fwd_acl/main.c:108:
+ rte_be_to_cpu_32(RTE_IPV4(172,17,166,200));
^
ERROR:SPACING: space required after that ',' (ctx:VxV)
#273: FILE: examples/l2fwd_acl/main.c:108:
+ rte_be_to_cpu_32(RTE_IPV4(172,17,166,200));
^
ERROR:SPACING: space required after that ',' (ctx:VxV)
#273: FILE: examples/l2fwd_acl/main.c:108:
+ rte_be_to_cpu_32(RTE_IPV4(172,17,166,200));
^
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#274: FILE: examples/l2fwd_acl/main.c:109:
+ rule.field[SRC_FIELD].mask_range.u32 = 32;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#276: FILE: examples/l2fwd_acl/main.c:111:
+ rule.field[DST_FIELD].value.u32 = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#277: FILE: examples/l2fwd_acl/main.c:112:
+ rule.field[DST_FIELD].mask_range.u32 = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#279: FILE: examples/l2fwd_acl/main.c:114:
+ rule.field[SPORT_FIELD].value.u16 = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#280: FILE: examples/l2fwd_acl/main.c:115:
+ rule.field[SPORT_FIELD].mask_range.u16 = 65535;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#282: FILE: examples/l2fwd_acl/main.c:117:
+ rule.field[DPORT_FIELD].value.u16 = 0;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#283: FILE: examples/l2fwd_acl/main.c:118:
+ rule.field[DPORT_FIELD].mask_range.u16 = 65535;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#285: FILE: examples/l2fwd_acl/main.c:120:
+ if (rte_acl_add_rules(ctx, (struct rte_acl_rule *)&rule, 1) < 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#286: FILE: examples/l2fwd_acl/main.c:121:
+ rte_exit(EXIT_FAILURE, "ACL rule add failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#286: FILE: examples/l2fwd_acl/main.c:121:
+ rte_exit(EXIT_FAILURE, "ACL rule add failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#288: FILE: examples/l2fwd_acl/main.c:123:
+ struct rte_acl_config cfg;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#289: FILE: examples/l2fwd_acl/main.c:124:
+ memset(&cfg, 0, sizeof(cfg));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#290: FILE: examples/l2fwd_acl/main.c:125:
+ cfg.num_categories = 1;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#291: FILE: examples/l2fwd_acl/main.c:126:
+ cfg.num_fields = NUM_FIELDS;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#292: FILE: examples/l2fwd_acl/main.c:127:
+ memcpy(cfg.defs, field_defs, sizeof(field_defs));$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#294: FILE: examples/l2fwd_acl/main.c:129:
+ if (rte_acl_build(ctx, &cfg) != 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#295: FILE: examples/l2fwd_acl/main.c:130:
+ rte_exit(EXIT_FAILURE, "ACL build failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#295: FILE: examples/l2fwd_acl/main.c:130:
+ rte_exit(EXIT_FAILURE, "ACL build failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#297: FILE: examples/l2fwd_acl/main.c:132:
+ RTE_LOG(INFO, L2FWD_ACL, "ACL ready
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#298: FILE: examples/l2fwd_acl/main.c:133:
+ return ctx;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#305: FILE: examples/l2fwd_acl/main.c:140:
+ force_quit = false;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#306: FILE: examples/l2fwd_acl/main.c:141:
+ signal(SIGINT, signal_handler);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#307: FILE: examples/l2fwd_acl/main.c:142:
+ signal(SIGTERM, signal_handler);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#309: FILE: examples/l2fwd_acl/main.c:144:
+ int ret = rte_eal_init(argc, argv);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#310: FILE: examples/l2fwd_acl/main.c:145:
+ if (ret < 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#311: FILE: examples/l2fwd_acl/main.c:146:
+ rte_exit(EXIT_FAILURE, "EAL init failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#311: FILE: examples/l2fwd_acl/main.c:146:
+ rte_exit(EXIT_FAILURE, "EAL init failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#313: FILE: examples/l2fwd_acl/main.c:148:
+ argc -= ret;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#314: FILE: examples/l2fwd_acl/main.c:149:
+ argv += ret;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#316: FILE: examples/l2fwd_acl/main.c:151:
+ if (parse_args(argc, argv) < 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#317: FILE: examples/l2fwd_acl/main.c:152:
+ rte_exit(EXIT_FAILURE, "Invalid arguments
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#317: FILE: examples/l2fwd_acl/main.c:152:
+ rte_exit(EXIT_FAILURE, "Invalid arguments
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#319: FILE: examples/l2fwd_acl/main.c:154:
+ struct rte_acl_ctx *acl_ctx = init_acl();$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#321: FILE: examples/l2fwd_acl/main.c:156:
+ struct rte_mempool *mp = rte_pktmbuf_pool_create($
ERROR:CODE_INDENT: code indent should use tabs where possible
#322: FILE: examples/l2fwd_acl/main.c:157:
+ "mbuf_pool", NB_MBUF, 256, 0,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#322: FILE: examples/l2fwd_acl/main.c:157:
+ "mbuf_pool", NB_MBUF, 256, 0,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#323: FILE: examples/l2fwd_acl/main.c:158:
+ RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#323: FILE: examples/l2fwd_acl/main.c:158:
+ RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#325: FILE: examples/l2fwd_acl/main.c:160:
+ if (!mp)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#326: FILE: examples/l2fwd_acl/main.c:161:
+ rte_exit(EXIT_FAILURE, "mempool failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#326: FILE: examples/l2fwd_acl/main.c:161:
+ rte_exit(EXIT_FAILURE, "mempool failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#328: FILE: examples/l2fwd_acl/main.c:163:
+ uint16_t port_id;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#329: FILE: examples/l2fwd_acl/main.c:164:
+ RTE_ETH_FOREACH_DEV(port_id) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#331: FILE: examples/l2fwd_acl/main.c:166:
+ if (!(portmask & (1 << port_id)))$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#331: FILE: examples/l2fwd_acl/main.c:166:
+ if (!(portmask & (1 << port_id)))$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#331: FILE: examples/l2fwd_acl/main.c:166:
+ if (!(portmask & (1 << port_id)))
+ continue;
ERROR:CODE_INDENT: code indent should use tabs where possible
#332: FILE: examples/l2fwd_acl/main.c:167:
+ continue;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#332: FILE: examples/l2fwd_acl/main.c:167:
+ continue;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#334: FILE: examples/l2fwd_acl/main.c:169:
+ struct rte_eth_conf conf = {0};$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#334: FILE: examples/l2fwd_acl/main.c:169:
+ struct rte_eth_conf conf = {0};$
ERROR:CODE_INDENT: code indent should use tabs where possible
#336: FILE: examples/l2fwd_acl/main.c:171:
+ if (rte_eth_dev_configure(port_id, 1, 1, &conf) < 0)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#336: FILE: examples/l2fwd_acl/main.c:171:
+ if (rte_eth_dev_configure(port_id, 1, 1, &conf) < 0)$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#336: FILE: examples/l2fwd_acl/main.c:171:
+ if (rte_eth_dev_configure(port_id, 1, 1, &conf) < 0)
+ rte_exit(EXIT_FAILURE, "port configure failed
");
ERROR:CODE_INDENT: code indent should use tabs where possible
#337: FILE: examples/l2fwd_acl/main.c:172:
+ rte_exit(EXIT_FAILURE, "port configure failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#337: FILE: examples/l2fwd_acl/main.c:172:
+ rte_exit(EXIT_FAILURE, "port configure failed
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#339: FILE: examples/l2fwd_acl/main.c:174:
+ if (rte_eth_rx_queue_setup(port_id, 0, 1024,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#339: FILE: examples/l2fwd_acl/main.c:174:
+ if (rte_eth_rx_queue_setup(port_id, 0, 1024,$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#339: FILE: examples/l2fwd_acl/main.c:174:
+ if (rte_eth_rx_queue_setup(port_id, 0, 1024,
[...]
+ rte_exit(EXIT_FAILURE, "rx setup failed
");
ERROR:CODE_INDENT: code indent should use tabs where possible
#340: FILE: examples/l2fwd_acl/main.c:175:
+ rte_eth_dev_socket_id(port_id), NULL, mp) < 0)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#340: FILE: examples/l2fwd_acl/main.c:175:
+ rte_eth_dev_socket_id(port_id), NULL, mp) < 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#341: FILE: examples/l2fwd_acl/main.c:176:
+ rte_exit(EXIT_FAILURE, "rx setup failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#341: FILE: examples/l2fwd_acl/main.c:176:
+ rte_exit(EXIT_FAILURE, "rx setup failed
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#343: FILE: examples/l2fwd_acl/main.c:178:
+ if (rte_eth_tx_queue_setup(port_id, 0, 1024,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#343: FILE: examples/l2fwd_acl/main.c:178:
+ if (rte_eth_tx_queue_setup(port_id, 0, 1024,$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#343: FILE: examples/l2fwd_acl/main.c:178:
+ if (rte_eth_tx_queue_setup(port_id, 0, 1024,
[...]
+ rte_exit(EXIT_FAILURE, "tx setup failed
");
ERROR:CODE_INDENT: code indent should use tabs where possible
#344: FILE: examples/l2fwd_acl/main.c:179:
+ rte_eth_dev_socket_id(port_id), NULL) < 0)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#344: FILE: examples/l2fwd_acl/main.c:179:
+ rte_eth_dev_socket_id(port_id), NULL) < 0)$
ERROR:CODE_INDENT: code indent should use tabs where possible
#345: FILE: examples/l2fwd_acl/main.c:180:
+ rte_exit(EXIT_FAILURE, "tx setup failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#345: FILE: examples/l2fwd_acl/main.c:180:
+ rte_exit(EXIT_FAILURE, "tx setup failed
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#347: FILE: examples/l2fwd_acl/main.c:182:
+ if (rte_eth_dev_start(port_id) < 0)$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#347: FILE: examples/l2fwd_acl/main.c:182:
+ if (rte_eth_dev_start(port_id) < 0)$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#347: FILE: examples/l2fwd_acl/main.c:182:
+ if (rte_eth_dev_start(port_id) < 0)
+ rte_exit(EXIT_FAILURE, "port start failed
");
ERROR:CODE_INDENT: code indent should use tabs where possible
#348: FILE: examples/l2fwd_acl/main.c:183:
+ rte_exit(EXIT_FAILURE, "port start failed
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#348: FILE: examples/l2fwd_acl/main.c:183:
+ rte_exit(EXIT_FAILURE, "port start failed
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#350: FILE: examples/l2fwd_acl/main.c:185:
+ rte_eth_promiscuous_enable(port_id);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#350: FILE: examples/l2fwd_acl/main.c:185:
+ rte_eth_promiscuous_enable(port_id);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#352: FILE: examples/l2fwd_acl/main.c:187:
+ RTE_LOG(INFO, L2FWD_ACL, "Started port %u
", port_id);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#352: FILE: examples/l2fwd_acl/main.c:187:
+ RTE_LOG(INFO, L2FWD_ACL, "Started port %u
", port_id);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#353: FILE: examples/l2fwd_acl/main.c:188:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#355: FILE: examples/l2fwd_acl/main.c:190:
+ struct rte_mbuf *bufs[BURST];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#357: FILE: examples/l2fwd_acl/main.c:192:
+ while (!force_quit) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#359: FILE: examples/l2fwd_acl/main.c:194:
+ RTE_ETH_FOREACH_DEV(port_id) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#359: FILE: examples/l2fwd_acl/main.c:194:
+ RTE_ETH_FOREACH_DEV(port_id) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#361: FILE: examples/l2fwd_acl/main.c:196:
+ if (!(portmask & (1 << port_id)))$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#361: FILE: examples/l2fwd_acl/main.c:196:
+ if (!(portmask & (1 << port_id)))$
ERROR:CODE_INDENT: code indent should use tabs where possible
#362: FILE: examples/l2fwd_acl/main.c:197:
+ continue;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#362: FILE: examples/l2fwd_acl/main.c:197:
+ continue;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#364: FILE: examples/l2fwd_acl/main.c:199:
+ uint16_t nb = rte_eth_rx_burst(port_id, 0, bufs, BURST);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#364: FILE: examples/l2fwd_acl/main.c:199:
+ uint16_t nb = rte_eth_rx_burst(port_id, 0, bufs, BURST);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#365: FILE: examples/l2fwd_acl/main.c:200:
+ if (!nb) continue;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#365: FILE: examples/l2fwd_acl/main.c:200:
+ if (!nb) continue;$
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#365: FILE: examples/l2fwd_acl/main.c:200:
+ if (!nb) continue;
ERROR:CODE_INDENT: code indent should use tabs where possible
#367: FILE: examples/l2fwd_acl/main.c:202:
+ for (int i = 0; i < nb; i++) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#367: FILE: examples/l2fwd_acl/main.c:202:
+ for (int i = 0; i < nb; i++) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#369: FILE: examples/l2fwd_acl/main.c:204:
+ struct rte_mbuf *m = bufs[i];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#369: FILE: examples/l2fwd_acl/main.c:204:
+ struct rte_mbuf *m = bufs[i];$
ERROR:CODE_INDENT: code indent should use tabs where possible
#370: FILE: examples/l2fwd_acl/main.c:205:
+ struct rte_ether_hdr *eth =$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#370: FILE: examples/l2fwd_acl/main.c:205:
+ struct rte_ether_hdr *eth =$
ERROR:CODE_INDENT: code indent should use tabs where possible
#371: FILE: examples/l2fwd_acl/main.c:206:
+ rte_pktmbuf_mtod(m, struct rte_ether_hdr *);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#371: FILE: examples/l2fwd_acl/main.c:206:
+ rte_pktmbuf_mtod(m, struct rte_ether_hdr *);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#373: FILE: examples/l2fwd_acl/main.c:208:
+ if (eth->ether_type !=$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#373: FILE: examples/l2fwd_acl/main.c:208:
+ if (eth->ether_type !=$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#373: FILE: examples/l2fwd_acl/main.c:208:
+ if (eth->ether_type !=
[...]
+ rte_pktmbuf_free(m);
ERROR:CODE_INDENT: code indent should use tabs where possible
#374: FILE: examples/l2fwd_acl/main.c:209:
+ rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#374: FILE: examples/l2fwd_acl/main.c:209:
+ rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#375: FILE: examples/l2fwd_acl/main.c:210:
+ rte_pktmbuf_free(m);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#375: FILE: examples/l2fwd_acl/main.c:210:
+ rte_pktmbuf_free(m);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#376: FILE: examples/l2fwd_acl/main.c:211:
+ continue;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#376: FILE: examples/l2fwd_acl/main.c:211:
+ continue;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#377: FILE: examples/l2fwd_acl/main.c:212:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#377: FILE: examples/l2fwd_acl/main.c:212:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#379: FILE: examples/l2fwd_acl/main.c:214:
+ struct rte_ipv4_hdr *ip =$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#379: FILE: examples/l2fwd_acl/main.c:214:
+ struct rte_ipv4_hdr *ip =$
ERROR:CODE_INDENT: code indent should use tabs where possible
#380: FILE: examples/l2fwd_acl/main.c:215:
+ (struct rte_ipv4_hdr *)(eth + 1);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#380: FILE: examples/l2fwd_acl/main.c:215:
+ (struct rte_ipv4_hdr *)(eth + 1);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#382: FILE: examples/l2fwd_acl/main.c:217:
+ struct pkt_key key = {0};$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#382: FILE: examples/l2fwd_acl/main.c:217:
+ struct pkt_key key = {0};$
ERROR:CODE_INDENT: code indent should use tabs where possible
#383: FILE: examples/l2fwd_acl/main.c:218:
+ key.proto = ip->next_proto_id;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#383: FILE: examples/l2fwd_acl/main.c:218:
+ key.proto = ip->next_proto_id;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#384: FILE: examples/l2fwd_acl/main.c:219:
+ key.src_ip = rte_be_to_cpu_32(ip->src_addr);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#384: FILE: examples/l2fwd_acl/main.c:219:
+ key.src_ip = rte_be_to_cpu_32(ip->src_addr);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#385: FILE: examples/l2fwd_acl/main.c:220:
+ key.dst_ip = rte_be_to_cpu_32(ip->dst_addr);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#385: FILE: examples/l2fwd_acl/main.c:220:
+ key.dst_ip = rte_be_to_cpu_32(ip->dst_addr);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#387: FILE: examples/l2fwd_acl/main.c:222:
+ uint8_t *l4 = (uint8_t *)ip + (ip->ihl * 4);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#387: FILE: examples/l2fwd_acl/main.c:222:
+ uint8_t *l4 = (uint8_t *)ip + (ip->ihl * 4);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#389: FILE: examples/l2fwd_acl/main.c:224:
+ if (key.proto == IPPROTO_TCP) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#389: FILE: examples/l2fwd_acl/main.c:224:
+ if (key.proto == IPPROTO_TCP) {$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#389: FILE: examples/l2fwd_acl/main.c:224:
+ if (key.proto == IPPROTO_TCP) {
+ struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *)l4;
ERROR:CODE_INDENT: code indent should use tabs where possible
#390: FILE: examples/l2fwd_acl/main.c:225:
+ struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *)l4;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#390: FILE: examples/l2fwd_acl/main.c:225:
+ struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *)l4;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#391: FILE: examples/l2fwd_acl/main.c:226:
+ key.src_port = rte_be_to_cpu_16(tcp->src_port);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#391: FILE: examples/l2fwd_acl/main.c:226:
+ key.src_port = rte_be_to_cpu_16(tcp->src_port);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#392: FILE: examples/l2fwd_acl/main.c:227:
+ key.dst_port = rte_be_to_cpu_16(tcp->dst_port);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#392: FILE: examples/l2fwd_acl/main.c:227:
+ key.dst_port = rte_be_to_cpu_16(tcp->dst_port);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#393: FILE: examples/l2fwd_acl/main.c:228:
+ } else if (key.proto == IPPROTO_UDP) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#393: FILE: examples/l2fwd_acl/main.c:228:
+ } else if (key.proto == IPPROTO_UDP) {$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#393: FILE: examples/l2fwd_acl/main.c:228:
+ } else if (key.proto == IPPROTO_UDP) {
+ struct rte_udp_hdr *udp = (struct rte_udp_hdr *)l4;
ERROR:CODE_INDENT: code indent should use tabs where possible
#394: FILE: examples/l2fwd_acl/main.c:229:
+ struct rte_udp_hdr *udp = (struct rte_udp_hdr *)l4;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#394: FILE: examples/l2fwd_acl/main.c:229:
+ struct rte_udp_hdr *udp = (struct rte_udp_hdr *)l4;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#395: FILE: examples/l2fwd_acl/main.c:230:
+ key.src_port = rte_be_to_cpu_16(udp->src_port);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#395: FILE: examples/l2fwd_acl/main.c:230:
+ key.src_port = rte_be_to_cpu_16(udp->src_port);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#396: FILE: examples/l2fwd_acl/main.c:231:
+ key.dst_port = rte_be_to_cpu_16(udp->dst_port);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#396: FILE: examples/l2fwd_acl/main.c:231:
+ key.dst_port = rte_be_to_cpu_16(udp->dst_port);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#397: FILE: examples/l2fwd_acl/main.c:232:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#397: FILE: examples/l2fwd_acl/main.c:232:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#399: FILE: examples/l2fwd_acl/main.c:234:
+ const uint8_t *data[1] = {(const uint8_t *)&key};$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#399: FILE: examples/l2fwd_acl/main.c:234:
+ const uint8_t *data[1] = {(const uint8_t *)&key};$
ERROR:CODE_INDENT: code indent should use tabs where possible
#400: FILE: examples/l2fwd_acl/main.c:235:
+ uint32_t res[1];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#400: FILE: examples/l2fwd_acl/main.c:235:
+ uint32_t res[1];$
ERROR:CODE_INDENT: code indent should use tabs where possible
#402: FILE: examples/l2fwd_acl/main.c:237:
+ rte_acl_classify(acl_ctx, data, res, 1, 1);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#402: FILE: examples/l2fwd_acl/main.c:237:
+ rte_acl_classify(acl_ctx, data, res, 1, 1);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#404: FILE: examples/l2fwd_acl/main.c:239:
+ if (res[0])$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#404: FILE: examples/l2fwd_acl/main.c:239:
+ if (res[0])$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#404: FILE: examples/l2fwd_acl/main.c:239:
+ if (res[0])
+ rte_eth_tx_burst(port_id, 0, &m, 1);
ERROR:CODE_INDENT: code indent should use tabs where possible
#405: FILE: examples/l2fwd_acl/main.c:240:
+ rte_eth_tx_burst(port_id, 0, &m, 1);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#405: FILE: examples/l2fwd_acl/main.c:240:
+ rte_eth_tx_burst(port_id, 0, &m, 1);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#406: FILE: examples/l2fwd_acl/main.c:241:
+ else$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#406: FILE: examples/l2fwd_acl/main.c:241:
+ else$
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#406: FILE: examples/l2fwd_acl/main.c:241:
+ else
+ rte_pktmbuf_free(m);
ERROR:CODE_INDENT: code indent should use tabs where possible
#407: FILE: examples/l2fwd_acl/main.c:242:
+ rte_pktmbuf_free(m);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#407: FILE: examples/l2fwd_acl/main.c:242:
+ rte_pktmbuf_free(m);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#408: FILE: examples/l2fwd_acl/main.c:243:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#408: FILE: examples/l2fwd_acl/main.c:243:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#409: FILE: examples/l2fwd_acl/main.c:244:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#409: FILE: examples/l2fwd_acl/main.c:244:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#410: FILE: examples/l2fwd_acl/main.c:245:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#412: FILE: examples/l2fwd_acl/main.c:247:
+ return 0;$
total: 79 errors, 155 warnings, 275 lines checked
More information about the test-report
mailing list