Skip to content

Commit

Permalink
Fix mark_to_drop() (#72)
Browse files Browse the repository at this point in the history
Replace `mark_to_drop()` with `mark_to_drop(standard_metadata)`

#71

Signed-off-by: Radostin Stoyanov <[email protected]>
  • Loading branch information
rst0git authored and jnfoster committed Dec 9, 2019
1 parent 55105a9 commit 551c0ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions examples/broadcast.p4app/bcast_router.p4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = smac;
}
action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
table send_frame {
actions = {
Expand All @@ -32,7 +32,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t

control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
action set_nhop(bit<32> nhop_ipv4, bit<9> port) {
meta.ingress_metadata.nhop_ipv4 = nhop_ipv4;
Expand Down
4 changes: 2 additions & 2 deletions examples/customtopo.p4app/simple_router.p4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = smac;
}
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
@name("send_frame") table send_frame {
actions = {
Expand All @@ -33,7 +33,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
register<bit<32>>(1) forward_count_register;
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
action increment_counter() {
bit<32> forward_count;
Expand Down
4 changes: 2 additions & 2 deletions examples/multi_iface.p4app/simple_router.p4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = smac;
}
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
@name("send_frame") table send_frame {
actions = {
Expand All @@ -32,7 +32,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t

control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
@name("set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) {
meta.ingress_metadata.nhop_ipv4 = nhop_ipv4;
Expand Down
4 changes: 2 additions & 2 deletions examples/multiswitch.p4app/simple_router.p4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = smac;
}
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
@name("send_frame") table send_frame {
actions = {
Expand All @@ -32,7 +32,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t

control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
@name("_drop") action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
@name("set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) {
meta.ingress_metadata.nhop_ipv4 = nhop_ipv4;
Expand Down
2 changes: 1 addition & 1 deletion examples/paxos_acceptor.p4app/acceptor.p4
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {

action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}

action set_UDPdstPort(bit<16> dstPort) {
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_router.p4app/simple_router.p4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = smac;
}
action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
table send_frame {
actions = {
Expand All @@ -32,7 +32,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t

control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
action _drop() {
mark_to_drop();
mark_to_drop(standard_metadata);
}
action set_nhop(bit<32> nhop_ipv4, bit<9> port) {
meta.ingress_metadata.nhop_ipv4 = nhop_ipv4;
Expand Down

0 comments on commit 551c0ba

Please sign in to comment.