我们需要将两个板子通过PCIE接在一起,目前一个板子为rc角色,一个板子ep 角色
两个通过线缆连接在一起,RC这边没能与EP,link up上
已验证:
单独修改RC电路,连接上PCIE 网卡可以识别到设备
请问这个问题怎么排除及解决,谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
20231120_13:58:55:259:BAR0: OKAY
20231120_13:58:55:259:BAR1: OKAY
20231120_13:58:55:259:BAR2: OKAY
20231120_13:58:55:260:BAR3: OKAY
20231120_13:58:55:332:BAR4: OKAY
20231120_13:58:55:785:BAR5: OKAY
20231120_13:58:55:785:
20231120_13:58:55:785:Interrupt tests
20231120_13:58:55:785:
20231120_13:58:55:785:SET IRQ TYPE TO LEGACY: OKAY
20231120_13:58:56:825:LEGACY IRQ: NOT OKAY
20231120_13:58:56:825:SET IRQ TYPE TO MSI: OKAY
20231120_13:58:56:825:MSI1: OKAY
20231120_13:58:56:825:MSI2: OKAY
20231120_13:58:57:833:MSI3: NOT OKAY
20231120_13:58:58:860:MSI4: NOT OKAY
20231120_13:58:59:883:MSI5: NOT OKAY
20231120_13:59:00:910:MSI6: NOT OKAY
20231120_13:59:27:553:SET IRQ TYPE TO MSI-X: OKAY
20231120_13:59:27:553:MSI-X1: OKAY
20231120_13:59:27:553:MSI-X2: OKAY
20231120_13:59:28:564:MSI-X3: NOT OKAY
20231120_13:59:29:588:MSI-X4: NOT OKAY
20231120_13:59:30:610:MSI-X5: NOT OKAY
20231120_13:59:31:639:MSI-X6: NOT OKAY
20231120_13:59:32:650:MSI-X7: NOT OKAY
20231120_13:59:33:771:MSI-X8: NOT OKAY
20231120_13:59:34:702:MSI-X9: NOT OKAY
20231120_13:59:35:725:MSI-X10: NOT OKAY
20231120_13:59:36:751:MSI-X11: NOT OKAY
20231120_13:59:37:775:MSI-X12: NOT OKAY
20231120_13:59:38:799:MSI-X13: NOT OKAY
20231120_13:59:39:821:MSI-X14: NOT OKAY
20231120_13:59:40:848:MSI-X15: NOT OKAY
请问一下,为什么测试中,中断选项会报错,怎样修改可以通过测试
请问一下4lane,按下面的测试方法
3.2.2.11. PCIe End Point — Processor SDK Linux for J784s4 Documentation
#mount -t configfs none /sys/kernel/config cd /sys/kernel/config/pci_ep/ mkdir functions/pci_epf_test/func1 echo 0x104c > functions/pci_epf_test/func1/vendorid echo 0xb00d > functions/pci_epf_test/func1/deviceid echo 2 > functions/pci_epf_test/func1/msi_interrupts echo 2 > functions/pci_epf_test/func1/msix_interrupts ln -s functions/pci_epf_test/func1 controllers/2900000.pcie-ep/ mkdir functions/pci_epf_test/func2 echo 0x104c > functions/pci_epf_test/func2/vendorid echo 0xb00d > functions/pci_epf_test/func2/deviceid echo 2 > functions/pci_epf_test/func2/msi_interrupts echo 2 > functions/pci_epf_test/func2/msix_interrupts ln -s functions/pci_epf_test/func2 controllers/2900000.pcie-ep/ mkdir functions/pci_epf_test/func3 echo 0x104c > functions/pci_epf_test/func3/vendorid echo 0xb00d > functions/pci_epf_test/func3/deviceid echo 2 > functions/pci_epf_test/func3/msi_interrupts echo 2 > functions/pci_epf_test/func3/msix_interrupts ln -s functions/pci_epf_test/func3 controllers/2900000.pcie-ep/ mkdir functions/pci_epf_test/func4 echo 0x104c > functions/pci_epf_test/func4/vendorid echo 0xb00d > functions/pci_epf_test/func4/deviceid echo 2 > functions/pci_epf_test/func4/msi_interrupts echo 2 > functions/pci_epf_test/func4/msix_interrupts ln -s functions/pci_epf_test/func4 controllers/2900000.pcie-ep/ mkdir functions/pci_epf_test/func5 echo 0x104c > functions/pci_epf_test/func5/vendorid echo 0xb00d > functions/pci_epf_test/func5/deviceid echo 2 > functions/pci_epf_test/func5/msi_interrupts echo 2 > functions/pci_epf_test/func5/msix_interrupts ln -s functions/pci_epf_test/func5 controllers/2900000.pcie-ep/ mkdir functions/pci_epf_test/func6 echo 0x104c > functions/pci_epf_test/func6/vendorid echo 0xb00d > functions/pci_epf_test/func6/deviceid echo 2 > functions/pci_epf_test/func6/msi_interrupts echo 2 > functions/pci_epf_test/func6/msix_interrupts ln -s functions/pci_epf_test/func6 controllers/2900000.pcie-ep/ echo 1 > controllers/2900000.pcie-ep/start
最大才2GB/s的速度,是测试方法不对嘛
[ 599.454943] WRITE => Size: 1 bytes DMA: YES Time: 0.000023405 seconds Rate: 41 KB/s [ 599.470922] [ 599.470922] WRITE => Size: 1024 bytes DMA: YES Time: 0.000012010 seconds Rate: 83263 KB/s [ 599.486922] [ 599.486922] WRITE => Size: 1025 bytes DMA: YES Time: 0.000011335 seconds Rate: 88308 KB/s [ 599.508274] [ 599.508274] WRITE => Size: 1024000 bytes DMA: YES Time: 0.000459040 seconds Rate: 2178459 KB/s [ 599.532269] [ 599.532269] WRITE => Size: 1024001 bytes DMA: YES Time: 0.000462540 seconds Rate: 2161977 KB/s [ 599.550919] [ 599.550919] READ => Size: 1 bytes DMA: YES Time: 0.000011330 seconds Rate: 86 KB/s [ 599.566918] [ 599.566918] READ => Size: 1024 bytes DMA: YES Time: 0.000012525 seconds Rate: 79840 KB/s [ 599.582920] [ 599.582920] READ => Size: 1025 bytes DMA: YES Time: 0.000013545 seconds Rate: 73900 KB/s [ 599.599688] [ 599.599688] READ => Size: 1024000 bytes DMA: YES Time: 0.000555825 seconds Rate: 1799127 KB/s [ 599.623565] [ 599.623565] READ => Size: 1024001 bytes DMA: YES Time: 0.000559655 seconds Rate: 1786816 KB/s [ 599.638956] [ 599.638956] COPY => Size: 1 bytes DMA: YES Time: 0.000042355 seconds Rate: 23 KB/s [ 599.654923] [ 599.654923] COPY => Size: 1024 bytes DMA: YES Time: 0.000012930 seconds Rate: 77339 KB/s [ 599.670922] [ 599.670922] COPY => Size: 1025 bytes DMA: YES Time: 0.000012345 seconds Rate: 81083 KB/s [ 599.695690] [ 599.695690] COPY => Size: 1024000 bytes DMA: YES Time: 0.000746510 seconds Rate: 1339566 KB/s [ 599.719719] [ 599.719719] COPY => Size: 1024001 bytes DMA: YES Time: 0.000776040 seconds Rate: 1288594 KB/s
这个测试方法是为了配置PCIe端点功能和进行性能测试。在测试中,您创建了6个名为func1到func6的PCIe端点功能,每个功能都有相同的vendorid和deviceid,并且都配置了2个MSI和2个MSIX中断。然后将这些功能连接到名为2900000.pcie-ep的控制器。
在测试的最后,您将控制器的start文件设置为1,以启动测试。测试结果显示了不同大小数据的读取、写入和复制速度。
至于速度只有2GB/s,这可能是由于测试方法不正确或者硬件/驱动程序的限制。你可能需要检查测试的配置和环境,以便找出速度低的原因。可能需要调整测试参数或者确认硬件和驱动程序的性能限制。
请问测试方法是类似如下测试的打印嘛,还是用专业仪器的测试结果 pcie2pcie吞吐量
3.2.2.11. PCIe End Point — Processor SDK Linux for J784s4 Documentation
[ 599.454943] WRITE => Size: 1 bytes DMA: YES Time: 0.000023405 seconds Rate: 41 KB/s [ 599.470922] [ 599.470922] WRITE => Size: 1024 bytes DMA: YES Time: 0.000012010 seconds Rate: 83263 KB/s [ 599.486922] [ 599.486922] WRITE => Size: 1025 bytes DMA: YES Time: 0.000011335 seconds Rate: 88308 KB/s [ 599.508274] [ 599.508274] WRITE => Size: 1024000 bytes DMA: YES Time: 0.000459040 seconds Rate: 2178459 KB/s [ 599.532269] [ 599.532269] WRITE => Size: 1024001 bytes DMA: YES Time: 0.000462540 seconds Rate: 2161977 KB/s [ 599.550919] [ 599.550919] READ => Size: 1 bytes DMA: YES Time: 0.000011330 seconds Rate: 86 KB/s [ 599.566918] [ 599.566918] READ => Size: 1024 bytes DMA: YES Time: 0.000012525 seconds Rate: 79840 KB/s [ 599.582920] [ 599.582920] READ => Size: 1025 bytes DMA: YES Time: 0.000013545 seconds Rate: 73900 KB/s [ 599.599688] [ 599.599688] READ => Size: 1024000 bytes DMA: YES Time: 0.000555825 seconds Rate: 1799127 KB/s [ 599.623565] [ 599.623565] READ => Size: 1024001 bytes DMA: YES Time: 0.000559655 seconds Rate: 1786816 KB/s [ 599.638956]
测试脚本
#!/bin/sh # SPDX-License-Identifier: GPL-2.0 echo "BAR tests" echo bar=0 while [ $bar -lt 2 ] do pcitest -b $bar bar=`expr $bar + 1` done echo echo "Interrupt tests" echo pcitest -i 0 pcitest -l pcitest -i 1 msi=1 while [ $msi -lt 3 ] do pcitest -m $msi msi=`expr $msi + 1` done echo pcitest -i 2 msix=1 while [ $msix -lt 4 ] do pcitest -x $msix msix=`expr $msix + 1` done echo echo "Read Tests" echo pcitest -i 1 pcitest -d -r -s 1 pcitest -d -r -s 1024 pcitest -d -r -s 1025 pcitest -d -r -s 1024000 pcitest -d -r -s 1024001 echo echo "Write Tests" echo pcitest -d -w -s 1 pcitest -d -w -s 1024 pcitest -d -w -s 1025 pcitest -d -w -s 1024000 pcitest -d -w -s 1024001 echo echo "Copy Tests" echo pcitest -d -c -s 1 pcitest -d -c -s 1024 pcitest -d -c -s 1025 pcitest -d -c -s 1024000 pcitest -d -c -s 1024001 echo