diff --git a/backends/tc/ebpfCodeGen.cpp b/backends/tc/ebpfCodeGen.cpp index 1a62b310a7..6b387ca42f 100644 --- a/backends/tc/ebpfCodeGen.cpp +++ b/backends/tc/ebpfCodeGen.cpp @@ -21,7 +21,6 @@ namespace TC { // =====================PNAEbpfGenerator============================= void PNAEbpfGenerator::emitPNAIncludes(EBPF::CodeBuilder *builder) const { builder->appendLine("#include "); - builder->appendLine("#include "); builder->appendLine("#include "); builder->appendLine("#include \"pna.h\""); } diff --git a/backends/tc/tc.def b/backends/tc/tc.def index b0d4896043..ab0752fbb3 100644 --- a/backends/tc/tc.def +++ b/backends/tc/tc.def @@ -484,7 +484,7 @@ class TCExtern { toString { std::string tcExtern = ""; tcExtern += "\n$TC p4template create extern/"; - tcExtern += pipelineName + "/root/" + externName; + tcExtern += "root/" + externName; tcExtern += " extid " + Util::toString(externID); tcExtern += " numinstances " + Util::toString(numinstances); tcExtern += " tc_acl " + acl_permisson; diff --git a/testdata/p4tc_samples_outputs/add_entry_1_example_parser.h b/testdata/p4tc_samples_outputs/add_entry_1_example_parser.h index 2f6752fc60..cacbbf2257 100644 --- a/testdata/p4tc_samples_outputs/add_entry_1_example_parser.h +++ b/testdata/p4tc_samples_outputs/add_entry_1_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/add_entry_3_example_parser.h b/testdata/p4tc_samples_outputs/add_entry_3_example_parser.h index 2f6752fc60..cacbbf2257 100644 --- a/testdata/p4tc_samples_outputs/add_entry_3_example_parser.h +++ b/testdata/p4tc_samples_outputs/add_entry_3_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/add_entry_example_parser.h b/testdata/p4tc_samples_outputs/add_entry_example_parser.h index a53c099518..ba1ef59dc7 100644 --- a/testdata/p4tc_samples_outputs/add_entry_example_parser.h +++ b/testdata/p4tc_samples_outputs/add_entry_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/calculator_parser.h b/testdata/p4tc_samples_outputs/calculator_parser.h index b736aa9a73..37448997b3 100644 --- a/testdata/p4tc_samples_outputs/calculator_parser.h +++ b/testdata/p4tc_samples_outputs/calculator_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/checksum_parser.h b/testdata/p4tc_samples_outputs/checksum_parser.h index 2432c8d30c..13520a65be 100644 --- a/testdata/p4tc_samples_outputs/checksum_parser.h +++ b/testdata/p4tc_samples_outputs/checksum_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/const_entries_range_mask_parser.h b/testdata/p4tc_samples_outputs/const_entries_range_mask_parser.h index a99463d6be..6cd09d7d7e 100644 --- a/testdata/p4tc_samples_outputs/const_entries_range_mask_parser.h +++ b/testdata/p4tc_samples_outputs/const_entries_range_mask_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/default_action_example_01_parser.h b/testdata/p4tc_samples_outputs/default_action_example_01_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/default_action_example_01_parser.h +++ b/testdata/p4tc_samples_outputs/default_action_example_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/default_action_example_parser.h b/testdata/p4tc_samples_outputs/default_action_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/default_action_example_parser.h +++ b/testdata/p4tc_samples_outputs/default_action_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/default_action_with_param_01_parser.h b/testdata/p4tc_samples_outputs/default_action_with_param_01_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/default_action_with_param_01_parser.h +++ b/testdata/p4tc_samples_outputs/default_action_with_param_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/default_action_with_param_parser.h b/testdata/p4tc_samples_outputs/default_action_with_param_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/default_action_with_param_parser.h +++ b/testdata/p4tc_samples_outputs/default_action_with_param_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/default_hit_const_example_parser.h b/testdata/p4tc_samples_outputs/default_hit_const_example_parser.h index 6219fcd2b9..7f7c95824d 100644 --- a/testdata/p4tc_samples_outputs/default_hit_const_example_parser.h +++ b/testdata/p4tc_samples_outputs/default_hit_const_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/drop_packet_example_parser.h b/testdata/p4tc_samples_outputs/drop_packet_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/drop_packet_example_parser.h +++ b/testdata/p4tc_samples_outputs/drop_packet_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/global_action_example_01_parser.h b/testdata/p4tc_samples_outputs/global_action_example_01_parser.h index 64410d6b32..a67ccde435 100644 --- a/testdata/p4tc_samples_outputs/global_action_example_01_parser.h +++ b/testdata/p4tc_samples_outputs/global_action_example_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/global_action_example_02_parser.h b/testdata/p4tc_samples_outputs/global_action_example_02_parser.h index 64410d6b32..a67ccde435 100644 --- a/testdata/p4tc_samples_outputs/global_action_example_02_parser.h +++ b/testdata/p4tc_samples_outputs/global_action_example_02_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/hash1_parser.h b/testdata/p4tc_samples_outputs/hash1_parser.h index 084595a115..ccbef335c7 100644 --- a/testdata/p4tc_samples_outputs/hash1_parser.h +++ b/testdata/p4tc_samples_outputs/hash1_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/ipip_parser.h b/testdata/p4tc_samples_outputs/ipip_parser.h index 2c587737d1..bbf38468db 100644 --- a/testdata/p4tc_samples_outputs/ipip_parser.h +++ b/testdata/p4tc_samples_outputs/ipip_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/matchtype_parser.h b/testdata/p4tc_samples_outputs/matchtype_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/matchtype_parser.h +++ b/testdata/p4tc_samples_outputs/matchtype_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/mix_matchtype_example_parser.h b/testdata/p4tc_samples_outputs/mix_matchtype_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/mix_matchtype_example_parser.h +++ b/testdata/p4tc_samples_outputs/mix_matchtype_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/multiple_tables_example_01_parser.h b/testdata/p4tc_samples_outputs/multiple_tables_example_01_parser.h index fddc9b9fe5..347a85d386 100644 --- a/testdata/p4tc_samples_outputs/multiple_tables_example_01_parser.h +++ b/testdata/p4tc_samples_outputs/multiple_tables_example_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/multiple_tables_example_02_parser.h b/testdata/p4tc_samples_outputs/multiple_tables_example_02_parser.h index fddc9b9fe5..347a85d386 100644 --- a/testdata/p4tc_samples_outputs/multiple_tables_example_02_parser.h +++ b/testdata/p4tc_samples_outputs/multiple_tables_example_02_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/name_annotation_example_parser.h b/testdata/p4tc_samples_outputs/name_annotation_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/name_annotation_example_parser.h +++ b/testdata/p4tc_samples_outputs/name_annotation_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/no_table_example_parser.h b/testdata/p4tc_samples_outputs/no_table_example_parser.h index ddc7ef3f84..3ce34d6484 100644 --- a/testdata/p4tc_samples_outputs/no_table_example_parser.h +++ b/testdata/p4tc_samples_outputs/no_table_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/noaction_example_01_parser.h b/testdata/p4tc_samples_outputs/noaction_example_01_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/noaction_example_01_parser.h +++ b/testdata/p4tc_samples_outputs/noaction_example_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/noaction_example_02_parser.h b/testdata/p4tc_samples_outputs/noaction_example_02_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/noaction_example_02_parser.h +++ b/testdata/p4tc_samples_outputs/noaction_example_02_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/nummask_annotation_example_parser.h b/testdata/p4tc_samples_outputs/nummask_annotation_example_parser.h index 6219fcd2b9..7f7c95824d 100644 --- a/testdata/p4tc_samples_outputs/nummask_annotation_example_parser.h +++ b/testdata/p4tc_samples_outputs/nummask_annotation_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/send_to_port_example.template b/testdata/p4tc_samples_outputs/send_to_port_example.template index 42ab1f6a08..f9465227d5 100755 --- a/testdata/p4tc_samples_outputs/send_to_port_example.template +++ b/testdata/p4tc_samples_outputs/send_to_port_example.template @@ -20,7 +20,7 @@ $TC p4template create table/send_to_port_example/MainControlImpl/ipv4_tbl \ act name send_to_port_example/MainControlImpl/default_route_drop $TC p4template update table/send_to_port_example/MainControlImpl/ipv4_tbl default_miss_action permissions 0x1024 action send_to_port_example/MainControlImpl/default_route_drop -$TC p4template create extern/send_to_port_example/root/Register extid 1 numinstances 1 tc_acl 0x19b6 +$TC p4template create extern/root/Register extid 1 numinstances 1 tc_acl 0x19b6 $TC p4template create extern_inst/send_to_port_example/Register/MainControlImpl.reg1 instid 1 \ control_path tc_key index type bit32 id 1 param a_value type bit32 id 2 \ diff --git a/testdata/p4tc_samples_outputs/send_to_port_example_parser.h b/testdata/p4tc_samples_outputs/send_to_port_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/send_to_port_example_parser.h +++ b/testdata/p4tc_samples_outputs/send_to_port_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/set_entry_timer_example_parser.h b/testdata/p4tc_samples_outputs/set_entry_timer_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/set_entry_timer_example_parser.h +++ b/testdata/p4tc_samples_outputs/set_entry_timer_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/simple_exact_example_parser.h b/testdata/p4tc_samples_outputs/simple_exact_example_parser.h index 64410d6b32..a67ccde435 100644 --- a/testdata/p4tc_samples_outputs/simple_exact_example_parser.h +++ b/testdata/p4tc_samples_outputs/simple_exact_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/simple_extern_example.template b/testdata/p4tc_samples_outputs/simple_extern_example.template index 9e8d344220..2d15ecbc69 100755 --- a/testdata/p4tc_samples_outputs/simple_extern_example.template +++ b/testdata/p4tc_samples_outputs/simple_extern_example.template @@ -27,7 +27,7 @@ $TC p4template create table/simple_extern_example/ingress/nh_table \ act name simple_extern_example/ingress/drop $TC p4template update table/simple_extern_example/ingress/nh_table default_miss_action permissions 0x1024 action simple_extern_example/ingress/drop -$TC p4template create extern/simple_extern_example/root/Register extid 1 numinstances 2 tc_acl 0x19b6 +$TC p4template create extern/root/Register extid 1 numinstances 2 tc_acl 0x19b6 $TC p4template create extern_inst/simple_extern_example/Register/ingress.reg1 instid 1 \ control_path tc_key index type bit32 id 1 param a_value type bit32 id 2 \ diff --git a/testdata/p4tc_samples_outputs/simple_extern_example_parser.h b/testdata/p4tc_samples_outputs/simple_extern_example_parser.h index acf44ac7ee..7843238b34 100644 --- a/testdata/p4tc_samples_outputs/simple_extern_example_parser.h +++ b/testdata/p4tc_samples_outputs/simple_extern_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/simple_lpm_example_parser.h b/testdata/p4tc_samples_outputs/simple_lpm_example_parser.h index 64410d6b32..a67ccde435 100644 --- a/testdata/p4tc_samples_outputs/simple_lpm_example_parser.h +++ b/testdata/p4tc_samples_outputs/simple_lpm_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/simple_ternary_example_parser.h b/testdata/p4tc_samples_outputs/simple_ternary_example_parser.h index 64410d6b32..a67ccde435 100644 --- a/testdata/p4tc_samples_outputs/simple_ternary_example_parser.h +++ b/testdata/p4tc_samples_outputs/simple_ternary_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/size_param_example_parser.h b/testdata/p4tc_samples_outputs/size_param_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/size_param_example_parser.h +++ b/testdata/p4tc_samples_outputs/size_param_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_01_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_01_parser.h index 6af1f29ed1..db9bf51e36 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_01_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_01_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_02_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_02_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_02_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_02_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_03_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_03_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_03_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_03_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_04_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_04_parser.h index 65f6f8a589..0c06ab8247 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_04_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_04_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_05_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_05_parser.h index 5bb97b33ea..48e706ed20 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_05_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_05_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_06_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_06_parser.h index 4df62ee64b..61a32160ed 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_06_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_06_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_07_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_07_parser.h index 6af1f29ed1..db9bf51e36 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_07_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_07_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_08_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_08_parser.h index 6af1f29ed1..db9bf51e36 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_08_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_08_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_may_override_example_09_parser.h b/testdata/p4tc_samples_outputs/tc_may_override_example_09_parser.h index 780f9fb563..2d42144bb5 100644 --- a/testdata/p4tc_samples_outputs/tc_may_override_example_09_parser.h +++ b/testdata/p4tc_samples_outputs/tc_may_override_example_09_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/tc_type_annotation_example_parser.h b/testdata/p4tc_samples_outputs/tc_type_annotation_example_parser.h index 2361e1273b..11d6b2e6fe 100644 --- a/testdata/p4tc_samples_outputs/tc_type_annotation_example_parser.h +++ b/testdata/p4tc_samples_outputs/tc_type_annotation_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h" diff --git a/testdata/p4tc_samples_outputs/test_ipv6_example_parser.h b/testdata/p4tc_samples_outputs/test_ipv6_example_parser.h index 052dc26a4e..7f57f60ba5 100644 --- a/testdata/p4tc_samples_outputs/test_ipv6_example_parser.h +++ b/testdata/p4tc_samples_outputs/test_ipv6_example_parser.h @@ -1,7 +1,6 @@ #include "ebpf_kernel.h" #include -#include #include #include "pna.h"