Skip to content

Commit

Permalink
src/ebpf.rs: Increase instruction limit to 1 million
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
seanyoung committed May 1, 2024
1 parent 3e80ed7 commit 435a9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ebpf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use byteorder::{ByteOrder, LittleEndian};

/// Maximum number of instructions in an eBPF program.
pub const PROG_MAX_INSNS: usize = 4096;
pub const PROG_MAX_INSNS: usize = 1000000;
/// Size of an eBPF instructions, in bytes.
pub const INSN_SIZE: usize = 8;
/// Maximum size of an eBPF program, in bytes.
Expand Down

0 comments on commit 435a9ee

Please sign in to comment.