提交 c7f9267b 编写于 作者: S Shaozhengchao 提交者: Xie XiuQi

net/hinic: fix tx padding bug

driver inclusion
category:bugfix
bugzilla:4472
CVE:NA

-----------------------------------------------------------------------

fix tx padding bug
Signed-off-by: NShaozhengchao <shaozhengchao@huawei.com>
Reviewed-by: NWangxiaoyun <wangxiaoyun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 aca4dc5d
...@@ -782,7 +782,6 @@ static netdev_tx_t hinic_send_one_skb(struct sk_buff *skb, ...@@ -782,7 +782,6 @@ static netdev_tx_t hinic_send_one_skb(struct sk_buff *skb,
u16 pi = 0; u16 pi = 0;
int err, wqebb_cnt; int err, wqebb_cnt;
u16 num_sge = 0; u16 num_sge = 0;
u16 skb_nr_frags = skb_shinfo(skb)->nr_frags;
/* skb->dev will not initialized when calling netdev_alloc_skb_ip_align /* skb->dev will not initialized when calling netdev_alloc_skb_ip_align
* and parameter of length is largger then PAGE_SIZE(under redhat7.3), * and parameter of length is largger then PAGE_SIZE(under redhat7.3),
...@@ -800,7 +799,7 @@ static netdev_tx_t hinic_send_one_skb(struct sk_buff *skb, ...@@ -800,7 +799,7 @@ static netdev_tx_t hinic_send_one_skb(struct sk_buff *skb,
skb->len = MIN_SKB_LEN; skb->len = MIN_SKB_LEN;
} }
num_sge = skb_nr_frags + 1; num_sge = skb_shinfo(skb)->nr_frags + 1;
/* if skb->len is more than 65536B but num_sge is 1, /* if skb->len is more than 65536B but num_sge is 1,
* driver will drop it * driver will drop it
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册