Carmelo Cascone | 9ab4061 | 2017-09-19 16:31:55 +0900 | [diff] [blame] | 1 | // Copyright (c) 2017, Google Inc. |
| 2 | // |
| 3 | // P4_16 specification for l3_fwd instance. |
| 4 | // Note: This code has not been tested and is expected to contain bugs. |
| 5 | |
| 6 | #include "l3_fwd.p4" |
| 7 | #include "ipv4_checksum.p4" |
| 8 | |
| 9 | control ingress(inout parsed_packet_t hdr, |
| 10 | inout local_metadata_t local_metadata, |
| 11 | inout standard_metadata_t standard_metadata) { |
| 12 | apply { |
| 13 | l3_fwd.apply(hdr, local_metadata, standard_metadata); |
| 14 | } |
| 15 | } // end ingress |
| 16 | |
| 17 | control egress(inout parsed_packet_t hdr, |
| 18 | inout local_metadata_t local_metadata, |
| 19 | inout standard_metadata_t standard_metadata) { |
| 20 | apply { } |
| 21 | } |
| 22 | |
| 23 | V1Switch(pkt_parser(), verify_checksum(), ingress(), egress(), |
| 24 | compute_checksum(), pkt_deparser()) main; |