Skip to content

Commit

Permalink
Fix extern pipeline name in template file (#4675)
Browse files Browse the repository at this point in the history
* Fixed create extern in template file

* Update Testcases
  • Loading branch information
komaljai authored May 31, 2024
1 parent b0d4d02 commit 9aaa4bc
Show file tree
Hide file tree
Showing 47 changed files with 3 additions and 47 deletions.
1 change: 0 additions & 1 deletion backends/tc/ebpfCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace TC {
// =====================PNAEbpfGenerator=============================
void PNAEbpfGenerator::emitPNAIncludes(EBPF::CodeBuilder *builder) const {
builder->appendLine("#include <stdbool.h>");
builder->appendLine("#include <stdlib.h>");
builder->appendLine("#include <linux/if_ether.h>");
builder->appendLine("#include \"pna.h\"");
}
Expand Down
2 changes: 1 addition & 1 deletion backends/tc/tc.def
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/add_entry_1_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/add_entry_3_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/add_entry_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/calculator_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/checksum_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/drop_packet_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/hash1_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/ipip_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/matchtype_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/no_table_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/noaction_example_01_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/noaction_example_02_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/simple_lpm_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/size_param_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down
1 change: 0 additions & 1 deletion testdata/p4tc_samples_outputs/test_ipv6_example_parser.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "ebpf_kernel.h"

#include <stdbool.h>
#include <stdlib.h>
#include <linux/if_ether.h>
#include "pna.h"

Expand Down

0 comments on commit 9aaa4bc

Please sign in to comment.