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

Bug #1853976 reported by Fred Kimmy on 2019-11-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Undecided
Unassigned
Ubuntu-18.04
Undecided
Ike Panhc
Ubuntu-18.04-hwe
Undecided
Unassigned
Ubuntu-19.04
Undecided
Ike Panhc
Ubuntu-19.10
Undecided
Ike Panhc
Ubuntu-20.04
Undecided
Unassigned
Upstream-kernel
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

Ike Panhc (ikepanhc) wrote :

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

tags: added: backport
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) on 2020-01-01
tags: removed: backport
Ike Panhc (ikepanhc) on 2020-01-07
tags: added: ikeradar
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers