]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: hns3: fix tx timeout issue
authorJian Shen <shenjian15@huawei.com>
Wed, 6 Sep 2023 07:20:12 +0000 (15:20 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 7 Sep 2023 09:08:03 +0000 (11:08 +0200)
commit61a1deacc3d4fd3d57d7fda4d935f7f7503e8440
tree8c21205a38b4f0156133f27a9d54bc8497e6c9ec
parent08c6d8bae48c2c28f7017d7b61b5d5a1518ceb39
net: hns3: fix tx timeout issue

Currently, the driver knocks the ring doorbell before updating
the ring->last_to_use in tx flow. if the hardware transmiting
packet and napi poll scheduling are fast enough, it may get
the old ring->last_to_use in drivers' napi poll.
In this case, the driver will think the tx is not completed, and
return directly without clear the flag __QUEUE_STATE_STACK_XOFF,
which may cause tx timeout.

Fixes: 20d06ca2679c ("net: hns3: optimize the tx clean process")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c