Merge branch 'master' of gitlab.ethz.ch:nicosc/master-thesis
This commit is contained in:
commit
945e2c5d2f
13 changed files with 167 additions and 24 deletions
123
doc/plan.org
123
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 <type 'str'> 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:
|
||||
|
|
1
netpfga/delete_ipv6_neighbor.sh
Normal file
1
netpfga/delete_ipv6_neighbor.sh
Normal file
|
@ -0,0 +1 @@
|
|||
sudo ip -6 neigh del 2001:db8:42::64 dev enp2s0f1
|
17
netpfga/delete_table_entries.sh
Executable file
17
netpfga/delete_table_entries.sh
Executable file
|
@ -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
|
|
@ -32,7 +32,7 @@ nf_port_map = {
|
|||
"nf3":0b01000000,
|
||||
"dma0":0b00000010
|
||||
}
|
||||
|
||||
n
|
||||
nf_id_map = {
|
||||
"nf0":0,
|
||||
"nf1":1,
|
||||
|
|
|
@ -7,7 +7,7 @@ if [ $# -ge 1 ]; then
|
|||
read=""
|
||||
fi
|
||||
|
||||
for addr in $(seq 1 8); do
|
||||
for addr in $(seq 1 32); do
|
||||
ip=2001:db8:42::$addr
|
||||
echo "Next to ping: ${ip}"
|
||||
if [ "$read" ]; then
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
set -x
|
||||
|
||||
for addr in $(seq 1 8); do
|
||||
sudo ip -6 neighbor add 2001:db8:42::$addr lladdr 02:53:55:4d:45:0${addr} dev enp2s0f1
|
||||
for addr in $(seq 1 32); do
|
||||
hwaddr=$(printf "%0.2d" $addr)
|
||||
sudo ip -6 neighbor add 2001:db8:42::$addr lladdr 02:53:55:4d:45:${hwaddr} dev enp2s0f1
|
||||
done
|
||||
|
|
|
@ -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(4); /* port1 = 1, port2 = 2, port3=4 */
|
||||
set_egress_port(1);
|
||||
}
|
||||
#endif /* _SUME_SWITCH_P4_ */
|
||||
|
||||
|
|
|
@ -88,21 +88,6 @@ control RealMain(
|
|||
mac_addr_t temp = hdr.ethernet.dst_addr;
|
||||
}
|
||||
|
||||
table lookup_table {
|
||||
key = {
|
||||
hdr.ethernet.dst_addr: exact;
|
||||
}
|
||||
|
||||
actions = {
|
||||
swap_eth_addresses;
|
||||
do_nothing;
|
||||
send_to_port1;
|
||||
send_to_all_ports;
|
||||
}
|
||||
size = 64;
|
||||
default_action = send_to_port1; // test_port1()
|
||||
}
|
||||
|
||||
apply {
|
||||
bit<17> tmp17 = 0;
|
||||
bool apply_v4networks = true;
|
||||
|
|
|
@ -57,5 +57,3 @@
|
|||
if(apply_v6networks == true) {
|
||||
v6_networks.apply();
|
||||
}
|
||||
|
||||
lookup_table.apply();
|
||||
|
|
|
@ -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
|
||||
|
|
BIN
pcap/netfpga-enp2s0f0-ping6-2019-07-28-1250-enp2s0f0.pcap
Normal file
BIN
pcap/netfpga-enp2s0f0-ping6-2019-07-28-1250-enp2s0f0.pcap
Normal file
Binary file not shown.
BIN
pcap/netfpga-enp2s0f1-ping6-2019-07-28-1250-enp2s0f1.pcap
Normal file
BIN
pcap/netfpga-enp2s0f1-ping6-2019-07-28-1250-enp2s0f1.pcap
Normal file
Binary file not shown.
BIN
pcap/netfpga-ping6-2019-07-28-1249-enp2s0f0.pcap
Normal file
BIN
pcap/netfpga-ping6-2019-07-28-1249-enp2s0f0.pcap
Normal file
Binary file not shown.
Loading…
Reference in a new issue