Skip to content
Commit 24e750c4 authored by Lipeng's avatar Lipeng Committed by David S. Miller
Browse files

net: hns3: fix a bug about hns3_clean_tx_ring

The return value of hns3_clean_tx_ring means tx ring clean result.
Return true means clean complete and there is no more pakcet need
clean. Retrun false means there is packets need clean and napi need
poll again. The last return of hns3_clean_tx_ring is
"return !!budget" as budget will decrease when clean a buffer.

If there is no valid BD in TX ring, return 0 for hns3_clean_tx_ring
will cause napi poll again and never complete the napi poll. This
patch fixes the bug.

Fixes: 76ad4f0e

 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC)

Signed-off-by: default avatarLipeng <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51145dae
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment