Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started Thrift IDL for runtime configuration
- Loading branch information
1 parent
3c41ad2
commit b21f309
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
runtime: | ||
thrift -r --gen cpp runtime.thrift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
namespace cpp bm_runtime | ||
|
||
typedef i32 EntryHandle | ||
typedef list<binary> ActionData | ||
|
||
exception InvalidTableOperation { | ||
1: i32 what | ||
} | ||
|
||
service Runtime { | ||
EntryHandle bm_table_add_exact_match_entry( | ||
1:string table_name, | ||
2:string action_name, | ||
3:binary key, | ||
4:ActionData action_data | ||
) throws (1:InvalidTableOperation ouch), | ||
|
||
EntryHandle bm_table_add_lpm_entry( | ||
1:string table_name, | ||
2:string action_name, | ||
3:binary key, | ||
4:i32 prefix_length, | ||
5:ActionData action_data | ||
) throws (1:InvalidTableOperation ouch), | ||
|
||
EntryHandle bm_table_add_ternary_match_entry( | ||
1:string table_name, | ||
2:string action_name, | ||
3:binary key, | ||
4:binary mask, | ||
5:i32 priority, | ||
6:ActionData action_data | ||
) throws (1:InvalidTableOperation ouch), | ||
|
||
void bm_set_default_action( | ||
1:string table_name, | ||
2:string action_name, | ||
3:ActionData action_data | ||
) throws (1:InvalidTableOperation ouch) | ||
|
||
void bm_table_delete_entry( | ||
1:string table_name, | ||
2:EntryHandle entry_handle | ||
) throws (1:InvalidTableOperation ouch) | ||
} |