patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ori Kam <orika@mellanox.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org, viacheslavo@mellanox.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] testpmd: fix init mpls struct
Date: Fri, 31 Jan 2020 11:01:14 +0000	[thread overview]
Message-ID: <66360294-835a-92c3-6cb8-529f908d4c5c@intel.com> (raw)
In-Reply-To: <1580401099-103931-1-git-send-email-orika@mellanox.com>

On 1/30/2020 4:18 PM, Ori Kam wrote:
> When adding mpls item we copy the structure, in some cases
> the item is not initialized.
> 
> This commit solves this by initializing the struct.
> 
> Coverity issue: 325734
> Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ori Kam <orika@mellanox.com>
> ---
>  app/test-pmd/cmdline_flow.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index e99e24c..42d90f5 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -4576,7 +4576,9 @@ static int comp_set_raw_index(struct context *, const struct token *,
>  	struct rte_flow_item_gre gre = {
>  		.protocol = rte_cpu_to_be_16(ETHER_TYPE_MPLS_UNICAST),
>  	};
> -	struct rte_flow_item_mpls mpls;
> +	struct rte_flow_item_mpls mpls = {
> +		.ttl = 0

I wasn't aware that this is valid 'c' syntax, no ',' at the end.

Anyway, I guess this patch has been superseded by following, right?
https://patches.dpdk.org/patch/65383/
"app/testpmd: fix uninitialized members of mpls"

> +	};
>  	uint8_t *header;
>  	int ret;
>  
> 


  reply	other threads:[~2020-01-31 11:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 16:18 Ori Kam
2020-01-31 11:01 ` Ferruh Yigit [this message]
2020-02-02  8:05   ` Ori Kam

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=66360294-835a-92c3-6cb8-529f908d4c5c@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=orika@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.com \
    --cc=wenzhuo.lu@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).