[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221114082048.49450-3-lanhao@huawei.com>
Date: Mon, 14 Nov 2022 16:20:47 +0800
From: Hao Lan <lanhao@...wei.com>
To: <lanhao@...wei.com>, <lipeng321@...wei.com>,
<shenjian15@...wei.com>, <linyunsheng@...wei.com>,
<liuyonglong@...wei.com>, <chenhao418@...wei.com>,
<wangjie125@...wei.com>, <huangguangbin2@...wei.com>,
<yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <netdev@...r.kernel.org>,
<xiaojiantao1@...artners.com>, <dvyukov@...gle.com>
Subject: [PATCH V2 net 2/3] net: hns3: fix return value check bug of rx copybreak
From: Jie Wang <wangjie125@...wei.com>
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@...wei.com>
Signed-off-by: Hao Lan <lanhao@...wei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++--
1 file 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 7fc83409f257..028577943ec5 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3778,8 +3778,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:
--
2.30.0
Powered by blists - more mailing lists