[hns-1126]net: hns3: add check for max TX BD num for tso and non-tso case
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-18.04 |
Won't Fix
|
Undecided
|
Ike Panhc | ||
Ubuntu-18.04-hwe |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-19.04 |
Won't Fix
|
Undecided
|
Ike Panhc | ||
Ubuntu-19.10 |
Won't Fix
|
Undecided
|
Ike Panhc | ||
Ubuntu-20.04 |
Fix Released
|
Undecided
|
Unassigned | ||
Upstream-kernel |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
"[Bug Description]
Hardware supports up to 8 TX BD for non-TSO skb and 63 TX
BD for TSO skb. Currently hns3 driver does not check the max
BD num that required by a skb before filling desc, which may
cause the hardware to issue a RAS error throug PCIe AER.
[Steps to Reproduce]
1.load PF driver
2.send 655356 Bytes' non-TSO packets
[Actual Results]
The hardware issue a RAS error.
[Expected Results]
The driver drop packets.
[Reproducibility]
Inevitably
[Additional information]
Hardware: D06
Firmware: NA
Kernel: NA
[Resolution]
This patch adds the max BD num check before filling desc,
if the bd num is not within the hardware limit, it will
record the error by ring->stats.
free the skb.
This patch also cleans up the hns3_nic_bd_num function by
changing the return type and removing an unnecessary check."
net: hns3: add check for max TX BD num for tso and non-tso case
tags: | removed: backport |
tags: | added: ikeradar |
Changed in kunpeng920: | |
status: | Fix Committed → Fix Released |
I will try to reproduce this and see if we shall backport it.