47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
From fcb841404f3420fd2ab21cc546ff3e34579bec1b Mon Sep 17 00:00:00 2001
|
|
From: Jie Wang <wangjie125@huawei.com>
|
|
Date: Mon, 14 Nov 2022 16:20:47 +0800
|
|
Subject: [PATCH 274/283] net: hns3: fix return value check bug of rx copybreak
|
|
|
|
mainline inclusion
|
|
from mainline-v6.1-rc6
|
|
commit 29df7c695ed67a8fa32bb7805bad8fe2a76c1f88
|
|
category: bugfix
|
|
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8EN49
|
|
|
|
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29df7c695ed67a8fa32bb7805bad8fe2a76c1f88
|
|
|
|
--------------------------------
|
|
|
|
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: Xiaodong Li <lixiaodong67@huawei.com>
|
|
---
|
|
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
index 5c723c532289..644d76278cc7 100644
|
|
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
|
|
@@ -3462,7 +3462,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);
|
|
- return;
|
|
+ if (!ret)
|
|
+ return;
|
|
}
|
|
|
|
out:
|
|
--
|
|
2.34.1
|
|
|