Commit ab81ef22 authored by Brenden Blanco's avatar Brenden Blanco

Rename BPF_EXPORT to BPF_TABLE_PUBLIC

Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent 89978baf
......@@ -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
......
......@@ -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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment