426 Star 1.5K Fork 1.6K

GVPopenEuler/kernel

 / 详情

【HNS3】HNS3相关的特性

已完成
任务
创建于  
2022-11-22 16:32

(1)修复丢心跳问题,PF支持心跳恢复机制
(2)PF支持sysfs接口查询、配置lane数
(3)VF支持queue bonding mode

评论 (2)

xiaojiantao 创建了任务 2年前
openeuler-ci-bot 添加了
 
sig/Kernel
标签
2年前

lane数配置

root@fpga:/home# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 3000 qdisc noop state DOWN group default qlen 1000
    link/ether be:f4:2e:30:3c:4c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:45:20:ab:9b:21 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 3000 qdisc noop state DOWN group default qlen 1000
    link/ether 26:df:ef:42:bd:5f brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool i-i eth0
driver: hns3
version: 5.10.0+
firmware-version: 3.10.1.44
expansion-rom-version: 
bus-info: 0000:35:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# echo 4 > /sys/bus/pci/devices/0000:35:00.0/lane_num
[ 4318.181230][  T169] hns3 0000:35:00.0: mac speed/duplex config cmd failed -22.
sh: write error: Invalid argument
root@fpga:/home# 
root@fpga:/home# echo 1 > /sys/bus/pci/devices/0000:35:00.0/lane_num
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# csat /sys/bus/pci/devices/0000:35:00.0/lane_num
0
root@fpga:/home# echo 2 > /sys/bus/pci/devices/0000:35:00.0/lane_num
[ 4527.326990][  T169] hns3 0000:35:00.0: mac speed/duplex config cmd failed -22.
sh: write error: Invalid argument
root@fpga:/home# echo 8 > /sys/bus/pci/devices/0000:35:00.0/lane_num
[ 4541.250112][  T169] hns3 0000:35:00.0: mac speed/duplex config cmd failed -22.
sh: write error: Invalid argument
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# echo -1 > /sys/bus/pci/devices/0000:35:00.0/lane_num
[ 4581.951256][  T169] hns3 0000:35:00.0: input params of lane number format unmatch.
sh: write error: Invalid argument
root@fpga:/home# 
root@fpga:/home# checho 100 > /sys/bus/pci/devices/0000:35:00.0/lane_nu
sh: can't create /sys/bus/pci/devices/0000:35:00.0/lane_nu: Permission denied
root@fpga:/home# root@fpga:/home# echo 100 > /sys/bus/pci/devices/0000:35:00.0/lane_num
[ 4608.799078][  T169] hns3 0000:35:00.0: lane number only supports setting 1, 2, 4, 8.
sh: write error: Invalid argument
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# cat /sys/bus/pci/devices/0000:35:00.0/lane_num
0
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 

修复丢心跳

root@fpga:/home# insmod hnaroot@fpga:/home# insmod hnae3.ko 
[  201.041979][  T174] hnae3: module verification failed: signature and/or required key missing - tainting kernel
root@fpga:/home# insmod hclroot@fpga:/home# insmod hclge.root@fpga:/home# insmod hclge.ko 
[  208.389783][  T175] hclge is initializing
root@fpga:/home# insmod hclroot@fpga:/home# insmod hclgevroot@fpga:/home# insmod hclgevf.ko 
[  214.417163][  T176] hclgevf is initializing
root@fpga:/home# insmod hns3root@fpga:/home# insmod hns3.ko 
[  220.892557][  T177] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[  220.903392][  T177] hns3: Copyright (c) 2017 Huawei Corporation.
[  220.936616][  T177] hns3 0000:35:00.0: Failed to enable PASID
[  220.948226][  T177] hns3 0000:35:00.0: Adding to iommu group 3
[  220.995700][   T14] hns3 0000:35:00.0: The firmware version is 3.10.1.44
[  222.588169][   T14] hns3 0000:35:00.0: phc initializes ok!
[  222.602689][   T14] hns3 0000:35:00.0: hclge driver initialization finished.
[  222.613349][   T14] hns3 0000:35:00.0: using random MAC address be:**:**:**:3c:4c
[  222.825470][   T14] Generic PHY mii-0000:35:00.0:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=mii-0000:35:00.0:02, irq=POLL)
[  222.939616][  T177] hns3 0000:35:00.1: Failed to enable PASID
[  222.951697][  T177] hns3 0000:35:00.1: Adding to iommu group 4
[  222.979578][   T14] spi_master spi0: problem registering spi master
[  223.004497][  T179] hns3 0000:35:00.1: enabling device (0000 -> 0002)
[  223.031516][  T179] hns3 0000:35:00.1: The firmware version is 3.10.1.44
[  224.473537][  T179] hns3 0000:35:00.1: hclge driver initialization finished.
[  224.484985][  T179] hns3 0000:35:00.1: using random MAC address c2:**:**:**:9b:21
[  224.696682][  T179] Generic PHY mii-0000:35:00.1:06: attached PHY driver [Generic PHY] (mii_bus:phy_addr=mii-0000:35:00.1:06, irq=POLL)
[  224.857813][  T179] spi_master spi0: problem registering spi master
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth0 heartbeat off
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# dmesg -C
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth0 heartbeat off
root@fpga:/home# DMESdmesg
root@fpga:/home# root@fpga:/home# dmesg
root@fpga:/home# root@fpga:/home# dmesg
root@fpga:/home# root@fpga:/home# dmesg
root@fpga:/home# root@fpga:/home# dmesg
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags ethx heartbeat on0 heartbeat on
[  433.537291][  T189] hns3 0000:35:00.0 eth0: heartbeat is unsupported
netlink error: Operation not supported
root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ethtool --set-priv-flags eth0 heartbeat on
[  449.636699][  T190] hns3 0000:35:00.0 eth0: heartbeat is unsupported
netlink error: Operation not supported
root@fpga:/home# echo 1 /sys/class/net/eth0root@fpga:/home# echo 1 /sys/class/net/eth0/device/sriov_numvfs
1 /sys/class/net/eth0/device/sriov_numvfs
root@fpga:/home# root@fpga:/home# echo 1 /sys/class/net/eth0/device/sriov_numvfs 1 > /sys/class/net/eth0/device/sriov_numvfs
[  604.066151][  T169] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[  604.077299][  T169] pci 0000:35:01.0: enabling Extended Tags
[  604.112186][  T169] hns3 0000:35:01.0: Failed to enable PASID
[  604.123910][  T169] hns3 0000:35:01.0: Adding to iommu group 5
[  604.151757][  T179] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[  604.175446][  T179] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[  604.408127][  T179] hns3 0000:35:01.0: finished initializing hclgevf driver
[  604.427726][  T179] hns3 0000:35:01.0: using random MAC address 26:**:**:**:bd:5f
root@fpga:/home# [  604.788554][   T31] spi_master spi0: problem registering spi master

root@fpga:/home# 
root@fpga:/home# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether be:f4:2e:30:3c:4c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:45:20:ab:9b:21 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 26:df:ef:42:bd:5f brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth0 heartbeat off
root@fpga:/home# dmseesg
[  433.537291] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  449.636699] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  604.066151] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[  604.077299] pci 0000:35:01.0: enabling Extended Tags
[  604.112186] hns3 0000:35:01.0: Failed to enable PASID
[  604.123910] hns3 0000:35:01.0: Adding to iommu group 5
[  604.151757] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[  604.175446] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[  604.408127] hns3 0000:35:01.0: finished initializing hclgevf driver
[  604.427726] hns3 0000:35:01.0: using random MAC address 26:**:**:**:bd:5f
[  604.788554] spi_master spi0: problem registering spi master
root@fpga:/home# root@fpga:/home# dmesg
[  433.537291] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  449.636699] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  604.066151] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[  604.077299] pci 0000:35:01.0: enabling Extended Tags
[  604.112186] hns3 0000:35:01.0: Failed to enable PASID
[  604.123910] hns3 0000:35:01.0: Adding to iommu group 5
[  604.151757] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[  604.175446] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[  604.408127] hns3 0000:35:01.0: finished initializing hclgevf driver
[  604.427726] hns3 0000:35:01.0: using random MAC address 26:**:**:**:bd:5f
[  604.788554] spi_master spi0: problem registering spi master
root@fpga:/home# root@fpga:/home# dmesgroot@fpga:/home# ethtool --set-priv-flags eth0 heartbeat offn
[  971.877597][  T198] hns3 0000:35:00.0 eth0: heartbeat is unsupported
netlink error: Operation not supported
root@fpga:/home# [  972.394038][  T170] random: crng init done

root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ethtool --set-priv-flags eth0 heartbeat on
[  977.936016][  T199] hns3 0000:35:00.0 eth0: heartbeat is unsupported
netlink error: Operation not supported
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether be:f4:2e:30:3c:4c brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c2:45:20:ab:9b:21 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 26:df:ef:42:bd:5f brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth2 heartbeat on
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ethtool --set-priv-flags eth2 heartbeat onff
[ 1240.537723][  T203] hns3 0000:35:01.0 eth2: disable send heartbeat mailbox
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# [ 1249.411629][  T173] hns3 0000:35:00.0: vf 0 heartbeat timeout

root@fpga:/home# 
root@fpga:/home# ethtool --reset eth2 all
ETHTOOL_RESET 0xffffffff
Cannot issue ETHTOOL_RESET: Operation not supported
root@fpga:/home# 
root@fpga:/home# ethtool --reset eth0 all
ETHTOOL_RESET 0xffffffff
[ 1346.492633][  T205] hns3 0000:35:00.0 eth0: Setting reset type 6
[ 1346.501046][  T205] hns3 0000:35:00.0: received reset event, reset type is 6
Components reset:     0xffffffff
[ 1346.512007][  T173] hns3 0000:35:00.0: global reset requested
[ 1346.522407][    C0] hns3 0000:35:00.0: global reset interrupt
[ 1346.522565][    C1] hns3 0000:35:00.1: global reset interrupt
[ 1346.522903][    C3] hns3 0000:35:01.0: receive reset interrupt 0x20!
root@fpga:/home# [ 1346.636421][  T173] hns3 0000:35:00.1: prepare wait ok
[ 1346.652537][    T7] hns3 0000:35:01.0: prepare reset(0) wait done
[ 1346.653056][  T200] hns3 0000:35:00.0: prepare wait ok
[ 1347.084369][  T173] hns3 0000:35:00.1: The firmware version is 3.10.1.44
[ 1347.444300][  T173] hns3 0000:35:00.1: Reset done, hclge driver initialization finished.
[ 1347.883283][  T200] hns3 0000:35:00.0: The firmware version is 3.10.1.44
[ 1348.196711][  T200] hns3 0000:35:00.0: phc initializes ok!
[ 1348.246631][  T200] hns3 0000:35:00.0: Reset done, hclge driver initialization finished.
[ 1353.873355][    T7] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[ 1353.919263][    T7] hns3 0000:35:01.0: Reset done
[ 1362.380327][  T200] hns3 0000:35:00.0: vf 0 heartbeat timeout

root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth2  heartbeat on
[ 1409.891689][  T206] hns3 0000:35:01.0 eth2: enable send heartbeat mailbox
root@fpga:/home# [ 1411.384281][    T7] hns3 0000:35:00.0: VF 0 is alive!

root@fpga:/home# ifconfig eth0  mtu 3000
root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ifconfig eth0  mtu 300002  mtu 3000
root@fpga:/home# 
root@fpga:/home#  ethtool --set-priv-flags eth2 heartbeat off
[ 1501.655788][  T209] hns3 0000:35:01.0 eth2: disable send heartbeat mailbox
root@fpga:/home# 
root@fpga:/home# [ 1510.372432][    T7] hns3 0000:35:00.0: vf 0 heartbeat timeout

root@fpga:/home# 
root@fpga:/home# ifconfig eth0  mtu 2000
[ 1544.056628][  T210] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1544.067208][  T210] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
SIOCSIFMTU: Invalid argument
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth2 heartbeat on
[ 1676.185152][  T211] hns3 0000:35:01.0 eth2: enable send heartbeat mailbox
root@fpga:/home# 
root@fpga:/home# [ 1677.385197][    T7] hns3 0000:35:00.0: VF 0 is alive!

root@fpga:/home# 
root@fpga:/home# ifconfig eth0  mtu 2000 
[ 1688.224757][  T212] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1688.235237][  T212] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
SIOCSIFMTU: Invalid argument
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ifconfig eth0  mtu 2000 
[ 1694.029111][  T213] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1694.039665][  T213] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
SIOCSIFMTU: Invalid argument
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --set-priv-flags eth0 qb_enable on
root@fpga:/home# 
root@fpga:/home# root@fpga:/home# ethtool --set-priv-flags eth0 qb_enable onh02 qb_enable on
root@fpga:/home# 
root@fpga:/home# dmesg
[  433.537291] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  449.636699] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  604.066151] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[  604.077299] pci 0000:35:01.0: enabling Extended Tags
[  604.112186] hns3 0000:35:01.0: Failed to enable PASID
[  604.123910] hns3 0000:35:01.0: Adding to iommu group 5
[  604.151757] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[  604.175446] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[  604.408127] hns3 0000:35:01.0: finished initializing hclgevf driver
[  604.427726] hns3 0000:35:01.0: using random MAC address 26:**:**:**:bd:5f
[  604.788554] spi_master spi0: problem registering spi master
[  971.877597] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[  972.394038] random: crng init done
[  977.936016] hns3 0000:35:00.0 eth0: heartbeat is unsupported
[ 1240.537723] hns3 0000:35:01.0 eth2: disable send heartbeat mailbox
[ 1249.411629] hns3 0000:35:00.0: vf 0 heartbeat timeout
[ 1346.492633] hns3 0000:35:00.0 eth0: Setting reset type 6
[ 1346.501046] hns3 0000:35:00.0: received reset event, reset type is 6
[ 1346.512007] hns3 0000:35:00.0: global reset requested
[ 1346.522407] hns3 0000:35:00.0: global reset interrupt
[ 1346.522565] hns3 0000:35:00.1: global reset interrupt
[ 1346.522903] hns3 0000:35:01.0: receive reset interrupt 0x20!
[ 1346.636421] hns3 0000:35:00.1: prepare wait ok
[ 1346.652537] hns3 0000:35:01.0: prepare reset(0) wait done
[ 1346.653056] hns3 0000:35:00.0: prepare wait ok
[ 1347.084369] hns3 0000:35:00.1: The firmware version is 3.10.1.44
[ 1347.444300] hns3 0000:35:00.1: Reset done, hclge driver initialization finished.
[ 1347.883283] hns3 0000:35:00.0: The firmware version is 3.10.1.44
[ 1348.196711] hns3 0000:35:00.0: phc initializes ok!
[ 1348.246631] hns3 0000:35:00.0: Reset done, hclge driver initialization finished.
[ 1353.873355] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[ 1353.919263] hns3 0000:35:01.0: Reset done
[ 1362.380327] hns3 0000:35:00.0: vf 0 heartbeat timeout
[ 1409.891689] hns3 0000:35:01.0 eth2: enable send heartbeat mailbox
[ 1411.384281] hns3 0000:35:00.0: VF 0 is alive!
[ 1501.655788] hns3 0000:35:01.0 eth2: disable send heartbeat mailbox
[ 1510.372432] hns3 0000:35:00.0: vf 0 heartbeat timeout
[ 1544.056628] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1544.067208] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
[ 1676.185152] hns3 0000:35:01.0 eth2: enable send heartbeat mailbox
[ 1677.385197] hns3 0000:35:00.0: VF 0 is alive!
[ 1688.224757] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1688.235237] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
[ 1694.029111] hns3 0000:35:00.0: failed to set pf mtu for less than vport 1, mps = 3026.
[ 1694.039665] hns3 0000:35:00.0 eth0: failed to change MTU in hardware -22
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# 

QB

Shell> 
root@fpga:/home# 
root@fpga:/home# lsmod 
hns3 126976 0 - Live 0xffff800008d81000 (E)
hclgevf 81920 0 - Live 0xffff800008d6c000 (E)
hclge 344064 2 - Live 0xffff800008d17000 (E)
hnae3 16384 3 hns3,hclgevf,hclge, Live 0xffff800008d12000 (E)
pv680_mii 45056 0 - Live 0xffff800008d06000 (OE)
hns_mdio 20480 2 - Live 0xffff800008d00000 (E)
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ifconfig 1eth1 192.168.40.12
root@fpga:/home# 
root@fpga:/home# ping[  540.811277][   T34] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[  540.830853][    T7] hns3 0000:35:00.0 eth1: link up
 192.168.40.11
PING 192.168.40.11 (192.168.40.11): 56 data bytes
64 bytes from 192.168.40.11: seq=1 ttl=64 time=23.790 ms
64 bytes from 192.168.40.11: seq=2 ttl=64 time=20.624 ms
^C
--- 192.168.40.11 ping statistics ---
4 packets transmitted, 2 packets received, 50% packet loss
round-trip min/avg/max = 20.624/22.207/23.790 ms
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# lsip link show
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 96:cf:f1:c0:6d:4a brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether da:0b:e9:cd:1b:05 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 56:60:74:0f:a7:3b brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# echo 1 > /sys/class/net/eth1/device/sriov_numvfs
[  583.958556][  T170] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[  583.968105][  T170] pci 0000:35:01.0: enabling Extended Tags
[  584.006661][  T170] hns3 0000:35:01.0: Failed to enable PASID
[  584.019696][  T170] hns3 0000:35:01.0: Adding to iommu group 5
[  584.049651][  T180] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[  584.076555][  T180] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[  584.358382][  T180] hns3 0000:35:01.0: finished initializing hclgevf driver
[  584.377991][  T180] hns3 0000:35:01.0: using random MAC address 66:**:**:**:11:d4
root@fpga:/home# [  584.795413][   T33] spi_master spi0: problem registering spi master

root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 96:cf:f1:c0:6d:4a brd ff:ff:ff:ff:ff:ff
    inet 71.70.31.7/8 brd 71.255.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::94cf:f1ff:fec0:6d4a/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether da:0b:e9:cd:1b:05 brd ff:ff:ff:ff:ff:ff
    inet 192.168.40.12/24 brd 192.168.40.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::d80b:e9ff:fecd:1b05/64 scope link 
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 56:60:74:0f:a7:3b brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 66:e8:0b:24:11:d4 brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ip link show
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 96:cf:f1:c0:6d:4a brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether da:0b:e9:cd:1b:05 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 56:60:74:0f:a7:3b brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:e8:0b:24:11:d4 brd ff:ff:ff:ff:ff:ff
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ethtool --stet -pvriv-flags eth1 qb_enable on
root@fpga:/home# 
root@fpga:/home# ethtool --get -priv-flags eth1
ethtool: bad command line argument(s)
For more information run ethtool -h
root@fpga:/home# ethtool --show-priv-flags eth1
Private flags for eth1:
limit_promisc : off
tx_push_enable: on
qb_enable     : on
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# ip link set eth1 vf 0 trust on
root@fpga:/home# 
root@fpga:/home# 
root@fpga:/home# [  755.109127][  T160] random: dropbear: uninitialized urandom read (32 bytes read)
[  767.333399][  T160] random: dropbear: uninitialized urandom read (32 bytes read)
[  767.717255][  T207] random: dropbear: uninitialized urandom read (32 bytes read)
[  767.779483][  T209] random: dropbear: uninitialized urandom read (32 bytes read)
[  772.765958][  T219] random: dropbear: uninitialized urandom read (32 bytes read)
[  774.539056][  T171] random: crng init done

root@fpga:/home# 
root@fpga:/home# ls /rooroot@fpga:/home# ls /root/
nic_pkg.arm64.tar.gz
root@fpga:/home# 
root@fpga:/home# cd
root@fpga:/# ls
bin      home     lib64    root     sys      usr
dev      init     linuxrc  run      sysroot  var
etc      lib      proc     sbin     tmp
root@fpga:/# 
root@fpga:/# 
root@fpga:/# which iperf
root@fpga:/# 
root@fpga:/# 
root@fpga:/# 
root@fpga:/# 
root@fpga:/# which iperf
/bin/iperf
root@fpga:/# 
root@fpga:/# 
root@fpga:/# iperf -s &
root@fpga:/# ------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------

root@fpga:/# 
root@fpga:/# ethtool -i eth1
driver: hns3
version: 5.10.0+
firmware-version: 3.10.1.44
expansion-rom-version: 
bus-info: 0000:35:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
root@fpga:/# 
root@fpga:/# cat /sys/kerrnel/debug/hns3/00root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:000.root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_troot@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_tcam 
root@fpga:/# 
root@fpga:/# 
root@fpga:/# [  4] local 192.168.40.12 port 5001 connected with 192.168.40.11 port 36880

root@fpga:/# 
root@fpga:/# root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_tcam 
read result tcam key x(127):
1632e4fa
6b4a25f4
bbffb258
f7ffffff
f9ffffff
3f57d7f4
3f57d7f3
6fefffff
ffffec76
ffffffff
ffffffff
ffffffff
0001ffff
read result tcam key y(127):
e9cd1b05
94b5da0b
44004da7
08000000
06000000
c0a8280b
c0a8280c
90100000
00001389
00000000
00000000
00000000
00000000
root@fpga:/# CPU busy 0 early 55155 now 73885 delta 18730
cpu is busy;
L3 0 val 0xa95ea58;
l3c is busy
system is busy;
root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_tcam 
read result tcam key x(127):
1632e4fa
6b4a25f4
bbffb258
f7ffffff
f9ffffff
3f57d7f4
3f57d7f3
6fefffff
ffffec76
ffffffff
ffffffff
ffffffff
0001ffff
read result tcam key y(127):
e9cd1b05
94b5da0b
44004da7
08000000
06000000
c0a8280b
c0a8280c
90100000
00001389
00000000
00000000
00000000
00000000
root@fpga:/# root@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_tcam croot@fpga:/# cat /sys/kernel/debug/hns3/0000:35:00.0/fd/fd_counter 
func_id	hit_times
pf	135297
vf0	0
root@fpga:/# [ ID] Interval       Transfer     Bandwidth
[  4]  0.0-102.3 sec   226 MBytes  18.6 Mbits/sec

root@fpga:/# 
root@fpga:/# 

登录 后才可以发表评论

状态
负责人
项目
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
预计工期 (小时)
开始日期   -   截止日期
-
置顶选项
优先级
分支
参与者(2)
5329419 openeuler ci bot 1632792936 xiaojiantao-svishen
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助