From: Pavan Nikhilesh Date: Tue, 9 Apr 2019 09:45:47 +0000 (+0000) Subject: app/testpmd: fix packet headers in txonly mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1eab29b9b8bd7ec9556f77b40cd1ace41e961b17;p=dpdk.git app/testpmd: fix packet headers in txonly mode 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 Reviewed-by: Ferruh Yigit --- diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index 66e63788a2..2d0e1a0279 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(*eth_hdr), pkt, 0); copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt, sizeof(struct ether_hdr)); if (txonly_multi_flow) {