++ notes
This commit is contained in:
parent
f27f6c5c85
commit
42af5cd2d8
1 changed files with 319 additions and 4 deletions
323
doc/plan.org
323
doc/plan.org
|
@ -300,18 +300,26 @@
|
|||
| | Needs timeout / leases | |
|
||||
| | Might work w/ registers | |
|
||||
| | | |
|
||||
| 2019-XX-XX | | |
|
||||
| | Prepare Laurent meeting | |
|
||||
| 2019-06-16 | | |
|
||||
| | Laurent meeting | |
|
||||
| | | |
|
||||
| | - Vivado installation: silent errors, infinite loop, missing libncurses5 | |
|
||||
| | | |
|
||||
| | - Compiling netfpga: 82k lines of code that are interdependent | |
|
||||
| | - Many non critical error messages on the way | |
|
||||
| | - Zero exit fatal errors | |
|
||||
| | | |
|
||||
| | - Code is not persistent in flash -> not there after power down | |
|
||||
| | | |
|
||||
| | - Not Receiving | |
|
||||
| | - tcpdump on local nfX doesn't work -> can only debug on other endpoint | |
|
||||
| | | |
|
||||
| | - Writing tables fails | |
|
||||
| | | |
|
||||
| | - Output all ports -> unclear how test data should look like | |
|
||||
| | - Found out broad/multicasting in theory -> bitmask | |
|
||||
| | - Theory: code is not persistent in flash (???) -> not there after power | |
|
||||
| | down | |
|
||||
| | | |
|
||||
| | - HW test compiling for 2 days | |
|
||||
| | | |
|
||||
| 2018-06-27 | | |
|
||||
| | Target Hardware: code running | |
|
||||
|
@ -4181,6 +4189,313 @@ exit
|
|||
|
||||
-> mismatch when using expPkt on all ports
|
||||
-> trying to use bcast fails due to programming errors
|
||||
-> using bcast in the map -> breaks config_writes.py
|
||||
|
||||
Using bcast, following output :
|
||||
|
||||
#+BEGIN_CENTER
|
||||
SV_write_control()- done
|
||||
[SW] CAM_EnableDevice() - done
|
||||
[2274090] INFO: finished packet stimulus file
|
||||
[2735572] INFO: packet 1 tuple OK < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000055040000 >
|
||||
[2735572] INFO: packet 1 data OK (tlast, tkeep, tdata) = (0, ffffffff, 0000000000000000000000000000000000000090012222222208022222222208)
|
||||
[2738904] INFO: packet 1 data OK (tlast, tkeep, tdata) = (1, ffffffff, 0000000000000000000000000000000000000000000000000000000000000000)
|
||||
[2745568] INFO: packet 2 tuple OK < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000055100000 >
|
||||
[2745568] INFO: packet 2 data OK (tlast, tkeep, tdata) = (0, ffffffff, 0000000000000000000000000000000000000090012222222208022222222208)
|
||||
[2748900] INFO: packet 2 data OK (tlast, tkeep, tdata) = (1, ffffffff, 0000000000000000000000000000000000000000000000000000000000000000)
|
||||
[2755564] INFO: packet 3 tuple OK < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000055400000 >
|
||||
[2755564] INFO: packet 3 data OK (tlast, tkeep, tdata) = (0, ffffffff, 0000000000000000000000000000000000000090012222222208022222222208)
|
||||
[2758896] INFO: packet 3 data OK (tlast, tkeep, tdata) = (1, ffffffff, 0000000000000000000000000000000000000000000000000000000000000000)
|
||||
[6094228] INFO: stopping simulation after 1000 idle cycles
|
||||
[6094228] INFO: all expected data successfully received
|
||||
[6094228] INFO: TEST PASSED
|
||||
$finish called at time : 6094228 ps : File "/home/nico/master-thesis/netpfga/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/Testbench/SimpleSumeSwitch_tb.sv" Line 207
|
||||
exit
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
-> nf_sume_sdnet_ip/SimpleSumeSwitch/config_writes.txt isn't generated correctly
|
||||
|
||||
*** 2019-06-13: try downgrading kernel: requires outdated libssl that is not there in 18.x
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:/home/nico# mkdir ubuntu
|
||||
root@rainbow:/home/nico# mv linux-* ubuntu/
|
||||
root@rainbow:/home/nico# cd ubuntu/
|
||||
root@rainbow:/home/nico/ubuntu# ls
|
||||
linux-headers-4.10.0-32-generic_4.10.0-32.36~16.04.1_amd64.deb linux-image-4.10.0-32-generic_4.10.0-32.36~16.04.1_amd64.deb
|
||||
root@rainbow:/home/nico/ubuntu#
|
||||
|
||||
..
|
||||
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-32-generic /boot/vmlinuz-4.10.0-32-generic
|
||||
Sourcing file `/etc/default/grub'
|
||||
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
|
||||
Sourcing file `/etc/default/grub.d/init-select.cfg'
|
||||
Generating grub configuration file ...
|
||||
Found linux image: /boot/vmlinuz-5.0.0-16-generic
|
||||
Found initrd image: /boot/initrd.img-5.0.0-16-generic
|
||||
Found linux image: /boot/vmlinuz-5.0.0-15-generic
|
||||
Found initrd image: /boot/initrd.img-5.0.0-15-generic
|
||||
Found linux image: /boot/vmlinuz-4.10.0-32-generic
|
||||
Found initrd image: /boot/initrd.img-4.10.0-32-generic
|
||||
done
|
||||
Errors were encountered while processing:
|
||||
linux-headers-4.10.0-32-generic
|
||||
root@rainbow:/home/nico/ubuntu#
|
||||
|
||||
#+END_CENTER
|
||||
*** 2019-06-13: reminder: no ubuntu 16.04 originally due to broken packages
|
||||
*** 2019-06-13: re-installing ubuntu 16.04 fails w/ disk detection issues
|
||||
- trying 2 different computers
|
||||
- trying 2 different disks
|
||||
- erased partition table
|
||||
|
||||
Only worked after creating a sample partition
|
||||
*** 2019-06-13: reinstall sdnet: next button doesn't work on ubuntu 16.04
|
||||
java traceback when trying to install sdnet
|
||||
#+BEGIN_CENTER
|
||||
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Window must not be zero
|
||||
at java.desktop/sun.awt.X11.XAtom.checkWindow(Unknown Source)
|
||||
at java.desktop/sun.awt.X11.XAtom.getAtomData(Unknown Source)
|
||||
at java.desktop/sun.awt.X11.XToolkit.getWorkArea(Unknown Source)
|
||||
at java.desktop/sun.awt.X11.XToolkit.getInsets(Unknown Source)
|
||||
at java.desktop/sun.awt.X11.XToolkit.getScreenInsets(Unknown Source)
|
||||
at java.desktop/java.awt.Window.init(Unknown Source)
|
||||
at java.desktop/java.awt.Window.<init>(Unknown Source)
|
||||
at java.desktop/java.awt.Window.<init>(Unknown Source)
|
||||
at java.desktop/java.awt.Dialog.<init>(Unknown Source)
|
||||
at java.desktop/java.awt.Dialog.<init>(Unknown Source)
|
||||
at java.desktop/javax.swing.JDialog.<init>(Unknown Source)
|
||||
at java.desktop/javax.swing.JOptionPane.createDialog(Unknown Source)
|
||||
at java.desktop/javax.swing.JOptionPane.createDialog(Unknown Source)
|
||||
at j.a.c(Unknown Source)
|
||||
at j.a.a(Unknown Source)
|
||||
at j.a.a(Unknown Source)
|
||||
at j.a.c(Unknown Source)
|
||||
at com.xilinx.installer.gui.panel.destination.b.a(Unknown Source)
|
||||
at com.xilinx.installer.gui.panel.destination.DestinationPanel.z(Unknown Source)
|
||||
at com.xilinx.installer.gui.E.a(Unknown Source)
|
||||
at com.xilinx.installer.gui.InstallerGUI.l(Unknown Source)
|
||||
at com.xilinx.installer.gui.i.actionPerformed(Unknown Source)
|
||||
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
|
||||
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
|
||||
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
|
||||
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
|
||||
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
|
||||
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
|
||||
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
|
||||
at java.desktop/java.awt.Component.processEvent(Unknown Source)
|
||||
at java.desktop/java.awt.Container.processEvent(Unknown Source)
|
||||
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
|
||||
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
|
||||
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
|
||||
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
|
||||
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
|
||||
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
|
||||
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
|
||||
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
|
||||
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
|
||||
at java.base/java.security.AccessController.doPrivileged(Native Method)
|
||||
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
|
||||
at java.base/java.security.AccessController.doPrivileged(Native Method)
|
||||
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
|
||||
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
|
||||
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Reason was a hidden window.
|
||||
***
|
||||
*** 2019-06-13: try using external card for packets
|
||||
*** 2019-06-14: test adding table entry with ubuntu 16.04, kernel 4.15.0-51-generic
|
||||
#+BEGIN_CENTER
|
||||
[12:05] rainbow16:CLI% ./P4_SWITCH_CLI.py
|
||||
loading libsume..
|
||||
loading libsume..
|
||||
loading libcam..
|
||||
The SimpleSumeSwitch interactive command line tool
|
||||
type help to see all commands
|
||||
>> table_cam_add_entry lookup_table send_to_port1 ff:ff:ff:ff:ff:ff =>
|
||||
CAM_Init_ValidateContext() - done
|
||||
WROTE 0x44020050 = 0xffffffff
|
||||
WROTE 0x44020054 = 0xffff
|
||||
WROTE 0x44020080 = 0x0003
|
||||
python: ioctl: Unknown error 512
|
||||
[12:05] rainbow16:CLI%
|
||||
|
||||
#+END_CENTER
|
||||
*** 2019-06-14: try finding pre compiled bitfiles that can be tested
|
||||
*** 2019-06-14: re-verify hardware
|
||||
Using
|
||||
https://github.com/NetFPGA/NetFPGA-SUME-public/wiki/Acceptance-Test-Project
|
||||
|
||||
#+BEGIN_CENTER
|
||||
[13:33] rainbow16:acceptance_test% make cores
|
||||
|
||||
for lib in ./std/cores/nf_sume_10g_interface_shared_logic ./std/cores/nf_axis_gen_chk ./std/cores/nf_sume_10g_interface ./digilent/cores/d_clkfreq_detector ./digilent/cores/nf_sume_gpio_test ./digilent/cores/d_sdctrl ; do\
|
||||
make -C ip_repo/$lib clean; \
|
||||
make -C ip_repo/$lib; \
|
||||
done;
|
||||
make[1]: Entering directory '/home/nico/NetFPGA-SUME-live/projects/acceptance_test/ip_repo/std/cores/nf_sume_10g_interface_shared_logic'
|
||||
rm -rf generated_ip
|
||||
for i in nf_sume_10g_pcs_pma_ff_synchronizer_rst2.v nf_sume_10g_pcs_pma_gt_common.v; do \
|
||||
rm hdl/$i -fv; \
|
||||
done;
|
||||
rm -rf vivado*
|
||||
rm -rf .Xil
|
||||
rm -rf nf_sume_10g_interface_shared_logic_project
|
||||
rm -rf component.xml
|
||||
rm -rf xgui
|
||||
make[1]: Leaving directory '/home/nico/NetFPGA-SUME-live/projects/acceptance_test/ip_repo/std/cores/nf_sume_10g_interface_shared_logic'
|
||||
make[1]: Entering directory '/home/nico/NetFPGA-SUME-live/projects/acceptance_test/ip_repo/std/cores/nf_sume_10g_interface_shared_logic'
|
||||
WARNING: Ignoring invalid XILINX_PATH location /opt/Xilinx/Vivado/2016.4.
|
||||
Resolution: An invalid XILINX_PATH location has been detected. To resolve this issue:
|
||||
|
||||
1. Verify the value of XILINX_PATH is accurate by viewing the value the variable via 'set XILINX_PATH' for Windows or 'echo $XILINX_PATH' for Linux, and update it as needed.
|
||||
|
||||
2. To unset the variable using on Windows using 'set XILINX_PATH=' or remove it from Advanced System Settings\Environment Variables. On Linux 'unsetenv XILINX_PATH'
|
||||
|
||||
|
||||
****** Vivado v2018.2 (64-bit)
|
||||
**** SW Build 2258646 on Thu Jun 14 20:02:38 MDT 2018
|
||||
**** IP Build 2256618 on Thu Jun 14 22:10:49 MDT 2018
|
||||
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
|
||||
|
||||
WARNING: [Common 17-1271] The MYVIVADO environment variable specifies an invalid location '/opt/Xilinx/Vivado/2016.4'
|
||||
source ../tcl/nf_sume_pcs_pma_compile.tcl
|
||||
# set ip_name {nf_sume_10g_pcs_pma}
|
||||
# create_project -in_memory -part xc7vx690tffg1761-3
|
||||
# create_ip -name ten_gig_eth_pcs_pma -vendor xilinx.com -library ip -module_name ${ip_name}
|
||||
INFO: [IP_Flow 19-234] Refreshing IP repositories
|
||||
INFO: [IP_Flow 19-1704] No user IP repositories specified
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
#+BEGIN_CENTER
|
||||
[14:39] rainbow16:acceptance_test% make test
|
||||
python sw/host/script/NfSumeTest.py
|
||||
Traceback (most recent call last):
|
||||
File "sw/host/script/NfSumeTest.py", line 45, in <module>
|
||||
import wx
|
||||
ImportError: No module named wx
|
||||
Makefile:55: recipe for target 'test' failed
|
||||
make: *** [test] Error 1
|
||||
[14:40] rainbow16:acceptance_test%
|
||||
|
||||
...
|
||||
[14:39] rainbow16:acceptance_test% make test
|
||||
python sw/host/script/NfSumeTest.py
|
||||
Traceback (most recent call last):
|
||||
File "sw/host/script/NfSumeTest.py", line 45, in <module>
|
||||
import wx
|
||||
ImportError: No module named wx
|
||||
Makefile:55: recipe for target 'test' failed
|
||||
make: *** [test] Error 1
|
||||
[14:40] rainbow16:acceptance_test%
|
||||
|
||||
[14:40] rainbow16:acceptance_test% make test
|
||||
python sw/host/script/NfSumeTest.py
|
||||
Traceback (most recent call last):
|
||||
File "sw/host/script/NfSumeTest.py", line 52, in <module>
|
||||
import serial
|
||||
ImportError: No module named serial
|
||||
Makefile:55: recipe for target 'test' failed
|
||||
make: *** [test] Error 1
|
||||
[14:41] rainbow16:acceptance_test%
|
||||
|
||||
|
||||
root@rainbow16:~# apt install python-serial
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Trying to run make test -> various path erros -> trying sudo bash
|
||||
|
||||
#+BEGIN_CENTER
|
||||
|
||||
|
||||
root@rainbow16:~/NetFPGA-SUME-live/projects/acceptance_test# . ~nico/master-thesis/netpfga/bashinit
|
||||
#+END_CENTER
|
||||
|
||||
*** 2019-06-15: downloading / uploading reference switch
|
||||
- http://www.cl.cam.ac.uk/research/srg/netos/projects/netfpga/bitfiles/NetFPGA-SUME-live/1.3.0/reference_switch/reference_switch.bit
|
||||
- https://www.cl.cam.ac.uk/research/srg/netos/projects/netfpga/bitfiles/NetFPGA-SUME-live/1.3.0/
|
||||
|
||||
*** 2019-06-15: Testing with external host: seems like my minip4 switch actually works!
|
||||
|
||||
#+BEGIN_CENTER
|
||||
22:18:39.824461 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
22:18:40.848171 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
22:18:40.848292 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
22:18:41.872171 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
22:18:41.872286 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
22:18:58.848012 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
22:18:58.848058 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
22:20:02.849843 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
22:20:02.849894 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
22:22:10.850831 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
22:22:10.850950 IP6 2001:db8::1.5353 > ff02::fb.5353: 0 [2q] PTR (QM)? _ipps._tcp.local. PTR (QM)? _ipp._tcp.local. (45)
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Problem:
|
||||
- So basically riffa_sume doesn't do the right thing[tm]
|
||||
|
||||
Message from myself:
|
||||
|
||||
#+BEGIN_CENTER
|
||||
It seems I was really mistaken for the last weeks
|
||||
If I am not totally mistaken, the following is happening with the netpfga:
|
||||
I was testing sending and receiving packets on the same computer; so I sent a packet on nfX and expected an answer on nf0, which is how I wanted to verify that the card works
|
||||
So I ran tcpdump on nf0, send a packet with ping6 and scapy on nf{0,1,2,3} (edited)
|
||||
I have never seen the switch emitting ANY packet back with tcpdump
|
||||
Now with the card connected to another host, sending neighbor solicitation, I see duplicated packets on the other host - so it seems that it might have worked all the time, just that tcpdump on nfX on the host which contains the card does not show the packets
|
||||
#+END_CENTER
|
||||
|
||||
|
||||
The testscript now generates 2 packets:
|
||||
|
||||
#+BEGIN_CENTER
|
||||
root@naked:~# cat foo.py
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
from scapy.all import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
iface = sys.argv[1]
|
||||
|
||||
e = Ether(src="02:53:55:42:45:01",
|
||||
dst='ff:ff:ff:ff:ff:ff')
|
||||
|
||||
i = IPv6(src = "2001:db8:42::1",
|
||||
dst = "2001:db8::2")
|
||||
|
||||
t = TCP(dport=80, sport=random.randint(49152,65535))
|
||||
|
||||
d = "A"
|
||||
|
||||
pkg = e / i / t / d
|
||||
|
||||
sendp(pkg, iface=iface, verbose=True)
|
||||
|
||||
root@naked:~#
|
||||
|
||||
22:27:34.542877 IP6 2001:db8:42::1.63186 > 2001:db8::2.80: Flags [S], seq 0:1, win 8192, length 1: HTTP
|
||||
22:27:34.542982 IP6 2001:db8:42::1.63186 > 2001:db8::2.80: Flags [S], seq 0:1, win 8192, length 1: HTTP
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
** References / Follow up
|
||||
*** RFC 791 IPv4 https://tools.ietf.org/html/rfc791
|
||||
|
|
Loading…
Reference in a new issue