[Bug Description]
[Steps to Reproduce] 1) install VM 2)apt install –y bridge-utils 3)echo 1 > /sys/class/net/eth0/device/sriov_numvfs ethtool –i eth0v0 brctl addbr br00 ifconfig br00 5.5.5.1/24 brctl addif br00 eth0 brctl addif br00 eth01 virsh start vm1 virsh start vm2
vim sl1.xml <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x7d' slot='0x01' function='0x7'/> </source> </hostdev> vim sl2.xml virsh attach-device vm1 sl1.xml virsh attach-device vm2 sl2.xml
TCP:netperf -H <Server IP> -t TCP_STREAM –l 60 -- -m 1472
UCP:netperf -H <Server IP> -t UDP_STREAM –l 60 -- -m 1472
[Actual Results] vm crash
[Expected Results] vm is ok
[Reproducibility] 100%
[Additional information] (Firmware version, kernel version, affected hardware, etc. if required): [ 1273.099819] pci 0000:7c:00.0: AER: Device recovery successful [ 1273.099829] hns3 0000:7d:00.2: AER: aer_status: 0x00000000, aer_mask: 0x00000000 [ 1273.107205] hns3 0000:7d:00.2: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID [ 1273.112484] hns3 0000:7d:00.0: cleaned 0, need to clean 1 [ 1273.115095] hns3 0000:7d:00.0: get link status cmd failed -52 [ 1273.115100] hns3 0000:7d:00.2: AER: aer_uncor_severity: 0x00000000 [ 1273.127000] hns3 0000:7d:00.0: PCI error detected, state(=1)!! [ 1273.127027] hns3 0000:7d:00.1: PCI error detected, state(=1)!! [ 1273.127036] hns3 0000:7d:00.2: PCI error detected, state(=1)!! [ 1273.127045] hns3 0000:7d:00.3: PCI error detected, state(=1)!! [ 1273.127114] pci 0000:7c:00.0: AER: Device recovery successful [ 1273.127123] hns3 0000:7d:00.3: AER: aer_status: 0x00000000, aer_mask: 0x00000000 [ 1273.127411] br00: port 1(eno3) entered disabled state [ 1273.134507] hns3 0000:7d:00.3: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID [ 1273.142403] hns3 0000:7d:00.3: AER: aer_uncor_severity: 0x00000000 [ 1273.148576] hns3 0000:7d:00.0: PCI error detected, state(=1)!! [ 1273.148610] hns3 0000:7d:00.1: PCI error detected, state(=1)!! [ 1273.148626] hns3 0000:7d:00.2: PCI error detected, state(=1)!! [ 1273.148637] hns3 0000:7d:00.3: PCI error detected, state(=1)!! [ 1273.148712] pci 0000:7c:00.0: AER: Device recovery successful [ 1273.149370] br00: port 2(eno4) entered disabled state [ 1273.149584] hns3 0000:7d:00.0 eno1: link down [ 1273.198236] hns3 0000:7d:00.2: prepare wait ok [ 1273.206287] hns3 0000:7d:00.3: prepare wait ok [ 1273.206303] hns3 0000:7d:00.1: prepare wait ok [ 1273.254285] hns3 0000:7d:00.0: prepare wait ok [ 1310.998220] hns3 0000:7d:00.2: Wait for reset timeout: 6
[Resolution] 74ef402 net: hns3: fix for fraglist SKB headlen not handling correctly 0ec3b6a net: hns3: fix for not unmapping TX buffer correctly 48ae74c net: hns3: fix for not calculating TX BD send size correctly 8ceca59 net: hns3: fix error handling for desc filling cfdaeba net: hns3: fix desc filling bug when skb is expanded or lineared
[Bug Description]
[Steps to Reproduce] net/eth0/ device/ sriov_numvfs
1) install VM
2)apt install –y bridge-utils
3)echo 1 > /sys/class/
ethtool –i eth0v0
brctl addbr br00
ifconfig br00 5.5.5.1/24
brctl addif br00 eth0
brctl addif br00 eth01
virsh start vm1
virsh start vm2
vim sl1.xml
< address domain='0x0000' bus='0x7d' slot='0x01' function='0x7'/>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
</source>
</hostdev>
vim sl2.xml
virsh attach-device vm1 sl1.xml
virsh attach-device vm2 sl2.xml
TCP:netperf -H <Server IP> -t TCP_STREAM –l 60 -- -m 1472
UCP:netperf -H <Server IP> -t UDP_STREAM –l 60 -- -m 1472
[Actual Results]
vm crash
[Expected Results]
vm is ok
[Reproducibility]
100%
[Additional information] Transaction Layer, aer_agent=Receiver ID Transaction Layer, aer_agent=Receiver ID
(Firmware version, kernel version, affected hardware, etc. if required):
[ 1273.099819] pci 0000:7c:00.0: AER: Device recovery successful
[ 1273.099829] hns3 0000:7d:00.2: AER: aer_status: 0x00000000, aer_mask: 0x00000000
[ 1273.107205] hns3 0000:7d:00.2: AER: aer_layer=
[ 1273.112484] hns3 0000:7d:00.0: cleaned 0, need to clean 1
[ 1273.115095] hns3 0000:7d:00.0: get link status cmd failed -52
[ 1273.115100] hns3 0000:7d:00.2: AER: aer_uncor_severity: 0x00000000
[ 1273.127000] hns3 0000:7d:00.0: PCI error detected, state(=1)!!
[ 1273.127027] hns3 0000:7d:00.1: PCI error detected, state(=1)!!
[ 1273.127036] hns3 0000:7d:00.2: PCI error detected, state(=1)!!
[ 1273.127045] hns3 0000:7d:00.3: PCI error detected, state(=1)!!
[ 1273.127114] pci 0000:7c:00.0: AER: Device recovery successful
[ 1273.127123] hns3 0000:7d:00.3: AER: aer_status: 0x00000000, aer_mask: 0x00000000
[ 1273.127411] br00: port 1(eno3) entered disabled state
[ 1273.134507] hns3 0000:7d:00.3: AER: aer_layer=
[ 1273.142403] hns3 0000:7d:00.3: AER: aer_uncor_severity: 0x00000000
[ 1273.148576] hns3 0000:7d:00.0: PCI error detected, state(=1)!!
[ 1273.148610] hns3 0000:7d:00.1: PCI error detected, state(=1)!!
[ 1273.148626] hns3 0000:7d:00.2: PCI error detected, state(=1)!!
[ 1273.148637] hns3 0000:7d:00.3: PCI error detected, state(=1)!!
[ 1273.148712] pci 0000:7c:00.0: AER: Device recovery successful
[ 1273.149370] br00: port 2(eno4) entered disabled state
[ 1273.149584] hns3 0000:7d:00.0 eno1: link down
[ 1273.198236] hns3 0000:7d:00.2: prepare wait ok
[ 1273.206287] hns3 0000:7d:00.3: prepare wait ok
[ 1273.206303] hns3 0000:7d:00.1: prepare wait ok
[ 1273.254285] hns3 0000:7d:00.0: prepare wait ok
[ 1310.998220] hns3 0000:7d:00.2: Wait for reset timeout: 6
[Resolution]
74ef402 net: hns3: fix for fraglist SKB headlen not handling correctly
0ec3b6a net: hns3: fix for not unmapping TX buffer correctly
48ae74c net: hns3: fix for not calculating TX BD send size correctly
8ceca59 net: hns3: fix error handling for desc filling
cfdaeba net: hns3: fix desc filling bug when skb is expanded or lineared