Skip to content

Commit 435a9ee

Browse files
committed
src/ebpf.rs: Increase instruction limit to 1 million
The linux kernel allows programs of 1 million instructions, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c04c0d2b968ac45d6ef020316808ef6c82325a82 I'm hitting the 4096 limit in some corner cases with https://github.com/seanyoung/cir, if the infrared protocol is very complex (e.g. XMP). rbpf is used for testing the generated IR decoders in the test framework. Signed-off-by: Sean Young <[email protected]>
1 parent 3e80ed7 commit 435a9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ebpf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use byteorder::{ByteOrder, LittleEndian};
1818

1919
/// Maximum number of instructions in an eBPF program.
20-
pub const PROG_MAX_INSNS: usize = 4096;
20+
pub const PROG_MAX_INSNS: usize = 1000000;
2121
/// Size of an eBPF instructions, in bytes.
2222
pub const INSN_SIZE: usize = 8;
2323
/// Maximum size of an eBPF program, in bytes.

0 commit comments

Comments
 (0)