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
ab81ef22
Commit
ab81ef22
authored
Jan 08, 2016
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename BPF_EXPORT to BPF_TABLE_PUBLIC
Signed-off-by:
Brenden Blanco
<
bblanco@plumgrid.com
>
parent
89978baf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/cc/export/helpers.h
src/cc/export/helpers.h
+3
-1
tests/cc/test_clang.py
tests/cc/test_clang.py
+4
-0
No files found.
src/cc/export/helpers.h
View file @
ab81ef22
...
...
@@ -46,7 +46,9 @@ struct _name##_table_t { \
__attribute__((section("maps/" _table_type))) \
struct _name##_table_t _name
#define BPF_TABLE_EXPORT(_name) \
// define a table same as above but allow it to be referenced by other modules
#define BPF_TABLE_PUBLIC(_table_type, _key_type, _leaf_type, _name, _max_entries) \
BPF_TABLE(_table_type, _key_type, _leaf_type, _name, _max_entries); \
__attribute__((section("maps/export"))) \
struct _name##_table_t __##_name
...
...
tests/cc/test_clang.py
View file @
ab81ef22
...
...
@@ -295,5 +295,9 @@ BPF_TABLE("array", int, union emptyu, t3, 1);
"""
b
=
BPF
(
text
=
text
,
cflags
=
[
"-DMYFLAG"
])
def
test_exported_maps
(
self
):
b1
=
BPF
(
text
=
"""BPF_TABLE_PUBLIC("hash", int, int, table1, 10);"""
)
b2
=
BPF
(
text
=
"""BPF_TABLE("extern", int, int, table1, 10);"""
)
if
__name__
==
"__main__"
:
main
()
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