BPF program is too large. Processed 1000001 insn
I had wrote a ebpf prog, which include a simple while loop, but when i run it, it reports bpf verify log as title described. But I could not find what the reason of occurring large loop, end up to exceed the max ebpf insns.
while (i < MAX_BUF_LEN )
{
if (*fmt == '\0')
break;
if (*fmt == 'h') {
fmt++;
i++;
continue;
}
i++;
*msg++ = *fmt++;
}
which fmt and msg is type of char *, MAX_BUF_LEN is constant number.
clang version 12.0.1
kernel version:5.10
libbpf version: 1.4.1