Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
0cae0dd3
Commit
0cae0dd3
authored
Sep 14, 2018
by
Nguyen Phuong An
Committed by
yonghong-song
Sep 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix syntax error in xdp_redirect_cpu.py (#1969)
Fix syntax error in xdp_redirect_cpu.py
parent
17f797d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/networking/xdp/xdp_redirect_cpu.py
examples/networking/xdp/xdp_redirect_cpu.py
+3
-3
No files found.
examples/networking/xdp/xdp_redirect_cpu.py
View file @
0cae0dd3
...
...
@@ -68,10 +68,10 @@ int xdp_dummy(struct xdp_md *ctx) {
}
"""
,
cflags
=
[
"-w"
,
"-D__MAX_CPU__=%u"
%
max_cpu
],
debug
=
0
)
dest
=
b
.
get_table
(
"dest"
)
;
dest
=
b
.
get_table
(
"dest"
)
dest
[
0
]
=
ct
.
c_uint32
(
cpu_id
)
cpumap
=
b
.
get_table
(
"cpumap"
)
;
cpumap
=
b
.
get_table
(
"cpumap"
)
cpumap
[
cpu_id
]
=
ct
.
c_uint32
(
192
)
in_fn
=
b
.
load_func
(
"xdp_redirect_cpu"
,
BPF
.
XDP
)
...
...
@@ -90,6 +90,6 @@ while 1:
time
.
sleep
(
1
)
except
KeyboardInterrupt
:
print
(
"Removing filter from device"
)
break
;
break
b
.
remove_xdp
(
in_if
,
flags
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment