From 09d5c23aada5412d26e36f7004f1937a2d761570 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 10 Jul 2019 23:25:09 +0200 Subject: [PATCH] make port a command --- p4src/commands.txt | 2 +- p4src/netpfga.p4 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/p4src/commands.txt b/p4src/commands.txt index 12be37e..0bde056 100644 --- a/p4src/commands.txt +++ b/p4src/commands.txt @@ -1,3 +1,3 @@ // only used on netpfga for dummy packet reply -table_cam_add_entry dummy_table_for_netpfga send_to_port1 0x082222222208 => 0x00000001 +table_cam_add_entry dummy_table_for_netpfga send_to_port1 0x082222222208 => 0x1 diff --git a/p4src/netpfga.p4 b/p4src/netpfga.p4 index 90dd831..8b2c199 100644 --- a/p4src/netpfga.p4 +++ b/p4src/netpfga.p4 @@ -5,8 +5,8 @@ action do_nothing() { ; } -action send_to_port1() { - sume_metadata.dst_port = 1; +action send_to_port1(port_t port) { + sume_metadata.dst_port = port; } table dummy_table_for_netpfga {