From: Hao Lan <lanhao@huawei.com>
To: <lanhao@huawei.com>, <lipeng321@huawei.com>,
<shenjian15@huawei.com>, <linyunsheng@huawei.com>,
<liuyonglong@huawei.com>, <chenhao418@huawei.com>,
<wangjie125@huawei.com>, <huangguangbin2@huawei.com>,
<yisen.zhuang@huawei.com>, <salil.mehta@huawei.com>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <netdev@vger.kernel.org>,
<xiaojiantao1@h-partners.com>
Subject: [PATCH net 2/3] net: hns3: fix return value check bug of rx copybreak
Date: Sat, 12 Nov 2022 16:21:17 +0800 [thread overview]
Message-ID: <20221112082118.57844-3-lanhao@huawei.com> (raw)
In-Reply-To: <20221112082118.57844-1-lanhao@huawei.com>
From: Jie Wang <wangjie125@huawei.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@huawei.com>
Signed-off-by: Hao Lan <lanhao@huawei.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
next prev parent reply other threads:[~2022-11-12 8:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 8:21 [PATCH net 0/3] net: hns3: This series bugfix for the HNS3 ethernet driver Hao Lan
2022-11-12 8:21 ` [PATCH net 1/3] net: hns3: fix incorrect hw rss hash type of rx packet Hao Lan
2022-11-12 8:21 ` Hao Lan [this message]
2022-11-14 7:39 ` [PATCH net 2/3] net: hns3: fix return value check bug of rx copybreak Leon Romanovsky
2022-11-14 8:47 ` Hao Lan
2022-11-12 8:21 ` [PATCH net 3/3] net: hns3: fix setting incorrect phy link ksettings for firmware in resetting process Hao Lan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221112082118.57844-3-lanhao@huawei.com \
--to=lanhao@huawei.com \
--cc=chenhao418@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangguangbin2@huawei.com \
--cc=kuba@kernel.org \
--cc=linyunsheng@huawei.com \
--cc=lipeng321@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shenjian15@huawei.com \
--cc=wangjie125@huawei.com \
--cc=xiaojiantao1@h-partners.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).