net/hinic: fix Tx mbuf length while copying
authorXiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Thu, 14 May 2020 09:29:17 +0000 (17:29 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
When copy a mbuf to a new dst_mbuf, the pkt_len member of
dst_mbuf needs to be updated.

Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
drivers/net/hinic/hinic_pmd_tx.c

index 996e0b2..bd39f93 100644 (file)
@@ -313,6 +313,8 @@ static inline struct rte_mbuf *hinic_copy_tx_mbuf(struct hinic_nic_dev *nic_dev,
                mbuf = mbuf->next;
        }
 
+       dst_mbuf->pkt_len = dst_mbuf->data_len;
+
        return dst_mbuf;
 }