forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix action parameter declaration in p4tc_filter_fields in tc_may_override cases In cases where the tc_may_override annotation is associate with an action that has a parameter with a tc_type annotation, the compiler is emitting the parameters declaration in p4tc_filter_fields incorrectly. For example in tc_may_override_example_04: struct p4tc_filter_fields { __u32 pipeid; __u32 handle; __u32 classid; __u32 chain; __u32 blockid; __be16 proto; __u16 prio; ipv4 ipv4_tbl_1_next_hop_ipv4addr; }; "ipv4" is not a valid C type, so this won't compile Also, in the case of bit types that are not equivalent to a standard C type (u8, u16, u32, u64), the compiler is emitting the type incorrectly. Let's say, in the previous example, that the type for ipv4addr was bit<33>, the compiler would've emitted the following: struct p4tc_filter_fields { __u32 pipeid; __u32 handle; __u32 classid; __u32 chain; __u32 blockid; __be16 proto; __u16 prio; __u33 ipv4_tbl_1_next_hop_ipv4addr; }; This commit fixes this by converting tc_type annotated action parameters to their corresponding C type and converts any non C standard bit type into a u8 array rounded up to the nearest byte Signed-off-by: Victor Nogueira <[email protected]> * Use profile_id instead of aging_ms In struct p4tc_table_entry_create_bpf_params__local we've adopted profile_id instead of aging_ms. This commits updates the field name in the generated output Signed-off-by: Victor Nogueira <[email protected]> * Update pna.h Add missing kfuncs and remove some deprecated ones Signed-off-by: Victor Nogueira <[email protected]> --------- Signed-off-by: Victor Nogueira <[email protected]>
- Loading branch information
1 parent
6f7353f
commit dbe0f7e
Showing
7 changed files
with
58 additions
and
39 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
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
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
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
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
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
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