Skip to content

Commit

Permalink
Merge branch 'master' into add-duplicate-hierarchical-name-check-pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jafingerhut committed Oct 9, 2024
2 parents 1cc8224 + 34d1340 commit 4b03eb5
Show file tree
Hide file tree
Showing 57 changed files with 61 additions and 60 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ set(P4RUNTIME_STD_DIR ${p4runtime_SOURCE_DIR}/proto CACHE INTERNAL
)
########################################## P4Runtime End ##########################################

add_subdirectory (frontends)
add_subdirectory (midend)
add_subdirectory (control-plane)

file (GLOB p4c_extensions RELATIVE ${P4C_SOURCE_DIR}/extensions ${P4C_SOURCE_DIR}/extensions/*)
MESSAGE ("-- Available extensions ${p4c_extensions}")
foreach (ext ${p4c_extensions})
Expand All @@ -450,10 +454,6 @@ foreach (ext ${p4c_extensions})
endif()
endforeach(ext)

add_subdirectory (frontends)
add_subdirectory (midend)
add_subdirectory (control-plane)

# With the current implementation of ir-generator, all targets share the
# same ir-generated.h and ir-generated.cpp file, which means all targets
# share the same set of IR classes (frontend and backend). Backends such as the DPDK backend
Expand Down
2 changes: 1 addition & 1 deletion backends/tc/tc.def
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ class TCPipeline {
}
toString {
std::string tcCode = absl::StrCat("#!/bin/bash -x\n",
"\nset -e\n", "\nTC=\"tc\"",
"\nset -e\n", "\n: \"${TC:=\"tc\"}\"",
"\n$TC p4template create pipeline/", pipelineName.string_view(),
" numtables ", numTables);
if (!actionDefs.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/add_entry_1_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/add_entry_1_example numtables 1

$TC p4template create action/add_entry_1_example/MainControlImpl/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/add_entry_3_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/add_entry_3_example numtables 1

$TC p4template create action/add_entry_3_example/MainControlImpl/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/add_entry_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/add_entry_example numtables 2

$TC p4template create action/add_entry_example/MainControlImpl/next_hop actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/calculator.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/calculator numtables 1

$TC p4template create action/calculator/MainControlImpl/operation_add actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/checksum.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/checksum numtables 1

$TC p4template create action/checksum/ingress/send_nh actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/const_entries_range_mask numtables 1

$TC p4template create action/const_entries_range_mask/MainControlImpl/a actid 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/default_action_example numtables 2

$TC p4template create action/default_action_example/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/default_action_example_01 numtables 2

$TC p4template create action/default_action_example_01/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/default_action_with_param numtables 2

$TC p4template create action/default_action_with_param/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/default_action_with_param_01 numtables 2

$TC p4template create action/default_action_with_param_01/MainControlImpl/next_hop actid 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/default_hit_const_example numtables 1

$TC p4template create action/default_hit_const_example/MainControlImpl/tcp_syn_packet actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/digest.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/digest numtables 1

$TC p4template create action/digest/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/digest_01.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/digest_01 numtables 1

$TC p4template create action/digest_01/ingress/send_nh actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/direct_counter_example numtables 1

$TC p4template create action/direct_counter_example/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/direct_meter.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/direct_meter numtables 1

$TC p4template create action/direct_meter/ingress/meter_exec actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/direct_meter_color.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/direct_meter_color numtables 1

$TC p4template create action/direct_meter_color/ingress/meter_exec actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/drop_packet_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/drop_packet_example numtables 1

$TC p4template create action/drop_packet_example/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/global_action_example_01 numtables 2

$TC p4template create action/global_action_example_01/send_nh actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/global_action_example_02 numtables 2

$TC p4template create action/global_action_example_02/drop actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/hash1.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/hash1 numtables 0
$TC p4template update pipeline/hash1 state ready
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/indirect_counter_01_example numtables 1

$TC p4template create action/indirect_counter_01_example/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/internetchecksum_01.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/internetchecksum_01 numtables 1

$TC p4template create action/internetchecksum_01/ingress/set_ipip_csum actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/ipip.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/ipip numtables 1

$TC p4template create action/ipip/Main/set_ipip actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/is_host_port.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/is_host_port numtables 1

$TC p4template create action/is_host_port/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/is_net_port.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/is_net_port numtables 1

$TC p4template create action/is_net_port/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/matchtype.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/matchtype numtables 4

$TC p4template create action/matchtype/MainControlImpl/next_hop actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/meter.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/meter numtables 1

$TC p4template create action/meter/ingress/meter_exec actid 1
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/meter_color.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/meter_color numtables 1

$TC p4template create action/meter_color/ingress/meter_exec actid 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/mix_matchtype_example numtables 4

$TC p4template create action/mix_matchtype_example/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/multiple_tables_example_01 numtables 7

$TC p4template create action/multiple_tables_example_01/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/multiple_tables_example_02 numtables 7

$TC p4template create action/multiple_tables_example_02/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/name_annotation_example numtables 2

$TC p4template create action/name_annotation_example/MainControlImpl/next_hop actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/no_table_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/no_table_example numtables 0
$TC p4template update pipeline/no_table_example state ready
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/noaction_example_01.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/noaction_example_01 numtables 2

$TC p4template create action/noaction_example_01/MainControlImpl/next_hop actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/noaction_example_02.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/noaction_example_02 numtables 2

$TC p4template create action/noaction_example_02/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/nummask_annotation_example numtables 1

$TC p4template create action/nummask_annotation_example/MainControlImpl/tcp_syn_packet actid 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/send_to_port_example numtables 1

$TC p4template create action/send_to_port_example/MainControlImpl/next_hop actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/set_entry_timer_example numtables 2

$TC p4template create action/set_entry_timer_example/MainControlImpl/next_hop actid 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/simple_exact_example numtables 1

$TC p4template create action/simple_exact_example/ingress/send_nh actid 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/simple_extern_example numtables 1

$TC p4template create action/simple_extern_example/ingress/send_nh actid 1 \
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4tc_samples_outputs/simple_lpm_example.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

TC="tc"
: "${TC:="tc"}"
$TC p4template create pipeline/simple_lpm_example numtables 1

$TC p4template create action/simple_lpm_example/ingress/send_nh actid 1 \
Expand Down
Loading

0 comments on commit 4b03eb5

Please sign in to comment.