[dpdk-dev] [PATCH] app/testpmd: fix ether header size calculation
Pavan Nikhilesh Bhagavatula
pbhagavatula at marvell.com
Mon Apr 8 12:13:04 CEST 2019
From: Pavan Nikhilesh <pbhagavatula at marvell.com>
Fix ether header size calculation in Tx only mode.
Coverity issue: 337684
Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
---
app/test-pmd/txonly.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 66e63788a..a9c27be3e 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -189,7 +189,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
/*
* Copy headers in first packet segment(s).
*/
- copy_buf_to_pkt(eth_hdr, sizeof(eth_hdr), pkt, 0);
+ copy_buf_to_pkt(eth_hdr, sizeof(struct ether_hdr), pkt, 0);
copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt,
sizeof(struct ether_hdr));
if (txonly_multi_flow) {
--
2.21.0
More information about the dev
mailing list