Browse Source

Add missing inline macro to xdp methods

tirex 2 years ago
parent
commit
caa66cabac
1 changed files with 2 additions and 0 deletions
  1. 2 0
      bpf/aya-bpf/src/programs/xdp.rs

+ 2 - 0
bpf/aya-bpf/src/programs/xdp.rs

@@ -11,10 +11,12 @@ impl XdpContext {
         XdpContext { ctx }
     }
 
+    #[inline]
     pub fn data(&self) -> usize {
         unsafe { (*self.ctx).data as usize }
     }
 
+    #[inline]
     pub fn data_end(&self) -> usize {
         unsafe { (*self.ctx).data_end as usize }
     }