Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjoDeundiak committed Dec 4, 2024
1 parent ee40cfe commit 92d0163
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ockam_ebpf_impl/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ pub type Proto = u8;

pub type Port = u16;

// TODO: May want to switch to `HashMap::pinned` for efficiency (to share eBPFs)

/// Ports that we run inlets on
#[map]
static PORT_MAP: HashMap<Port, Proto> = HashMap::with_max_entries(1024, 0);
static PORT_MAP: HashMap<Port, Proto> = HashMap::pinned(1024, 0);

// TODO: Check
// BPF_F_NO_PREALLOC
// BPF_NOEXIST
// BPF_F_LOCK
// BPF_F_RDONLY

#[derive(PartialEq)]
pub enum Direction {
Expand Down

0 comments on commit 92d0163

Please sign in to comment.