提交 207e22a0 编写于 作者: J Jie Wang 提交者: Jiantao Xiao

net: hns3: fix return value check bug of rx copybreak

mainline inclusion
from mainline-v6.1-rc6
commit 29df7c69
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I65DT5
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.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: e74a726d ("net: hns3: refactor hns3_nic_reuse_page()")
Fixes: 99f6b5fb ("net: hns3: use bounce buffer when rx page can not be reused")
Signed-off-by: NJie Wang <wangjie125@huawei.com>
Signed-off-by: NHao Lan <lanhao@huawei.com>
Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
上级 901b1d6f
......@@ -3858,8 +3858,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册