• Lipeng's avatar
    net: hns3: fix a bug about hns3_clean_tx_ring · 24e750c4
    Lipeng authored
    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>
    24e750c4
hns3_enet.h 15.1 KB