aregm / nff-go

NFF-Go -Network Function Framework for GO (former YANFF)
BSD 3-Clause "New" or "Revised" License
1.38k stars 154 forks source link

tutorial step10 vectorPacketProcess runtime error #661

Closed riggy2013 closed 5 years ago

riggy2013 commented 5 years ago

I ran into below error with tutorial step10, (step1-9 are good).

vagrant@nff-go-1:~/nff-go/examples/tutorial$ sudo ./step10 -------------------- Initializing DPDK -------------------- EAL: Detected 8 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: Probing VFIO support... EAL: PCI device 0000:00:03.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:08.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:09.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:0a.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em EAL: PCI device 0000:00:10.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100e net_e1000_em ------------------ Initializing scheduler ----------------- DEBUG: Scheduler can use cores: [0 1 2 3 4 5 6 7] Source MAC 0: 08:00:27:0b:70:78 Source MAC 1: 08:00:27:32:18:50 Destination MAC 0: 11:22:33:44:55:66 Destination MAC 1: 77:88:99:aa:bb:cc ---------------------- Creating ports --------------------- Warning! Port 0 does not support requested number of TX queues 2. Setting number of TX queues to 1 DEBUG: Port 0 MAC address: 08:00:27:0b:70:78 Warning! Port 1 does not support requested number of TX queues 2. Setting number of TX queues to 1 DEBUG: Port 1 MAC address: 08:00:27:32:18:50 ------------------ Starting FlowFunctions ----------------- DEBUG: Start SCHEDULER at 0 core DEBUG: Start STOP at scheduler 0 core DEBUG: Start new instance for receiverPort1 DEBUG: Start new clone for receiverPort1 instance 0 at 1 core DEBUG: Start new instance for segment1 DEBUG: Start new clone for segment1 instance 0 at 2 core panic: runtime error: index out of range

goroutine` 38 [running, locked to thread]:

github.com/intel-go/nff-go/flow.segmentProcess(0xa2dbe0, 0xc0001185a0, 0xc00011e268, 0x2, 0x2, 0xc00012e180, 0xc00012e1e0, 0xc000162800, 0xc000184000, 0x5, ...) /home/vagrant/nff-go/flow/flow.go:1472 +0xe6a github.com/intel-go/nff-go/flow.(instance).startNewClone.func1(0xc00010a780, 0x2, 0xc00010b380) /home/vagrant/nff-go/flow/scheduler.go:289 +0x236 created by github.com/intel-go/nff-go/flow.(instance).startNewClone /home/vagrant/nff-go/flow/scheduler.go:283 +0x2b2

Here is my lscpu output:

vagrant@nff-go-1:~/nff-go/examples/tutorial$ lscpu

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 46 bits physical, 48 bits virtual CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 63 Model name: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz Stepping: 2 CPU MHz: 2593.748 BogoMIPS: 5187.49 Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 35840K NUMA node0 CPU(s): 0-7 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase avx2 invpcid md_clear flush_l1d

gshimansky commented 5 years ago

Yes there was a bug in several tutorial examples which assigned an address of pointer instead of pointer value. Should be fixed in develop now.