From: Bruce Richardson <bruce.richardson@intel.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix ether header size calculation
Date: Mon, 8 Apr 2019 12:57:59 +0100 [thread overview]
Message-ID: <20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com> (raw)
Message-ID: <20190408115759.IfSeZCcF_H_jcKP1sNtUEFpxS9gatwRaOD8err0CcOo@z> (raw)
In-Reply-To: <20190408101236.18076-1-pbhagavatula@marvell.com>
On Mon, Apr 08, 2019 at 10:13:04AM +0000, Pavan Nikhilesh Bhagavatula wrote:
> 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>
> ---
> 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);
Would a simpler fix not be to change "sizeof(eth_hdr)" to
"sizeof(*eth_hdr)"? It would keep the logical connection between the
destination and destination size, and make future refactoring easier.
/Bruce
next prev parent reply other threads:[~2019-04-08 11:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 10:13 Pavan Nikhilesh Bhagavatula
2019-04-08 10:13 ` Pavan Nikhilesh Bhagavatula
2019-04-08 11:57 ` Bruce Richardson [this message]
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 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh Bhagavatula
2019-04-09 9:45 ` 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=20190408115759.GB1742@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=thomas@monjalon.net \
/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).