diff --git a/doc/plan.org b/doc/plan.org index b8f9cf1..48514eb 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -7208,7 +7208,8 @@ IOError: [Errno 2] No such file or directory: '/home/nico/projects/P4-NetFPGA/co nico@nsg-System:~/master-thesis/netpfga/minip4/sw/CLI$ #+END_CENTER -*** TODO 2019-07-28: setting ipv6 neighbor entries +*** DONE 2019-07-28: setting ipv6 neighbor entries + CLOSED: [2019-07-28 Sun 13:07] #+BEGIN_CENTER nico@ESPRIMO-P956:~/master-thesis$ ./netpfga/set_ipv6_neighbour.sh @@ -7263,7 +7264,125 @@ success #+END_CENTER -*** TODO 2019-07-28: ping6 test for getting packet: failure +*** DONE 2019-07-28: ping6 test for getting packet: failure + CLOSED: [2019-07-28 Sun 12:43] + +*** DONE 2019-07-28: !!!!!!! NETPFGA PORT MAPPINGS + CLOSED: [2019-07-28 Sun 13:07] +nf_port_map = { + "nf0":0b00000001, + "nf1":0b00000100, + "nf2":0b00010000, + "nf3":0b01000000, + "dma0":0b00000010 +} + +| port 0 | 1 | likely: esprimo enp2s0f0 | | +| port 1 | 4 | likely: esprimo enp2s0f1 | | +| port 2 | 16 | not connected likely | | +| port 3 | 64 | eth1 @ nsg | PROBALY NOT, probably 1! | +| | | | | + +*** DONE 2019-07-28: testing with port = 64 (first or last in theory): LAST! WORKS! + CLOSED: [2019-07-28 Sun 13:19] +#+BEGIN_CENTER +>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434276 => 1 64 64 0 0 +fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)] +action_name = TopPipe.realmain.set_egress_port +field_vals = [1, '1', '64', '64', '0', '0'] +CAM_Init_ValidateContext() - done +WROTE 0x44020150 = 0x0064 +WROTE 0x44020154 = 0x0000 +WROTE 0x44020158 = 0x420000 +WROTE 0x4402015c = 0x20010db8 +WROTE 0x44020180 = 0x0000 +WROTE 0x44020184 = 0x0040 +WROTE 0x44020188 = 0x1400000 +WROTE 0x4402018c = 0x0001 +READ 0x44020144 = 0x0001 +WROTE 0x44020140 = 0x0001 +READ 0x44020144 = 0x0001 +READ 0x44020144 = 0x0001 +success + +#+END_CENTER + +*** TODO 2019-07-28: and another bug in the table code: invalid literal for int() with base 0: + +#+BEGIN_CENTER +>> table_cam_delete_entry realmain_v6_networks_0 42540766411362381960998550477184434180 +ERROR: failed to convert of type to an integer: invalid literal for int() with base 0: '' +nico@nsg-System:~/master-thesis/netpfga/minip4/sw/CLI$ + +#+END_CENTER + +*** DONE 2019-07-28: try pinging nsg <-> esprimo: reply is being created, not received + CLOSED: [2019-07-28 Sun 13:32] + - reply seems to come back, too => wrong out port? +#+BEGIN_CENTER +nico@ESPRIMO-P956:~/master-thesis/netpfga$ sudo ip -6 neighbor add 2001:db8:42::64 lladdr f8:f2:1e:41:44:9c dev enp2s0f1 + ⚡ root  root ip -6 neighbor add 2001:db8:42::42 lladdr f8:f2:1e:09:62:d1 dev eth1 + + +13:27:21.387690 IP6 2001:db8:42::42 > 2001:db8:42::64: ICMP6, echo request, seq 1, length 64 +13:27:21.387721 IP6 2001:db8:42::64 > 2001:db8:42::42: ICMP6, echo reply, seq 1, length 64 +13:27:21.387741 IP6 2001:db8:42::64 > 2001:db8:42::42: ICMP6, echo reply, seq 1, length 64 +13:27:22.404759 IP6 2001:db8:42::42 > 2001:db8:42::64: ICMP6, echo request, seq 2, length 64 +13:27:22.404788 IP6 2001:db8:42::64 > 2001:db8:42::42: ICMP6, echo reply, seq 2, length 64 +13:27:22.404807 IP6 2001:db8:42::64 > 2001:db8:42::42: ICMP6, echo reply, seq 2, length 64 + +#+END_CENTER + +*** TODO 2019-07-28: try setting correct out port for 42: seems all go to port3 + - solution: lookup table still in place!!!! + +#+BEGIN_CENTER +>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434242 => 4 4 4 0 0 +fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)] +action_name = TopPipe.realmain.set_egress_port +field_vals = [1, '4', '4', '4', '0', '0'] +CAM_Init_ValidateContext() - done +WROTE 0x44020150 = 0x0042 +WROTE 0x44020154 = 0x0000 +WROTE 0x44020158 = 0x420000 +WROTE 0x4402015c = 0x20010db8 +WROTE 0x44020180 = 0x0000 +WROTE 0x44020184 = 0x0004 +WROTE 0x44020188 = 0x4040000 +WROTE 0x4402018c = 0x0001 +READ 0x44020144 = 0x0001 +WROTE 0x44020140 = 0x0001 +READ 0x44020144 = 0x0001 +READ 0x44020144 = 0x0001 +success +>> + +#+END_CENTER + +Rewriting/adding: + +#+BEGIN_CENTER +>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434242 => 4 4 4 4 4 +fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)] +action_name = TopPipe.realmain.set_egress_port +field_vals = [1, '4', '4', '4', '4', '4'] +CAM_Init_ValidateContext() - done +WROTE 0x44020150 = 0x0042 +WROTE 0x44020154 = 0x0000 +WROTE 0x44020158 = 0x420000 +WROTE 0x4402015c = 0x20010db8 +WROTE 0x44020180 = 0x40004 +WROTE 0x44020184 = 0x0004 +WROTE 0x44020188 = 0x4040000 +WROTE 0x4402018c = 0x0001 +READ 0x44020144 = 0x0001 +WROTE 0x44020140 = 0x0001 +READ 0x44020144 = 0x0001 +READ 0x44020144 = 0x0001 +success +>> + +#+END_CENTER ** The NetPFGA saga Problems encountered: diff --git a/netpfga/delete_ipv6_neighbor.sh b/netpfga/delete_ipv6_neighbor.sh new file mode 100644 index 0000000..a4de691 --- /dev/null +++ b/netpfga/delete_ipv6_neighbor.sh @@ -0,0 +1 @@ +sudo ip -6 neigh del 2001:db8:42::64 dev enp2s0f1 diff --git a/netpfga/delete_table_entries.sh b/netpfga/delete_table_entries.sh new file mode 100755 index 0000000..03166c0 --- /dev/null +++ b/netpfga/delete_table_entries.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -x + +read=yes +if [ $# -ge 1 ]; then + read="" +fi + +for addr in $(seq 1 64); do + ip=2001:db8:42::$addr + echo "Next to ping: ${ip}" + if [ "$read" ]; then + read dummy + fi + ping6 -c1 "$ip" +done diff --git a/netpfga/minip4/testdata/gen_testdata-port1.py b/netpfga/minip4/testdata/gen_testdata-port1.py index 2363d19..2f1a4b2 100755 --- a/netpfga/minip4/testdata/gen_testdata-port1.py +++ b/netpfga/minip4/testdata/gen_testdata-port1.py @@ -32,7 +32,7 @@ nf_port_map = { "nf3":0b01000000, "dma0":0b00000010 } - +n nf_id_map = { "nf0":0, "nf1":1, diff --git a/p4src/actions_egress.p4 b/p4src/actions_egress.p4 index 52e05da..2cc8123 100644 --- a/p4src/actions_egress.p4 +++ b/p4src/actions_egress.p4 @@ -32,7 +32,7 @@ action controller_reply(task_t task) { action controller_reply(task_t task) { meta.task = task; meta.ingress_port = sume_metadata.src_port; - set_egress_port(8); /* port1 = 1, port2 = 2, port3=4 */ + set_egress_port(1); } #endif /* _SUME_SWITCH_P4_ */ diff --git a/p4src/no_commmands.txt b/p4src/no_commmands.txt index 49a0251..1ef25f9 100644 --- a/p4src/no_commmands.txt +++ b/p4src/no_commmands.txt @@ -1,6 +1,8 @@ // only used on netpfga for dummy packet reply //table_cam_add_entry dummy_table_for_netpfga send_to_port1 0x082222222208 => 0x1 +// likely wrong! + table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434177 => 1 0 0 0 0 table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434178 => 2 0 0 0 0 table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434179 => 3 0 0 0 0 @@ -9,3 +11,23 @@ table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 425407664113 table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434182 => 6 0 0 0 0 table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434183 => 7 0 0 0 0 table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434184 => 8 0 0 0 0 + +// 1 +table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434177 => 1 1 1 0 0 + +// 4 +table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434180 => 1 4 4 0 0 + +// 16 +table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434198 => 1 16 16 0 0 + +// 32 +table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434226 => 1 32 32 0 0 + +//64 +table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434276 => 1 64 64 0 0 + + +// deleting: table_cam_delete_entry realmain_v6_networks_0 42540766411362381960998550477184434179 + +// 42 del: table_cam_delete_entry realmain_v6_networks_0 42540766411362381960998550477184434242