[v1,2/4] net/hinic: the pkt len updates of mbuf fixes

Message ID 4bf1362700f278958df6ae8d1ae84c5b1c945ee4.1589442278.git.cloud.wangxiaoyun@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series fixes for queue resource free and code style |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wangxiaoyun (Cloud) May 14, 2020, 9:29 a.m. UTC
  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 | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 996e0b2..bd39f93 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -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;
 }