Skip to content

Commit b95fbd0

Browse files
rollback example
1 parent d84ce0c commit b95fbd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/xdp_pass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pythonbpf import bpf, map, section, bpfglobal, compile, compile_to_ir
22
from pythonbpf.helper import XDP_PASS
33
from pythonbpf.maps import HashMap
4-
from vmlinux import struct_xdp_md
5-
from ctypes import c_void_p, c_int64
4+
from ctypes import c_int64, c_void_p
5+
66

77
# Instructions to how to run this program
88
# 1. Install PythonBPF: pip install pythonbpf
@@ -20,7 +20,7 @@ def count() -> HashMap:
2020

2121
@bpf
2222
@section("xdp")
23-
def hello_world(ctx: struct_xdp_md) -> c_int64:
23+
def hello_world(ctx: c_void_p) -> c_int64:
2424
key = 0
2525
one = 1
2626
prev = count().lookup(key)

tests/failing_tests/xdp_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pythonbpf import bpf, map, section, bpfglobal, compile, compile_to_ir
22
from pythonbpf.maps import HashMap
33
from vmlinux import struct_xdp_md, XDP_PASS
4-
from ctypes import c_void_p, c_int64
4+
from ctypes import c_int64
55

66
# Instructions to how to run this program
77
# 1. Install PythonBPF: pip install pythonbpf

0 commit comments

Comments
 (0)