summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJie Wang <wangjie125@huawei.com>2022-11-14 16:20:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-12 11:59:20 +0100
commitd50d6c193adb98657070951b892bde665c50b2b7 (patch)
tree261bbca3744c634f0b177ef122cee167e14a8693
parentd4e6a13eb9a3361e2aaa17558687a2bd8b26d97c (diff)
downloadlinux-d50d6c193adb98657070951b892bde665c50b2b7.tar.gz
linux-d50d6c193adb98657070951b892bde665c50b2b7.tar.bz2
linux-d50d6c193adb98657070951b892bde665c50b2b7.zip
net: hns3: fix return value check bug of rx copybreak
commit 29df7c695ed67a8fa32bb7805bad8fe2a76c1f88 upstream. The refactoring of rx copybreak modifies the original return logic, which will make this feature unavailable. So this patch fixes the return logic of rx copybreak. Fixes: e74a726da2c4 ("net: hns3: refactor hns3_nic_reuse_page()") Fixes: 99f6b5fb5f63 ("net: hns3: use bounce buffer when rx page can not be reused") Signed-off-by: Jie Wang <wangjie125@huawei.com> Signed-off-by: Hao Lan <lanhao@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 822193b0d709..dc835f316d47 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3590,8 +3590,8 @@ static void hns3_nic_reuse_page(struct sk_buff *skb, int i,
desc_cb->reuse_flag = 1;
} else if (frag_size <= ring->rx_copybreak) {
ret = hns3_handle_rx_copybreak(skb, i, ring, pull_len, desc_cb);
- if (ret)
- goto out;
+ if (!ret)
+ return;
}
out: