From: Shaozhengchao <shaozhengchao(a)huawei.com>
commit c7f9267bef9ceee4d559889b6afe75337f753bee openEuler-1.0
driver inclusion
category:bugfix
bugzilla:4472
CVE:NA
-----------------------------------------------------------------------
fix tx padding bug
Signed-off-by: Shaozhengchao <shaozhengchao(a)huawei.com>
Reviewed-by: Wangxiaoyun <wangxiaoyun(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Xin Hao <haoxing990(a)gmail.com>
---
drivers/net/ethernet/huawei/hinic/hinic_tx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c
b/drivers/net/ethernet/huawei/hinic/hinic_tx.c
index dcc48847d8ef..53ee3f1b2045 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c
@@ -782,7 +782,6 @@ static netdev_tx_t hinic_send_one_skb(struct sk_buff *skb,
u16 pi = 0;
int err, wqebb_cnt;
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
* 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,
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,
* driver will drop it
--
2.31.0