[hns-1126]net: hns3: revert to old channel when setting new channel num fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-18.04 |
Won't Fix
|
Undecided
|
Unassigned | ||
Ubuntu-18.04-hwe |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-19.04 |
Fix Released
|
Undecided
|
Ike Panhc | ||
Ubuntu-19.10 |
Fix Released
|
Undecided
|
Ike Panhc | ||
Ubuntu-20.04 |
Fix Released
|
Undecided
|
Unassigned | ||
Upstream-kernel |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Ike Panhc | ||
Eoan |
Fix Released
|
Undecided
|
Ike Panhc | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
With specific ethtool commands, ethernet does not work
[Test Case]
run VF on VM with 3G memory and load VF driver
ethtool -G eth0 tx 30000 rx 30000
ethtool -G eth0 tx 24 rx 24;ethtool -L eth0 combined 1
ethtool -G eth0 tx 32760 rx 32760
ethtool -L eth0 combined 32
ethernet shall still be functional after these commands
[Fix]
3a5a5f06d4d2 net: hns3: revert to old channel when setting new channel num fail
[Regression Risk]
Patch restricted to hns3 driver.
"[Bug Description]
After setting new channel num, it needs free old ring memory and
allocate new ring memory. If there is no enough memory and allocate
new ring memory fail, the ring may initialize fail. To make sure
the network interface can work normally, driver should revert the
channel to the old configuration.
[Steps to Reproduce]
1.run VF on VM with 3G memory
2.load VF driver
3.ethtool -G eth0 tx 30000 rx 30000
4.ethtool -G eth0 tx 24 rx 24;ethtool -L eth0 combined 1
5.ethtool -G eth0 tx 32760 rx 32760
6.ethtool -L eth0 combined 32
7.ping
[Actual Results]
netdevice can not work
[Expected Results]
ping ok
[Reproducibility]
Inevitably
[Additional information]
Hardware: D06
Firmware: NA
Kernel: NA
[Resolution]
Revert the channel to the old configuration when allocate new ring memory fail."
CVE References
Changed in kunpeng920: | |
status: | Incomplete → New |
Changed in kunpeng920: | |
status: | New → In Progress |
description: | updated |
Changed in linux (Ubuntu Focal): | |
status: | New → Fix Released |
Changed in linux (Ubuntu Eoan): | |
assignee: | nobody → Ike Panhc (ikepanhc) |
status: | New → In Progress |
Changed in linux (Ubuntu Disco): | |
assignee: | nobody → Ike Panhc (ikepanhc) |
status: | New → In Progress |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Disco): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
Changed in kunpeng920: | |
status: | In Progress → Fix Committed |
Changed in kunpeng920: | |
status: | Fix Committed → Fix Released |
Is this patch the fix?
commit 3a5a5f06d4d2ddb 257cb71e9c52106 f50abad8fc
Author: Peng Li <email address hidden>
Date: Wed Sep 11 10:40:34 2019 +0800
net: hns3: revert to old channel when setting new channel num fail
After setting new channel num, it needs free old ring memory and
allocate new ring memory. If there is no enough memory and allocate
new ring memory fail, the ring may initialize fail. To make sure
the network interface can work normally, driver should revert the
channel to the old configuration.
Signed-off-by: Peng Li <email address hidden>
Signed-off-by: Huazhong Tan <email address hidden>
Signed-off-by: David S. Miller <email address hidden>