netpfga: always emit on port1
This commit is contained in:
parent
61b807bd2e
commit
6c895c583a
2 changed files with 450 additions and 7 deletions
450
doc/plan.org
450
doc/plan.org
|
@ -300,6 +300,15 @@
|
|||
| | Needs timeout / leases | |
|
||||
| | Might work w/ registers | |
|
||||
| | | |
|
||||
| 2019-05-26 | | |
|
||||
| | Prepare 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 | |
|
||||
| | | |
|
||||
| | | |
|
||||
| 2018-06-27 | | |
|
||||
| | Target Hardware: code running | |
|
||||
| | | |
|
||||
|
@ -2292,18 +2301,50 @@ INFO: [Common 17-206] Exiting xsim at Sun May 26 11:09:04 2019...
|
|||
|
||||
#+END_CENTER
|
||||
|
||||
After setting egress port, vivado_sim.bash looks good
|
||||
|
||||
#+BEGIN_CENTER
|
||||
SV_write_control()- start
|
||||
SV_write_control()- done
|
||||
SV_read_control()- start
|
||||
SV_read_control()- done
|
||||
SV_write_control()- start
|
||||
SV_write_control()- done
|
||||
[SW] CAM_EnableDevice() - done
|
||||
[2260762] INFO: finished packet stimulus file
|
||||
[2735572] INFO: packet 1 tuple OK < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000001010000 >
|
||||
[2735572] INFO: packet 1 data OK (tlast, tkeep, tdata) = (0, ffffffff, 0000000000000000000000000000000000000090082222222208081111111108)
|
||||
[2738904] INFO: packet 1 data OK (tlast, tkeep, tdata) = (1, ffffffff, 0000000000000000000000000000000000000000000000000000000000000000)
|
||||
[6074236] INFO: stopping simulation after 1000 idle cycles
|
||||
[6074236] INFO: all expected data successfully received
|
||||
[6074236] INFO: TEST PASSED
|
||||
$finish called at time : 6074236 ps : File "/home/nico/master-thesis/netpfga/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/Testbench/SimpleSumeSwitch_tb.sv" Line 207
|
||||
exit
|
||||
INFO: [Common 17-206] Exiting xsim at Sun May 26 11:14:34 2019...
|
||||
[11:14] rainbow:SimpleSumeSwitch%
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Started compiling the bitstream at around 1120
|
||||
Ended at Sun 26 May 2019 01:09:05 PM CEST
|
||||
|
||||
|
||||
***** run step 11: checking design -- skipped
|
||||
***** TODO run step 12: ok
|
||||
***** DONE run step 12: ok
|
||||
****** code
|
||||
#+BEGIN_CENTER
|
||||
cd $NF_DESIGN_DIR/bitfiles && \
|
||||
mv simple_sume_switch.bit ${P4_PROJECT_NAME}.bit && \
|
||||
cp $P4_PROJECT_DIR/testdata/config_writes.sh ./
|
||||
#+END_CENTER
|
||||
***** TODO run step 13:
|
||||
***** DONE run step 13:
|
||||
****** command
|
||||
#+BEGIN_CENTER
|
||||
cd $NF_DESIGN_DIR/bitfiles/ && sudo bash ./program_switch.sh
|
||||
|
||||
[13:18] rainbow:bitfiles% sudo bash
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# . ~nico/master-thesis/netpfga/bashinit
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# bash program_switch.sh
|
||||
#+END_CENTER
|
||||
****** DONE try1: paths not setup for root
|
||||
[14:54] rainbow:bitfiles% cd $NF_DESIGN_DIR/bitfiles/ && sudo bash ./program_switch.sh
|
||||
|
@ -2350,14 +2391,13 @@ nf2: ERROR while getting interface flags: No such device
|
|||
nf3: ERROR while getting interface flags: No such device
|
||||
|
||||
#+END_CENTER
|
||||
****** TODO try3: adjusting/analysing "./program_switch.sh"
|
||||
****** DONE try3: adjusting/analysing "./program_switch.sh"
|
||||
Calls another script
|
||||
#+BEGIN_CENTER
|
||||
|
||||
# Program the switch with the bit file and then configure the tables
|
||||
${SUME_SDNET}/tools/program_switch.sh switch_calc.bit config_writes.sh
|
||||
#+END_CENTER
|
||||
****** TODO try4: analyse ANOTHER program_switch.sh
|
||||
****** DONE try4: analyse ANOTHER program_switch.sh
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~/projects/P4-NetFPGA# find . -name program_switch.sh
|
||||
./contrib-projects/sume-sdnet-switch/projects/int/simple_sume_switch/bitfiles/program_switch.sh
|
||||
|
@ -2376,7 +2416,7 @@ Add set -x debugging, see real error
|
|||
#+BEGIN_CENTER
|
||||
|
||||
#+END_CENTER
|
||||
****** TODO try 5: reboot && retry
|
||||
****** DONE try 5: reboot && retry
|
||||
#+BEGIN_CENTER
|
||||
[9:24] rainbow:~% sudo -i
|
||||
root@rainbow:~# lsmod | grep riffa
|
||||
|
@ -2421,7 +2461,296 @@ sume_riffa 28672 0
|
|||
|
||||
#+END_CENTER
|
||||
|
||||
****** DONE try 6: after successful compile, missing switch_calc.bitcoin
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# bash program_switch.sh
|
||||
++ which vivado
|
||||
+ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado
|
||||
+ bitimage=switch_calc.bit
|
||||
+ configWrites=config_writes.sh
|
||||
+ '[' -z switch_calc.bit ']'
|
||||
+ '[' -z config_writes.sh ']'
|
||||
+ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']'
|
||||
+ rmmod sume_riffa
|
||||
+ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs switch_calc.bit
|
||||
rlwrap: warning: your $TERM is 'screen' but rlwrap couldn't find it in the terminfo database. Expect some problems.
|
||||
RUN loading image file.
|
||||
switch_calc.bit
|
||||
attempting to launch hw_server
|
||||
|
||||
****** Xilinx hw_server v2018.2
|
||||
**** Build date : Jun 14 2018-20:18:37
|
||||
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
|
||||
|
||||
INFO: hw_server application started
|
||||
INFO: Use Ctrl-C to exit hw_server application
|
||||
|
||||
INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121
|
||||
|
||||
|
||||
couldn't open "switch_calc.bit": no such file or directory
|
||||
invoked from within
|
||||
"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}"
|
||||
(procedure "::tcf::cache_eval_with_progress" line 2)
|
||||
invoked from within
|
||||
"::tcf::cache_eval_with_progress [dict get $arg chan] [list process_tcf_actions_cache_client $argvar] $progress"
|
||||
(procedure "process_tcf_actions" line 1)
|
||||
invoked from within
|
||||
"process_tcf_actions $arg ::xsdb::print_progress"
|
||||
(procedure "fpga" line 430)
|
||||
invoked from within
|
||||
"fpga -f $bitimage"
|
||||
(file "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl" line 33)
|
||||
+ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh
|
||||
Check programming FPGA or Reboot machine !
|
||||
+ rmmod sume_riffa
|
||||
rmmod: ERROR: Module sume_riffa is not currently loaded
|
||||
+ modprobe sume_riffa
|
||||
+ ifconfig nf0 up
|
||||
nf0: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf1 up
|
||||
nf1: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf2 up
|
||||
nf2: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf3 up
|
||||
nf3: ERROR while getting interface flags: No such device
|
||||
+ bash config_writes.sh
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles#
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Debugging why the bitfile is missing -> WRONG name!
|
||||
Analysing program_switch.sh
|
||||
|
||||
|
||||
#+BEGIN_CENTER
|
||||
[13:22] rainbow:bitfiles% ls
|
||||
config_writes.sh minip4.bit program_switch.sh README
|
||||
[13:24] rainbow:bitfiles%
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
switch_calc.bit HARDCODED incorrectly in the script
|
||||
|
||||
#+BEGIN_CENTER
|
||||
# Program the switch with the bit file and then configure the tables
|
||||
${SUME_SDNET}/tools/program_switch.sh minip4.bit config_writes.sh
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Output of programming
|
||||
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# bash program_switch.sh
|
||||
++ which vivado
|
||||
+ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado
|
||||
+ bitimage=minip4.bit
|
||||
+ configWrites=config_writes.sh
|
||||
+ '[' -z minip4.bit ']'
|
||||
+ '[' -z config_writes.sh ']'
|
||||
+ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']'
|
||||
+ rmmod sume_riffa
|
||||
+ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs minip4.bit
|
||||
rlwrap: warning: your $TERM is 'screen' but rlwrap couldn't find it in the terminfo database. Expect some problems.
|
||||
RUN loading image file.
|
||||
minip4.bit
|
||||
attempting to launch hw_server
|
||||
|
||||
****** Xilinx hw_server v2018.2
|
||||
**** Build date : Jun 14 2018-20:18:37
|
||||
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
|
||||
|
||||
INFO: hw_server application started
|
||||
INFO: Use Ctrl-C to exit hw_server application
|
||||
|
||||
INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121
|
||||
|
||||
100% 11MB 1.7MB/s 00:06
|
||||
+ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh
|
||||
Check programming FPGA or Reboot machine !
|
||||
+ rmmod sume_riffa
|
||||
rmmod: ERROR: Module sume_riffa is not currently loaded
|
||||
+ modprobe sume_riffa
|
||||
+ ifconfig nf0 up
|
||||
nf0: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf1 up
|
||||
nf1: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf2 up
|
||||
nf2: ERROR while getting interface flags: No such device
|
||||
+ ifconfig nf3 up
|
||||
nf3: ERROR while getting interface flags: No such device
|
||||
+ bash config_writes.sh
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles#
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
After reboot:
|
||||
#+BEGIN_CENTER
|
||||
[13:27] rainbow:~% lspci
|
||||
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15d0
|
||||
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 15d1
|
||||
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
|
||||
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
|
||||
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
|
||||
00:01.6 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15d3
|
||||
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
|
||||
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15db
|
||||
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 15dc
|
||||
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
|
||||
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
|
||||
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e8
|
||||
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15e9
|
||||
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ea
|
||||
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15eb
|
||||
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ec
|
||||
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ed
|
||||
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ee
|
||||
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 15ef
|
||||
10:00.0 Memory controller: Xilinx Corporation Device 7028
|
||||
15:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset USB 3.1 xHCI Controller (rev 02)
|
||||
15:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset SATA Controller (rev 02)
|
||||
15:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43b2 (rev 02)
|
||||
1d:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
1d:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
1d:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
1d:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
1d:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
1d:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
|
||||
24:00.0 Network controller: Intel Corporation Dual Band Wireless-AC 3168NGW [Stone Peak] (rev 10)
|
||||
25:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)
|
||||
38:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c8)
|
||||
38:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de
|
||||
38:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 15df
|
||||
38:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e0
|
||||
38:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15e1
|
||||
38:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3
|
||||
39:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61)
|
||||
[13:27] rainbow:~%
|
||||
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# lsmod | grep sume_riffa
|
||||
sume_riffa 28672 0
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles#
|
||||
[ 187.401378] sume_riffa: loading out-of-tree module taints kernel.
|
||||
[ 187.401449] sume_riffa: module verification failed: signature and/or required key missing - tainting kernel
|
||||
[ 187.402281] NetFPGA SUME (RIFFA DMA) version $Revision: 1.34 $
|
||||
[ 187.402341] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: enabling device (0000 -> 0002)
|
||||
[ 187.402563] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] # of channels: 2
|
||||
[ 187.402565] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus interface width: 128
|
||||
[ 187.402567] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus master enabled: 1
|
||||
[ 187.402568] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated link width: 8
|
||||
[ 187.402569] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated rate width: 2500 MTs
|
||||
[ 187.402571] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max downstream payload: 512 B
|
||||
[ 187.402572] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max upstream payload: 128 B
|
||||
[ 187.402599] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 0 Ethernet address 02:53:55:4d:45:00
|
||||
[ 187.402604] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 1 Ethernet address 02:53:55:4d:45:01
|
||||
[ 187.402609] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 2 Ethernet address 02:53:55:4d:45:02
|
||||
[ 187.402613] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 3 Ethernet address 02:53:55:4d:45:03
|
||||
[ 187.427036] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: renamed from nf0
|
||||
[ 187.441436] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename7: renamed from nf3
|
||||
[ 187.465095] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 nf1: up
|
||||
[ 187.465218] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename6: renamed from nf2
|
||||
[ 187.493947] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: up
|
||||
[ 187.504797] amd_iommu_report_page_fault: 28 callbacks suppressed
|
||||
[ 187.504801] AMD-Vi: Event logged [IO_PAGE_FAULT device=10:00.7 domain=0x0000 address=0xffff4000 flags=0x0050]
|
||||
[ 188.421105] IPv6: ADDRCONF(NETDEV_CHANGE): nf1: link becomes ready
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles#
|
||||
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles# ip l
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
2: enp37s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
|
||||
link/ether 70:85:c2:ad:62:79 brd ff:ff:ff:ff:ff:ff
|
||||
3: wlp36s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
|
||||
link/ether dc:8b:28:47:5c:f7 brd ff:ff:ff:ff:ff:ff
|
||||
4: enp16s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
|
||||
link/ether 02:53:55:4d:45:00 brd ff:ff:ff:ff:ff:ff
|
||||
5: nf1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
|
||||
link/ether 02:53:55:4d:45:01 brd ff:ff:ff:ff:ff:ff
|
||||
6: rename6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
||||
link/ether 02:53:55:4d:45:02 brd ff:ff:ff:ff:ff:ff
|
||||
7: rename7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
|
||||
link/ether 02:53:55:4d:45:03 brd ff:ff:ff:ff:ff:ff
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/simple_sume_switch/bitfiles#
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
|
||||
***** TODO Step 14: test the card / switch
|
||||
****** try1: adding ips, using tcpdump
|
||||
******* testing enp16s0
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~# tcpdump -ni enp16s0
|
||||
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
|
||||
listening on enp16s0, link-type EN10MB (Ethernet), capture size 262144 bytes
|
||||
13:33:53.952947 IP6 fe80::53:55ff:fe4d:4500 > ff02::2: ICMP6, router solicitation, length 16
|
||||
13:33:55.404587 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:34:02.242610 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
13:34:03.263792 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
13:34:04.287910 IP6 2001:db8::1 > ff02::1:ff00:2: ICMP6, neighbor solicitation, who has 2001:db8::2, length 32
|
||||
13:34:07.429549 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:53:55:4d:45:00, length 288
|
||||
13:34:25.415196 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:34:55.418304 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:35:12.381120 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:53:55:4d:45:00, length 288
|
||||
13:35:25.420868 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:35:55.423875 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:36:17.384654 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:53:55:4d:45:00, length 288
|
||||
13:36:25.427542 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:36:55.431733 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:37:20.483400 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:53:55:4d:45:00, length 288
|
||||
13:37:25.435735 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:37:54.556948 IP6 fe80::53:55ff:fe4d:4500 > ff02::2: ICMP6, router solicitation, length 16
|
||||
13:37:55.438238 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
13:38:25.384418 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:53:55:4d:45:00, length 288
|
||||
13:38:25.442805 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
|
||||
#+END_CENTER
|
||||
******* Testing nf1
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:/etc/network# ip addr add 2001:db8:1::1/64 dev nf1
|
||||
root@rainbow:/etc/network#
|
||||
|
||||
root@rainbow:~# tcpdump -ni nf1
|
||||
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
|
||||
listening on nf1, link-type EN10MB (Ethernet), capture size 262144 bytes
|
||||
13:39:11.947770 IP6 fe80::53:55ff:fe4d:4501 > ff02::16: HBH ICMP6, multicast listener report v2, 3 group record(s), length 68
|
||||
13:39:12.011981 IP6 :: > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:1::1, length 32
|
||||
13:39:12.799761 IP6 fe80::53:55ff:fe4d:4501 > ff02::16: HBH ICMP6, multicast listener report v2, 3 group record(s), length 68
|
||||
13:39:14.064981 IP6 2001:db8:1::1.5353 > ff02::fb.5353: 0*- [0q] 2/0/0 (Cache flush) PTR rainbow.local., (Cache flush) AAAA 2001:db8:1::1 (139)
|
||||
13:39:16.251534 IP6 2001:db8:1::1.5353 > ff02::fb.5353: 0*- [0q] 2/0/0 (Cache flush) PTR rainbow.local., (Cache flush) AAAA 2001:db8:1::1 (139)
|
||||
13:39:25.449875 LLDP, length 212: rainbow.place6.ungleich.ch
|
||||
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Rebooting again
|
||||
|
||||
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~# modprobe sume_riffa
|
||||
root@rainbow:~# dmesg | tail -n 20
|
||||
[ 88.460898] NetFPGA SUME (RIFFA DMA) version $Revision: 1.34 $
|
||||
[ 88.461136] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] # of channels: 2
|
||||
[ 88.461138] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus interface width: 128
|
||||
[ 88.461140] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus master enabled: 1
|
||||
[ 88.461141] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated link width: 8
|
||||
[ 88.461143] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated rate width: 2500 MTs
|
||||
[ 88.461144] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max downstream payload: 512 B
|
||||
[ 88.461145] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max upstream payload: 128 B
|
||||
[ 88.461168] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 0 Ethernet address 02:53:55:4d:45:00
|
||||
[ 88.461173] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 1 Ethernet address 02:53:55:4d:45:01
|
||||
[ 88.461177] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 2 Ethernet address 02:53:55:4d:45:02
|
||||
[ 88.461182] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 3 Ethernet address 02:53:55:4d:45:03
|
||||
[ 88.481731] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: renamed from nf3
|
||||
[ 88.502173] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename6: renamed from nf2
|
||||
[ 88.526514] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename4: renamed from nf0
|
||||
[ 88.542069] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: up
|
||||
[ 88.543090] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename5: renamed from nf1
|
||||
[ 89.497027] IPv6: ADDRCONF(NETDEV_CHANGE): enp16s0: link becomes ready
|
||||
[ 89.497964] amd_iommu_report_page_fault: 28 callbacks suppressed
|
||||
[ 89.497967] AMD-Vi: Event logged [IO_PAGE_FAULT device=10:00.7 domain=0x0000 address=0xffff4000 flags=0x0050]
|
||||
root@rainbow:~#
|
||||
|
||||
#+END_CENTER
|
||||
***** 2019-05-26, netfpga integration
|
||||
|
||||
#+BEGIN_CENTER
|
||||
|
@ -2429,6 +2758,115 @@ sume_riffa 28672 0
|
|||
[10:56] rainbow:projects% ln -s ~/master-thesis/netpfga/minip4
|
||||
[10:56] rainbow:projects%
|
||||
|
||||
root@rainbow:~# ip l s enp16s0 up
|
||||
root@rainbow:~# tcpdump -ni enp16s0
|
||||
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
|
||||
listening on enp16s0, link-type EN10MB (Ethernet), capture size 262144 bytes
|
||||
|
||||
[ 88.460460] sume_riffa: loading out-of-tree module taints kernel.
|
||||
[ 88.460534] sume_riffa: module verification failed: signature and/or required key missing - tainting kernel
|
||||
[ 88.460898] NetFPGA SUME (RIFFA DMA) version $Revision: 1.34 $
|
||||
[ 88.461136] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] # of channels: 2
|
||||
[ 88.461138] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus interface width: 128
|
||||
[ 88.461140] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] bus master enabled: 1
|
||||
[ 88.461141] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated link width: 8
|
||||
[ 88.461143] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] negotiated rate width: 2500 MTs
|
||||
[ 88.461144] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max downstream payload: 512 B
|
||||
[ 88.461145] NetFPGA SUME (RIFFA DMA) 0000:10:00.0: [riffa] max upstream payload: 128 B
|
||||
[ 88.461168] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 0 Ethernet address 02:53:55:4d:45:00
|
||||
[ 88.461173] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 1 Ethernet address 02:53:55:4d:45:01
|
||||
[ 88.461177] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 2 Ethernet address 02:53:55:4d:45:02
|
||||
[ 88.461182] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 (unnamed net_device) (uninitialized): Port 3 Ethernet address 02:53:55:4d:45:03
|
||||
[ 88.481731] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: renamed from nf3
|
||||
[ 88.502173] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename6: renamed from nf2
|
||||
[ 88.526514] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename4: renamed from nf0
|
||||
[ 88.542069] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 enp16s0: up
|
||||
[ 88.543090] NetFPGA SUME (RIFFA DMA) 0000:10:00.0 rename5: renamed from nf1
|
||||
[ 89.497027] IPv6: ADDRCONF(NETDEV_CHANGE): enp16s0: link becomes ready
|
||||
[ 89.497964] amd_iommu_report_page_fault: 28 callbacks suppressed
|
||||
[ 89.497967] AMD-Vi: Event logged [IO_PAGE_FAULT device=10:00.7 domain=0x0000 address=0xffff4000 flags=0x0050]
|
||||
[ 124.875633] device enp16s0 entered promiscuous mode
|
||||
root@rainbow:~#
|
||||
|
||||
|
||||
root@rainbow:~# ip addr add 2001:db8::1/64 dev enp16s0
|
||||
|
||||
13:45:04.211832 IP6 :: > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8::1, length 32
|
||||
13:45:05.555657 IP6 2001:db8::1.5353 > ff02::fb.5353: 0*- [0q] 2/0/0 (Cache flush) PTR rainbow.local., (Cache flush) AAAA 2001:db8::1 (139)
|
||||
13:45:07.718554 IP6 2001:db8::1.5353 > ff02::fb.5353: 0*- [0q] 2/0/0 (Cache flush) PTR rainbow.local., (Cache flush) AAAA 2001:db8::1 (139)
|
||||
13:45:23.556081 LLDP, length 216: rainbow.place6.ungleich.ch
|
||||
#+END_CENTER
|
||||
|
||||
-> no replies
|
||||
|
||||
Testing with the supplied tool
|
||||
|
||||
#+BEGIN_CENTER
|
||||
root@rainbow:~/master-thesis/netpfga/minip4/sw/hw_test_tool# python switch_calc_tester.py
|
||||
SIOCSIFADDR: No such device
|
||||
eth1: ERROR while getting interface flags: No such device
|
||||
SIOCSIFNETMASK: No such device
|
||||
tcpdump: eth1: No such device exists
|
||||
(SIOCGIFHWADDR: No such device)
|
||||
The HW testing tool for the switch_calc design
|
||||
type help to see all commands
|
||||
testing>
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Broken again. Debug manually.
|
||||
|
||||
#+BEGIN_CENTER
|
||||
|
||||
|
||||
[13:49] rainbow:~% python
|
||||
Python 2.7.16 (default, Apr 6 2019, 01:42:57)
|
||||
[GCC 8.3.0] on linux2
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>> from scapy.all import *
|
||||
>>> MAC1 = "08:11:11:11:11:08"
|
||||
>>> MAC2 = "08:22:22:22:22:08"
|
||||
>>> pkt = Ether(dst=MAC2, src=MAC1)
|
||||
>>> srp1(pkt, iface="enp16s0")
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 434, in srp1
|
||||
ans, _ = srp(*args, **kargs)
|
||||
File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 416, in srp
|
||||
s = conf.L2socket(promisc=promisc, iface=iface, filter=filter, nofilter=nofilter, type=type)
|
||||
File "/usr/lib/python2.7/dist-packages/scapy/arch/linux.py", line 502, in __init__
|
||||
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type))
|
||||
File "/usr/lib/python2.7/socket.py", line 191, in __init__
|
||||
_sock = _realsocket(family, type, proto)
|
||||
socket.error: [Errno 1] Operation not permitted
|
||||
>>>
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
Try padding to 64 bytes
|
||||
|
||||
#+BEGIN_CENTER
|
||||
>>> len(pkt)
|
||||
14
|
||||
>>> 64-14
|
||||
50
|
||||
>>> RAW(50*"A")
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
NameError: name 'RAW' is not defined
|
||||
>>> Raw(50*"A")
|
||||
<Raw load='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' |>
|
||||
>>> pkg2 = pkt / Raw(50*"A")
|
||||
>>>
|
||||
>>> pkg2 = pkt / Raw(50*"A")
|
||||
>>> srp1(pkg2, iface="enp16s0")
|
||||
Begin emission:
|
||||
Finished sending 1 packets.
|
||||
|
||||
|
||||
tcpdump:
|
||||
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
**** DONE Understand a bit of xilinx/netfpga/vivado ~ somewhat
|
||||
|
|
|
@ -64,6 +64,10 @@ control TopPipe(inout Parsed_packet p,
|
|||
sume_metadata.dst_port = sume_metadata.src_port;
|
||||
}
|
||||
|
||||
action send_to_port1() {
|
||||
sume_metadata.dst_port = 1;
|
||||
}
|
||||
|
||||
action do_nothing() {
|
||||
EthAddr_t temp = p.ethernet.dstAddr;
|
||||
}
|
||||
|
@ -78,7 +82,8 @@ control TopPipe(inout Parsed_packet p,
|
|||
do_nothing;
|
||||
}
|
||||
size = 64;
|
||||
default_action = swap_eth_addresses;
|
||||
// default_action = swap_eth_addresses;
|
||||
default_action = send_to_port1;
|
||||
}
|
||||
|
||||
apply {
|
||||
|
|
Loading…
Reference in a new issue