428 Star 1.6K Fork 1.6K

GVPopenEuler/kernel

 / 详情

[HNS3]support wake on lan configuration and query & vf exception process in hns3 ras

已完成
任务
创建于  
2022-11-26 19:52

(1)adds process in ras module. New process will get detailed information about ras and do the most correct measures based on these accurate information.
(2)Implement configuration and query WOL by ethtool and added the needed device commands and structures to hns3.Add it do not support suspend resume interface.

评论 (2)

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

验证结果

ethtool -i eth1
[ 1284.368220] hns3 0000:35:00.0: cleaned 3, need to clean 1
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
estuary:/$ 
estuary:/$ ethtool -i th2
Cannot get driver information: No such device
estuary:/$ ethtool -i th22th2th2 eth2
driver: hns3
version: 5.10.0+
firmware-version: 3.10.1.44
expansion-rom-version: 
bus-info: 0000:35:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: yes
estuary:/$ 
estuary:/$ 
estuary:/$ 
estuary:/$ echo 2 > /sys/class/net/eth1/device/sriov_numvfs
[ 1465.583856] pci 0000:35:01.0: [19e5:a22f] type 00 class 0x020000
[ 1465.592053] pci 0000:35:01.0: enabling Extended Tags
[ 1465.631491] hns3 0000:35:01.0: Failed to enable PASID
[ 1465.643129] hns3 0000:35:01.0: Adding to iommu group 5
[ 1465.667546] hns3 0000:35:01.0: enabling device (0000 -> 0002)
[ 1465.689812] hns3 0000:35:01.0: The firmware version is 3.10.1.44
[ 1465.884317] hns3 0000:35:01.0: finished initializing hclgevf driver
[ 1465.902500] hns3 0000:35:01.0: using random MAC address 22:**:**:**:67:02
[ 1466.179516] pci 0000:35:01.1: [19e5:a22f] type 00 class 0x020000
[ 1466.190349] pci 0000:35:01.1: enabling Extended Tags
[ 1466.227328] hns3 0000:35:01.1: Failed to enable PASID
[ 1466.238034] hns3 0000:35:01.1: Adding to iommu group 6
[ 1466.261134] hns3 0000:35:01.1: enabling device (0000 -> 0002)
[ 1466.288213] hns3 0000:35:01.1: The firmware version is 3.10.1.44
[ 1466.472054] hns3 0000:35:01.1: finished initializing hclgevf driver
[ 1466.488406] hns3 0000:35:01.1: using random MAC address 62:**:**:**:49:67
estuary:/$ 
estuary:/$ 
estuary:/$ 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: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether d2:02:23:c2:00:95 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 4a:5e:6f:21:a1:50 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.120/24 brd 192.168.100.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::485e:6fff:fe21:a150/64 scope link 
       valid_lft forever preferred_lft forever
5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 8a:51:82:a5:1a:8e brd ff:ff:ff:ff:ff:ff
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 22:3e:20:8c:67:02 brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 62:b2:81:8b:49:67 brd ff:ff:ff:ff:ff:ff
estuary:/$ 
estuary:/$ 
estuary:/$ which hiko ptooltest
/usr/bin/hikptooltest
estuary:/$ 
estuary:/$ 
estuary:/$ hikptooltest reg -i eth3 -a  0x880058 -v 0xFFFF
[ 1508.355182] VF is not supported.
write addr 0x880058 value 0xffff failed! ret = -22.
[ ERROR ] hikptooltest command error(-22): reg_write_cmd execute failed!
hikptooltest[297]: [2021-06-24 09:27:57] [1624526877.444570] [unknown@local] [hikptooltest reg -i eth3 -a 0x880058 -v 0xFFFF] [09:27:57] [0.62153] [FAILED<-22>].

estuary:/$ 
estuary:/$ hikptooltest reg -i eth3 -a  0x880058 -v 0x100
[ 1518.504361] VF is not supported.
write addr 0x880058 value 0x100 failed! ret = -22.
[ ERROR ] hikptooltest command error(-22): reg_write_cmd execute failed!
hikptooltest[298]: [2021-06-24 09:28:07] [1624526887.602740] [unknown@local] [hikptooltest reg -i eth3 -a 0x880058 -v 0x100] [09:28:07] [0.56003] [FAILED<-22>].

estuary:/$ 
estuary:/$ 
estuary:/$ lsmod
hns3_cae 53248 0 - Live 0xffff8000095d6000 (O)
hns3 118784 0 - Live 0xffff8000095b8000
hclgevf 69632 0 - Live 0xffff8000095a6000
hclge 294912 2 - Live 0xffff80000955d000
hnae3 16384 3 hns3,hclgevf,hclge, Live 0xffff800009558000
vfio_iommu_type1 45056 0 - Live 0xffff80000954c000
vfio_pci 73728 0 - Live 0xffff800009539000
vfio_virqfd 16384 1 vfio_pci, Live 0xffff800009534000
vfio 36864 2 vfio_iommu_type1,vfio_pci, Live 0xffff80000952a000
pv680_mii 36864 0 - Live 0xffff800009520000 (O)
estuary:/$ 
estuary:/$ 
estuary:/$ 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: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether d2:02:23:c2:00:95 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 4a:5e:6f:21:a1:50 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.120/24 brd 192.168.100.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::485e:6fff:fe21:a150/64 scope link 
       valid_lft forever preferred_lft forever
5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 8a:51:82:a5:1a:8e brd ff:ff:ff:ff:ff:ff
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 22:3e:20:8c:67:02 brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 62:b2:81:8b:49:67 brd ff:ff:ff:ff:ff:ff
estuary:/$ 
estuary:/$ 
estuary:/$ 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: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether d2:02:23:c2:00:95 brd ff:ff:ff:ff:ff:ff
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 4a:5e:6f:21:a1:50 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
    vf 1     link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking off, link-state auto, trust off
5: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 8a:51:82:a5:1a:8e brd ff:ff:ff:ff:ff:ff
6: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 22:3e:20:8c:67:02 brd ff:ff:ff:ff:ff:ff
7: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 62:b2:81:8b:49:67 brd ff:ff:ff:ff:ff:ff
estuary:/$ 
estuary:/$ 
estuary:/$ hikptooltest reg -i eth2 -a  0x880058 -v 0xFFFF
hikptooltest[302]: [2021-06-24 09:30:32] [1624527032.139037] [unknown@local] [hikptooltest reg -i eth2 -a 0x880058 -v 0xFFFF] [09:30:32] [0.38353] [SUCCEED<0>].

estuary:/$ 
estuary:/$ hikptooltest reg -i eth2 -a  0x880058 -v 0x100
hikptooltest[303]: [2021-06-24 09:30:59] [1624527059.985488] [unknown@local] [hikptooltest reg -i eth2 -a 0x880058 -v 0x100] [09:31:00] [0.36787] [SUCCEED<0>].

estuary:/$ 
estuary:/$ 
estuary:/$ 
estuary:/$ ifconfig eth2 up
[ 1774.218691] 8021q: adding VLAN 0 to HW filter on device eth2
estuary:/$ [ 1776.291580] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready

estuary:/$ [ 1776.752994] hns3 0000:35:00.1 eth2: link up
[ 1781.870073] hns3 0000:35:00.1 eth2: DQL info last_cnt: 90, queued: 90, adj_limit: 0, completed: 0
[ 1781.880233] hns3 0000:35:00.1 eth2: queue state: 0x6, delta msecs: 5528
[ 1781.887523] hns3 0000:35:00.1 eth2: tx_timeout count: 1, queue id: 0, SW_NTU: 0x1, SW_NTC: 0x0, napi state: 16
[ 1781.898010] hns3 0000:35:00.1 eth2: tx_pkts: 0, tx_bytes: 0, sw_err_cnt: 0, tx_pending: 0
[ 1781.906569] hns3 0000:35:00.1 eth2: seg_pkt_cnt: 0, tx_more: 0, restart_queue: 0, tx_busy: 0
[ 1781.915355] hns3 0000:35:00.1 eth2: tx_push: 1, tx_mem_doorbell: 0
[ 1781.942690] hns3 0000:35:00.1 eth2: tx_pause_cnt: 0, rx_pause_cnt: 0
[ 1781.949755] hns3 0000:35:00.1 eth2: BD_NUM: 0x7f HW_HEAD: 0x0, HW_TAIL: 0x1, BD_ERR: 0x0, INT: 0x1
[ 1781.959387] hns3 0000:35:00.1 eth2: RING_EN: 0x1, TC: 0x0, FBD_NUM: 0x1 FBD_OFT: 0x0, EBD_NUM: 0x3ff, EBD_OFT: 0x0
[ 1781.970460] hns3 0000:35:00.1: received reset event, reset type is 5
[ 1781.979619] hns3 0000:35:00.1: PF reset requested
[ 1782.009660] hns3 0000:35:00.1 eth2: link down

estuary:/$ [ 1783.175535] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1783.186678] hns3 0000:35:00.1: send function reset cmd fail, status =-52
[ 1783.194965] hns3 0000:35:00.1: asserting function reset fail -52!
[ 1783.202648] hns3 0000:35:00.1: re-schedule reset task(1)
[ 1783.942624] hns3 0000:35:01.1: cleaned 0, need to clean 1
[ 1783.952517] hns3 0000:35:01.1: VF failed(=-52) to send mbx message to PF
[ 1783.960791] hns3 0000:35:01.1: VF sends keep alive cmd failed(=-52)
[ 1784.350696] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1784.359990] hns3 0000:35:00.1: set vf(0) rst failed -52!
[ 1784.367168] hns3 0000:35:00.1: re-schedule reset task(2)
[ 1784.522405] hns3 0000:35:00.1: cleaned 3, need to clean 1
[ 1785.666822] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1785.676489] hns3 0000:35:00.1: send function reset cmd fail, status =-52
[ 1785.684741] hns3 0000:35:00.1: asserting function reset fail -52!
[ 1785.691930] hns3 0000:35:00.1: re-schedule reset task(3)
[ 1786.059271] hns3 0000:35:01.0: cleaned 0, need to clean 1
[ 1786.067668] hns3 0000:35:01.0: VF failed(=-52) to send mbx message to PF
[ 1786.075892] hns3 0000:35:01.0: VF sends keep alive cmd failed(=-52)
[ 1786.851210] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1786.863250] hns3 0000:35:00.1: set vf(0) rst failed -52!
[ 1786.869610] hns3 0000:35:00.1: re-schedule reset task(4)
[ 1787.026922] hns3 0000:35:00.1: cleaned 3, need to clean 1
[ 1787.029386] hns3 0000:35:01.1: cleaned 2, need to clean 1
[ 1788.167288] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1788.176013] hns3 0000:35:00.1: send function reset cmd fail, status =-52
[ 1788.183562] hns3 0000:35:00.1: asserting function reset fail -52!
[ 1788.190457] hns3 0000:35:00.1: re-schedule reset task(5)
[ 1789.335495] hns3 0000:35:00.1: cleaned 0, need to clean 1
[ 1789.343759] hns3 0000:35:00.1: set vf(0) rst failed -52!
[ 1789.350147] hns3 0000:35:00.1: Reset fail!
[ 1789.356002] hns3 0000:35:00.1: dump reset info:
[ 1789.356002] PF reset count: 0
[ 1789.356002] FLR reset count: 0
[ 1789.356002] GLOBAL reset count: 0
[ 1789.356002] IMP reset count: 0
[ 1789.356002] reset done count: 0
[ 1789.356002] HW reset done count: 0
[ 1789.356002] reset count: 6
[ 1789.356002] reset fail count: 5
[ 1789.356002] vector0 interrupt enable status: 0x1
[ 1789.356002] reset interrupt source: 0x0
[ 1789.356002] reset interrupt status: 0x0
[ 1789.356002] RAS interrupt status: 0x0
[ 1789.356002] hardware reset status: 0x0
[ 1789.356002] handshake status: 0x10080
[ 1789.356002] function reset status: 0x1
[ 1789.356002] hdev state: 0x292
[ 1789.534927] hns3 0000:35:01.0: cleaned 2, need to clean 1

estuary:/$ 

zhengzengkai 通过合并 Pull Request !822: release 5.10.0-130.0.0任务状态待办的 修改为已完成 2年前

登录 后才可以发表评论

状态
负责人
项目
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

搜索帮助