|WARNING| pw161781 [PATCH v2] examples/l2fwd_acl: add ACL-based L2 forwarding example

checkpatch at dpdk.org checkpatch at dpdk.org
Mon Feb 23 08:58:20 CET 2026


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

_coding style issues_

Must be a reply to the first patch (--in-reply-to).


WARNING:BAD_SIGN_OFF: Duplicate signature
#142: 
Signed-off-by: Harsh Raj Singh <harshraj215 at gmail.com>

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#214: FILE: examples/l2fwd_acl/main.c:32:
+    uint8_t  proto;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#215: FILE: examples/l2fwd_acl/main.c:33:
+    uint32_t src_ip;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#216: FILE: examples/l2fwd_acl/main.c:34:
+    uint32_t dst_ip;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#217: FILE: examples/l2fwd_acl/main.c:35:
+    uint16_t src_port;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#218: FILE: examples/l2fwd_acl/main.c:36:
+    uint16_t dst_port;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#222: FILE: examples/l2fwd_acl/main.c:40:
+    PROTO_FIELD,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#223: FILE: examples/l2fwd_acl/main.c:41:
+    SRC_FIELD,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#224: FILE: examples/l2fwd_acl/main.c:42:
+    DST_FIELD,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#225: FILE: examples/l2fwd_acl/main.c:43:
+    SPORT_FIELD,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#226: FILE: examples/l2fwd_acl/main.c:44:
+    DPORT_FIELD$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#233: FILE: examples/l2fwd_acl/main.c:51:
+    { RTE_ACL_FIELD_TYPE_BITMASK, sizeof(uint8_t),  PROTO_FIELD, 0,$

ERROR:CORRUPTED_PATCH: patch seems to be corrupt (line wrapped?)
#234: FILE: examples/l2fwd_acl/main.c:51:
offsetof(struct pkt_key, proto) },

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#235: FILE: examples/l2fwd_acl/main.c:52:
+    { RTE_ACL_FIELD_TYPE_MASK,    sizeof(uint32_t), SRC_FIELD,   1,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#237: FILE: examples/l2fwd_acl/main.c:53:
+    { RTE_ACL_FIELD_TYPE_MASK,    sizeof(uint32_t), DST_FIELD,   2,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#239: FILE: examples/l2fwd_acl/main.c:54:
+    { RTE_ACL_FIELD_TYPE_RANGE,   sizeof(uint16_t), SPORT_FIELD, 3,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#241: FILE: examples/l2fwd_acl/main.c:55:
+    { RTE_ACL_FIELD_TYPE_RANGE,   sizeof(uint16_t), DPORT_FIELD, 3,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#248: FILE: examples/l2fwd_acl/main.c:61:
+    if (sig == SIGINT || sig == SIGTERM)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#249: FILE: examples/l2fwd_acl/main.c:62:
+        force_quit = true;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#249: FILE: examples/l2fwd_acl/main.c:62:
+        force_quit = true;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#255: FILE: examples/l2fwd_acl/main.c:68:
+    int opt;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#256: FILE: examples/l2fwd_acl/main.c:69:
+    while ((opt = getopt(argc, argv, "p:")) != -1) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#257: FILE: examples/l2fwd_acl/main.c:70:
+        switch (opt) {$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#257: FILE: examples/l2fwd_acl/main.c:70:
+        switch (opt) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#258: FILE: examples/l2fwd_acl/main.c:71:
+        case 'p':$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#258: FILE: examples/l2fwd_acl/main.c:71:
+        case 'p':$

ERROR:CODE_INDENT: code indent should use tabs where possible
#259: FILE: examples/l2fwd_acl/main.c:72:
+            portmask = strtoul(optarg, NULL, 16);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#259: FILE: examples/l2fwd_acl/main.c:72:
+            portmask = strtoul(optarg, NULL, 16);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#260: FILE: examples/l2fwd_acl/main.c:73:
+            break;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#260: FILE: examples/l2fwd_acl/main.c:73:
+            break;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#261: FILE: examples/l2fwd_acl/main.c:74:
+        default:$

ERROR:CODE_INDENT: code indent should use tabs where possible
#262: FILE: examples/l2fwd_acl/main.c:75:
+            return -1;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#262: FILE: examples/l2fwd_acl/main.c:75:
+            return -1;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#263: FILE: examples/l2fwd_acl/main.c:76:
+        }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#263: FILE: examples/l2fwd_acl/main.c:76:
+        }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#264: FILE: examples/l2fwd_acl/main.c:77:
+    }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#265: FILE: examples/l2fwd_acl/main.c:78:
+    return 0;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#273: FILE: examples/l2fwd_acl/main.c:86:
+    struct rte_acl_param prm = {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#274: FILE: examples/l2fwd_acl/main.c:87:
+        .name = "acl_ctx",$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#274: FILE: examples/l2fwd_acl/main.c:87:
+        .name = "acl_ctx",$

ERROR:CODE_INDENT: code indent should use tabs where possible
#275: FILE: examples/l2fwd_acl/main.c:88:
+        .socket_id = rte_socket_id(),$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#275: FILE: examples/l2fwd_acl/main.c:88:
+        .socket_id = rte_socket_id(),$

ERROR:CODE_INDENT: code indent should use tabs where possible
#276: 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
#276: 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
#277: FILE: examples/l2fwd_acl/main.c:90:
+        .max_rule_num = MAX_RULES$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#277: FILE: examples/l2fwd_acl/main.c:90:
+        .max_rule_num = MAX_RULES$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#278: FILE: examples/l2fwd_acl/main.c:91:
+    };$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#280: 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
#281: FILE: examples/l2fwd_acl/main.c:94:
+    if (!ctx)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#282: 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
#282: 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
#284: FILE: examples/l2fwd_acl/main.c:97:
+    struct acl_rule rule;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#285: FILE: examples/l2fwd_acl/main.c:98:
+    memset(&rule, 0, sizeof(rule));$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#287: FILE: examples/l2fwd_acl/main.c:100:
+    rule.data.priority = 10;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#288: FILE: examples/l2fwd_acl/main.c:101:
+    rule.data.category_mask = 1;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#289: FILE: examples/l2fwd_acl/main.c:102:
+    rule.data.userdata = 1;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#291: 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
#292: 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
#294: FILE: examples/l2fwd_acl/main.c:107:
+    rule.field[SRC_FIELD].value.u32 =$

ERROR:CODE_INDENT: code indent should use tabs where possible
#295: 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
#295: 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)
#295: 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)
#295: 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)
#295: 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
#296: 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
#298: 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
#299: 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
#301: 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
#302: 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
#304: 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
#305: 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
#307: 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
#308: 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
#308: 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
#310: FILE: examples/l2fwd_acl/main.c:123:
+    struct rte_acl_config cfg;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#311: FILE: examples/l2fwd_acl/main.c:124:
+    memset(&cfg, 0, sizeof(cfg));$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#312: FILE: examples/l2fwd_acl/main.c:125:
+    cfg.num_categories = 1;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#313: FILE: examples/l2fwd_acl/main.c:126:
+    cfg.num_fields = NUM_FIELDS;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#314: 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
#316: FILE: examples/l2fwd_acl/main.c:129:
+    if (rte_acl_build(ctx, &cfg) != 0)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#317: 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
#317: 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
#319: 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
#320: FILE: examples/l2fwd_acl/main.c:133:
+    return ctx;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#327: FILE: examples/l2fwd_acl/main.c:140:
+    force_quit = false;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#328: FILE: examples/l2fwd_acl/main.c:141:
+    signal(SIGINT, signal_handler);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#329: FILE: examples/l2fwd_acl/main.c:142:
+    signal(SIGTERM, signal_handler);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#331: 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
#332: FILE: examples/l2fwd_acl/main.c:145:
+    if (ret < 0)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#333: 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
#333: 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
#335: FILE: examples/l2fwd_acl/main.c:148:
+    argc -= ret;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#336: FILE: examples/l2fwd_acl/main.c:149:
+    argv += ret;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#338: FILE: examples/l2fwd_acl/main.c:151:
+    if (parse_args(argc, argv) < 0)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#339: 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
#339: 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
#341: 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
#343: 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
#344: 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
#344: FILE: examples/l2fwd_acl/main.c:157:
+        "mbuf_pool", NB_MBUF, 256, 0,$

ERROR:CODE_INDENT: code indent should use tabs where possible
#345: 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
#345: 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
#347: FILE: examples/l2fwd_acl/main.c:160:
+    if (!mp)$

ERROR:CODE_INDENT: code indent should use tabs where possible
#348: 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
#348: 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
#350: FILE: examples/l2fwd_acl/main.c:163:
+    uint16_t port_id;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#351: FILE: examples/l2fwd_acl/main.c:164:
+    RTE_ETH_FOREACH_DEV(port_id) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#353: FILE: examples/l2fwd_acl/main.c:166:
+        if (!(portmask & (1 << port_id)))$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#353: FILE: examples/l2fwd_acl/main.c:166:
+        if (!(portmask & (1 << port_id)))$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 12)
#353: FILE: examples/l2fwd_acl/main.c:166:
+        if (!(portmask & (1 << port_id)))
+            continue;

ERROR:CODE_INDENT: code indent should use tabs where possible
#354: FILE: examples/l2fwd_acl/main.c:167:
+            continue;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#354: FILE: examples/l2fwd_acl/main.c:167:
+            continue;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#356: 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
#356: FILE: examples/l2fwd_acl/main.c:169:
+        struct rte_eth_conf conf = {0};$

ERROR:CODE_INDENT: code indent should use tabs where possible
#358: 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
#358: 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)
#358: 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
#359: 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
#359: FILE: examples/l2fwd_acl/main.c:172:
+            rte_exit(EXIT_FAILURE, "port configure failed
");$

ERROR:CODE_INDENT: code indent should use tabs where possible
#361: 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
#361: 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)
#361: 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
#362: 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
#362: 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
#363: 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
#363: FILE: examples/l2fwd_acl/main.c:176:
+            rte_exit(EXIT_FAILURE, "rx setup failed
");$

ERROR:CODE_INDENT: code indent should use tabs where possible
#365: 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
#365: 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)
#365: 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
#366: 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
#366: 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
#367: 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
#367: FILE: examples/l2fwd_acl/main.c:180:
+            rte_exit(EXIT_FAILURE, "tx setup failed
");$

ERROR:CODE_INDENT: code indent should use tabs where possible
#369: 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
#369: 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)
#369: 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
#370: 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
#370: FILE: examples/l2fwd_acl/main.c:183:
+            rte_exit(EXIT_FAILURE, "port start failed
");$

ERROR:CODE_INDENT: code indent should use tabs where possible
#372: 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
#372: FILE: examples/l2fwd_acl/main.c:185:
+        rte_eth_promiscuous_enable(port_id);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#374: 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
#374: 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
#375: FILE: examples/l2fwd_acl/main.c:188:
+    }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#377: FILE: examples/l2fwd_acl/main.c:190:
+    struct rte_mbuf *bufs[BURST];$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#379: FILE: examples/l2fwd_acl/main.c:192:
+    while (!force_quit) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#381: 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
#381: FILE: examples/l2fwd_acl/main.c:194:
+        RTE_ETH_FOREACH_DEV(port_id) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#383: FILE: examples/l2fwd_acl/main.c:196:
+            if (!(portmask & (1 << port_id)))$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#383: FILE: examples/l2fwd_acl/main.c:196:
+            if (!(portmask & (1 << port_id)))$

ERROR:CODE_INDENT: code indent should use tabs where possible
#384: FILE: examples/l2fwd_acl/main.c:197:
+                continue;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#384: FILE: examples/l2fwd_acl/main.c:197:
+                continue;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#386: 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
#386: 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
#387: FILE: examples/l2fwd_acl/main.c:200:
+            if (!nb) continue;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#387: FILE: examples/l2fwd_acl/main.c:200:
+            if (!nb) continue;$

ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#387: FILE: examples/l2fwd_acl/main.c:200:
+            if (!nb) continue;

ERROR:CODE_INDENT: code indent should use tabs where possible
#389: 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
#389: FILE: examples/l2fwd_acl/main.c:202:
+            for (int i = 0; i < nb; i++) {$

ERROR:CODE_INDENT: code indent should use tabs where possible
#391: 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
#391: FILE: examples/l2fwd_acl/main.c:204:
+                struct rte_mbuf *m = bufs[i];$

ERROR:CODE_INDENT: code indent should use tabs where possible
#392: FILE: examples/l2fwd_acl/main.c:205:
+                struct rte_ether_hdr *eth =$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#392: FILE: examples/l2fwd_acl/main.c:205:
+                struct rte_ether_hdr *eth =$

ERROR:CODE_INDENT: code indent should use tabs where possible
#393: 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
#393: 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
#395: FILE: examples/l2fwd_acl/main.c:208:
+                if (eth->ether_type !=$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#395: FILE: examples/l2fwd_acl/main.c:208:
+                if (eth->ether_type !=$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#395: 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
#396: 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
#396: 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
#397: FILE: examples/l2fwd_acl/main.c:210:
+                    rte_pktmbuf_free(m);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#397: FILE: examples/l2fwd_acl/main.c:210:
+                    rte_pktmbuf_free(m);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#398: FILE: examples/l2fwd_acl/main.c:211:
+                    continue;$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#398: FILE: examples/l2fwd_acl/main.c:211:
+                    continue;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#399: FILE: examples/l2fwd_acl/main.c:212:
+                }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#399: FILE: examples/l2fwd_acl/main.c:212:
+                }$

ERROR:CODE_INDENT: code indent should use tabs where possible
#401: FILE: examples/l2fwd_acl/main.c:214:
+                struct rte_ipv4_hdr *ip =$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#401: FILE: examples/l2fwd_acl/main.c:214:
+                struct rte_ipv4_hdr *ip =$

ERROR:CODE_INDENT: code indent should use tabs where possible
#402: 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
#402: FILE: examples/l2fwd_acl/main.c:215:
+                    (struct rte_ipv4_hdr *)(eth + 1);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#404: FILE: examples/l2fwd_acl/main.c:217:
+                struct pkt_key key = {0};$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#404: FILE: examples/l2fwd_acl/main.c:217:
+                struct pkt_key key = {0};$

ERROR:CODE_INDENT: code indent should use tabs where possible
#405: 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
#405: FILE: examples/l2fwd_acl/main.c:218:
+                key.proto  = ip->next_proto_id;$

ERROR:CODE_INDENT: code indent should use tabs where possible
#406: 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
#406: 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
#407: 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
#407: 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
#409: 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
#409: 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
#411: FILE: examples/l2fwd_acl/main.c:224:
+                if (key.proto == IPPROTO_TCP) {$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#411: FILE: examples/l2fwd_acl/main.c:224:
+                if (key.proto == IPPROTO_TCP) {$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#411: 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
#412: 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
#412: 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
#413: 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
#413: 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
#414: 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
#414: 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
#415: 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
#415: 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)
#415: 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
#416: 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
#416: 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
#417: 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
#417: 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
#418: 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
#418: 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
#419: FILE: examples/l2fwd_acl/main.c:232:
+                }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#419: FILE: examples/l2fwd_acl/main.c:232:
+                }$

ERROR:CODE_INDENT: code indent should use tabs where possible
#421: 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
#421: 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
#422: FILE: examples/l2fwd_acl/main.c:235:
+                uint32_t res[1];$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#422: FILE: examples/l2fwd_acl/main.c:235:
+                uint32_t res[1];$

ERROR:CODE_INDENT: code indent should use tabs where possible
#424: 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
#424: 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
#426: FILE: examples/l2fwd_acl/main.c:239:
+                if (res[0])$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#426: FILE: examples/l2fwd_acl/main.c:239:
+                if (res[0])$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#426: 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
#427: 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
#427: 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
#428: FILE: examples/l2fwd_acl/main.c:241:
+                else$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#428: FILE: examples/l2fwd_acl/main.c:241:
+                else$

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (16, 20)
#428: FILE: examples/l2fwd_acl/main.c:241:
+                else
+                    rte_pktmbuf_free(m);

ERROR:CODE_INDENT: code indent should use tabs where possible
#429: FILE: examples/l2fwd_acl/main.c:242:
+                    rte_pktmbuf_free(m);$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#429: FILE: examples/l2fwd_acl/main.c:242:
+                    rte_pktmbuf_free(m);$

ERROR:CODE_INDENT: code indent should use tabs where possible
#430: FILE: examples/l2fwd_acl/main.c:243:
+            }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#430: FILE: examples/l2fwd_acl/main.c:243:
+            }$

ERROR:CODE_INDENT: code indent should use tabs where possible
#431: FILE: examples/l2fwd_acl/main.c:244:
+        }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#431: FILE: examples/l2fwd_acl/main.c:244:
+        }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#432: FILE: examples/l2fwd_acl/main.c:245:
+    }$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#434: FILE: examples/l2fwd_acl/main.c:247:
+    return 0;$

total: 80 errors, 151 warnings, 280 lines checked


More information about the test-report mailing list