Skip to content

Commit

Permalink
Rename SBF to SBPF
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Oct 8, 2024
1 parent 44c6e09 commit 74fba31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ebpf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,9 @@ pub const JSLE_REG: u8 = BPF_JMP | BPF_X | BPF_JSLE;
pub const CALL_IMM: u8 = BPF_JMP | BPF_CALL;
/// BPF opcode: tail call.
pub const CALL_REG: u8 = BPF_JMP | BPF_X | BPF_CALL;
/// BPF opcode: `exit` /// `return r0`. /// Valid only for SBFv1
/// BPF opcode: `exit` /// `return r0`. /// Valid only for SBPFv1
pub const EXIT: u8 = BPF_JMP | BPF_EXIT;
/// BPF opcode: `return` /// `return r0`. /// Valid only for SBFv2
/// BPF opcode: `return` /// `return r0`. /// Valid only for SBPFv2
pub const RETURN: u8 = BPF_JMP | BPF_X | BPF_EXIT;

// Used in JIT
Expand Down
6 changes: 3 additions & 3 deletions tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4125,15 +4125,15 @@ fn test_mod() {

#[test]
fn test_invalid_exit_or_return() {
for sbf_version in [SBPFVersion::V1, SBPFVersion::V2] {
let final_instr = if sbf_version == SBPFVersion::V1 {
for sbpf_version in [SBPFVersion::V1, SBPFVersion::V2] {
let final_instr = if sbpf_version == SBPFVersion::V1 {
"return"
} else {
"exit"
};

let config = Config {
enabled_sbpf_versions: sbf_version..=sbf_version,
enabled_sbpf_versions: sbpf_version..=sbpf_version,
enable_instruction_tracing: true,
..Config::default()
};
Expand Down

0 comments on commit 74fba31

Please sign in to comment.