shocking 发表于 2023-5-5 14:12:10

在1028上DPDK怎么使用

请教下在1028板子上怎么测试OK1028A-C平台的DPDK环境
有具体的配置步骤吗?

lawkong 发表于 2023-5-5 17:43:31

本帖最后由 lawkong 于 2023-5-6 17:38 编辑

1.想把eno0 swp0 swp1 swp2 swp3全部配置成DPDK的转发端口 该怎么配置转发都走DPDK?设备树里面      
port@5 {
                status = "okay";
                /delete-property/ managed;
                /delete-property/ phy-handle;

                fixed-link {
                        speed = <1000>;
                        full-duplex;
                };
      };
};

&enetc_port3 {
      status = "okay";
};

dpdk-devbind -s
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12
lspci: Unable to load libkmod resources: error -12

Network devices using DPDK-compatible driver
============================================
0000:00:00.0 'Device e100' drv=vfio-pci unused=uio_pci_generic
0000:00:00.6 'Device e100' drv=vfio-pci unused=uio_pci_generic

Network devices using kernel driver
===================================
0000:00:00.2 'Device e100' if=eno2 drv=fsl_enetc unused=vfio-pci,uio_pci_generic
0000:00:00.5 'Device eef0' if=swp2,swp0,swp5,swp3,swp1 drv=mscc_felix unused=vfio-pci,uio_pci_generic

Other Network devices
=====================
0000:00:00.1 'Device e100' unused=vfio-pci,uio_pci_generic

2.增加的swp5是干什么用的?
3.我用dpdk-devbind -s查看网口驱动,意思swp2,swp0,swp5,swp3,swp1是绑定在一个物理设备上的?如果要使用这4个网口走DPDK转发改怎么绑定网口呢?
4.lspci: Unable to load libkmod resources: error -12这报的错是什么原因?


5.l2fwd -c 0x3 -n 1 -- -p 0x3 -q 1 --no-mac-updating这样能跑起来,-p 0x3是指使用port0和port1,这port0 port1指的是哪2个网卡?我如果要使用swp0,swp1,swp2,swp3是不是改成-p 0xf就行?但是这样会报错,log如下:

EAL: Detected 2 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:00:00.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 1957:e100 net_enetc
EAL:   using IOMMU type 1 (Type 1)
[ 1833.014106] vfio-pci 0000:00:00.0: timed out waiting for pending transaction; performing function level reset anyway
[ 1833.846126] vfio-pci 0000:00:00.0: timed out waiting for pending transaction; performing function level reset anyway
EAL: PCI device 0000:00:00.1 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 1957:e100 net_enetc
EAL: PCI device 0000:00:00.2 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 1957:e100 net_enetc
EAL: PCI device 0000:00:00.6 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 1957:e100 net_enetc
enetc_net: MAC is not available for this SI, set random MAC

enetc_net: New address: 3A:0E:67:C5:D9:A0

MAC updating disabled
EAL: Error - exiting with code: 1
Cause: Invalid portmask; possible (0x3)
[ 1835.062109] vfio-pci 0000:00:00.0: timed out waiting for pending transaction; performing function level reset anyway

6.我在板子上运行 l2fwd -c 0x3 -n 1 -- -p 0x3 -q 1 --no-mac-updating,eno0和swp0上分别接了2台windows PC配置了同一网段IP地址,互ping也不通抓不到包,l2fwd统计里面也没有包增加,是什么原因?



hai 发表于 2023-5-8 09:45:32

1.您是在什么位置看到的DPDK需要添加SWP5节点的?

   2.目前我们这边测试只是关于手册中的测试,并没有说添加SWP5节点。

   3.关于绑定swp网口的问题,您可以参考一下原厂的LSDK手册里面的介绍,应该可以解答您的问题。

   路径:原厂资料/LSDKUG_Rev20.04.pdf

   4.报错信息的问题我这边帮您找了个相关的报错解决办法,希望可以帮助到您。

   参考链接:lspci: Unable to load libkmod resources: error -12 怎么解决 - 我爱学习网 (5axxw.com)

   5.运行命令报错,这个和您的命令参数配置有关系,您着重看一下-C使用核数,-n内存通道数,还有-p使用的port几。
页: [1]
查看完整版本: 在1028上DPDK怎么使用