[hns-1126]net: hns3: add check for max TX BD num for tso and non-tso case

Bug #1853976 reported by Fred Kimmy
6
This bug affects 1 person
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.sw_err_cnt counter and
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

Revision history for this message
Ike Panhc (ikepanhc) wrote :

I will try to reproduce this and see if we shall backport it.

tags: added: backport
Revision history for this message
Ike Panhc (ikepanhc) wrote :

`git cherry-pick` on bionic/disco/eoan fails with lots of conflict. Set back to "Triage" until we can solve the conflicts.

Changed in kunpeng920:
status: New → Triaged
Ike Panhc (ikepanhc)
tags: removed: backport
Ike Panhc (ikepanhc)
tags: added: ikeradar
Revision history for this message
Ike Panhc (ikepanhc) wrote :

19.04 is EOLed. There is no more SRU cycle for it.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Can't clean cherry-picked for eoan and bionic.

tags: removed: ikeradar
Changed in kunpeng920:
status: Triaged → Fix Committed
Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.