diff mbox series

[net,2/3] net: hns3: fix return value check bug of rx copybreak

Message ID 20221112082118.57844-3-lanhao@huawei.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: hns3: This series bugfix for the HNS3 ethernet driver. | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: chenhao288@hisilicon.com; 1 maintainers not CCed: chenhao288@hisilicon.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Hao Lan Nov. 12, 2022, 8:21 a.m. UTC
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(-)

Comments

Leon Romanovsky Nov. 14, 2022, 7:39 a.m. UTC | #1
On Sat, Nov 12, 2022 at 04:21:17PM +0800, Hao Lan wrote:
> 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>

Please delete blank line between Fixes and SOBs, in all three patches.

Thanks
Hao Lan Nov. 14, 2022, 8:47 a.m. UTC | #2
Thank you, I will send patch V2.

On 2022/11/14 15:39, Leon Romanovsky wrote:
> On Sat, Nov 12, 2022 at 04:21:17PM +0800, Hao Lan wrote:
>> 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>
> 
> Please delete blank line between Fixes and SOBs, in all three patches.
> 
> Thanks
> .
>
diff mbox series

Patch

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: