Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always call packet->reset_exit() at beginning of Pipeline::apply() #1279

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/bm_sim/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace bm {

void
Pipeline::apply(Packet *pkt) {
pkt->reset_exit();
BMELOG(pipeline_start, *pkt, *this);
// TODO(antonin)
// this is temporary while we experiment with the debugger
Expand Down
1 change: 0 additions & 1 deletion targets/pna_nic/pna_nic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ PnaNic::main_thread() {

Pipeline *main_mau = this->get_pipeline("main_control");
main_mau->apply(packet.get());
packet->reset_exit();

Deparser *deparser = this->get_deparser("main_deparser");
deparser->deparse(packet.get());
Expand Down
2 changes: 0 additions & 2 deletions targets/psa_switch/psa_switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ PsaSwitch::ingress_thread() {

Pipeline *ingress_mau = this->get_pipeline("ingress");
ingress_mau->apply(packet.get());
packet->reset_exit();

const auto &f_ig_cos = phv->get_field("psa_ingress_output_metadata.class_of_service");
const auto ig_cos = f_ig_cos.get_uint();
Expand Down Expand Up @@ -561,7 +560,6 @@ PsaSwitch::egress_thread(size_t worker_id) {

Pipeline *egress_mau = this->get_pipeline("egress");
egress_mau->apply(packet.get());
packet->reset_exit();
// TODO(peter): add stf test where exit is invoked but packet still gets recirc'd
phv->get_field("psa_egress_deparser_input_metadata.egress_port").set(
phv->get_field("psa_egress_parser_input_metadata.egress_port"));
Expand Down
2 changes: 0 additions & 2 deletions targets/simple_switch/simple_switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ SimpleSwitch::ingress_thread() {

ingress_mau->apply(packet.get());

packet->reset_exit();

Field &f_egress_spec = phv->get_field("standard_metadata.egress_spec");
port_t egress_spec = f_egress_spec.get_uint();

Expand Down