[dpdk-test-report] |WARNING| pw70393 [PATCH 3/5] bpf: add support for packet data load instructions

checkpatch at dpdk.org checkpatch at dpdk.org
Mon May 18 17:55:03 CEST 2020


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

_coding style issues_


WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#131: FILE: lib/librte_bpf/bpf_exec.c:81:
+#define BPF_LD_ABS(bpf, reg, ins, type, op) do { \
+	const type *p = bpf_ld_mbuf(bpf, reg, ins, (ins)->imm, sizeof(type)); \
+	if (p == NULL)  \
+		return 0; \
+	reg[EBPF_REG_0] = op(p[0]); \
+} while (0)

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#138: FILE: lib/librte_bpf/bpf_exec.c:88:
+#define BPF_LD_IND(bpf, reg, ins, type, op) do { \
+	uint32_t ofs = reg[ins->src_reg] + (ins)->imm; \
+	const type *p = bpf_ld_mbuf(bpf, reg, ins, ofs, sizeof(type)); \
+	if (p == NULL)  \
+		return 0; \
+	reg[EBPF_REG_0] = op(p[0]); \
+} while (0)

total: 0 errors, 2 warnings, 210 lines checked


More information about the test-report mailing list