master-thesis/p4src/netpfga.p4

31 lines
493 B
Text
Raw Normal View History

2019-07-10 20:47:52 +00:00
#ifndef DUMMY_NETPFGA
#define DUMMY_NETPFGA
action do_nothing() {
;
2019-07-10 20:47:52 +00:00
}
2019-07-17 15:41:54 +00:00
action send_to_port(port_t port) {
2019-07-10 21:25:09 +00:00
sume_metadata.dst_port = port;
2019-07-10 20:47:52 +00:00
}
2019-07-17 15:41:54 +00:00
action send_to_port1() {
sume_metadata.dst_port = 1;
}
2019-07-10 20:47:52 +00:00
table dummy_table_for_netpfga {
key = {
hdr.ethernet.dst_addr: exact;
}
actions = {
do_nothing;
send_to_port1;
2019-07-17 15:42:11 +00:00
send_to_port;
2019-07-10 20:47:52 +00:00
}
size = TEST_TABLE_SIZE;
// default_action = do_nothing;
default_action = send_to_port1;
2019-07-10 20:47:52 +00:00
}
#endif