提交 ff769d1d 编写于 作者: S shenjian 提交者: Xie XiuQi

net: hns3: fix transmit issue when port link up

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

There are an return value check missed, which may cause RAS
issue when port up.

Feature or Bugfix:Bugfix
Signed-off-by: Nshenjian (K) <shenjian15@huawei.com>
Reviewed-by: Nlinyunsheng <linyunsheng@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 02db49aa
...@@ -1071,6 +1071,7 @@ static int hns3_fill_desc(struct hns3_enet_ring *ring, void *priv, ...@@ -1071,6 +1071,7 @@ static int hns3_fill_desc(struct hns3_enet_ring *ring, void *priv,
vflags.out_vtag = 0; vflags.out_vtag = 0;
ret = hns3_fill_desc_vtags(skb, ring, &vflags); ret = hns3_fill_desc_vtags(skb, ring, &vflags);
if (unlikely(ret))
return ret; return ret;
if (skb->ip_summed == CHECKSUM_PARTIAL) { if (skb->ip_summed == CHECKSUM_PARTIAL) {
...@@ -1097,8 +1098,8 @@ static int hns3_fill_desc(struct hns3_enet_ring *ring, void *priv, ...@@ -1097,8 +1098,8 @@ static int hns3_fill_desc(struct hns3_enet_ring *ring, void *priv,
/* Set txbd */ /* Set txbd */
desc->tx.ol_type_vlan_len_msec = desc->tx.ol_type_vlan_len_msec =
cpu_to_le32(vflags.ol_type_vlan_len_msec); cpu_to_le32(vflags.ol_type_vlan_len_msec);
desc->tx.type_cs_vlan_tso_len = cpu_to_le32( desc->tx.type_cs_vlan_tso_len =
vflags.type_cs_vlan_tso); cpu_to_le32(vflags.type_cs_vlan_tso);
desc->tx.paylen = cpu_to_le32(paylen); desc->tx.paylen = cpu_to_le32(paylen);
desc->tx.mss = cpu_to_le16(mss); desc->tx.mss = cpu_to_le16(mss);
desc->tx.vlan_tag = cpu_to_le16(vflags.inner_vtag); desc->tx.vlan_tag = cpu_to_le16(vflags.inner_vtag);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册