DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"xueqin.lin@intel.com" <xueqin.lin@intel.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix ether header size calculation
Date: Tue, 9 Apr 2019 09:45:47 +0000	[thread overview]
Message-ID: <20190409094543.26751-1-pbhagavatula@marvell.com> (raw)
Message-ID: <20190409094547.EyfoYCoW1WVaQvSSOcA4IBizb-lYDPl62I5qbZ9QTOg@z> (raw)
In-Reply-To: <20190408101236.18076-1-pbhagavatula@marvell.com>

From: Pavan Nikhilesh <pbhagavatula@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@marvell.com>
---
 v2 Changes:
 - Preserve relation between destination and destination size. (Bruce)

 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..2d0e1a027 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) {
--
2.21.0


  parent reply	other threads:[~2019-04-09  9:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 10:13 [dpdk-dev] [PATCH] " Pavan Nikhilesh Bhagavatula
2019-04-08 10:13 ` Pavan Nikhilesh Bhagavatula
2019-04-08 11:57 ` Bruce Richardson
2019-04-08 11:57   ` Bruce Richardson
2019-04-08 12:28   ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2019-04-08 12:28     ` Pavan Nikhilesh Bhagavatula
2019-04-09  9:45 ` Pavan Nikhilesh Bhagavatula [this message]
2019-04-09  9:45   ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh Bhagavatula
2019-04-09 20:59   ` Ferruh Yigit
2019-04-09 20:59     ` Ferruh Yigit
2019-04-10  1:23     ` Yao, Lei A
2019-04-10  1:23       ` Yao, Lei A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190409094543.26751-1-pbhagavatula@marvell.com \
    --to=pbhagavatula@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=xueqin.lin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).