DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	dev <dev@dpdk.org>, "Mcnamara, John" <john.mcnamara@intel.com>
Subject: Re: [dpdk-dev] [EXT] Re:  [PATCH v2] test/graph: fix memory leak
Date: Thu, 14 May 2020 11:20:56 +0000	[thread overview]
Message-ID: <DM6PR18MB29692D125B67F288E128093BACBC0@DM6PR18MB2969.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8w4+x_apWZnwuD7fupp-EosFEWQDkniKZ30_1_731bU3w@mail.gmail.com>



> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: Thursday, May 14, 2020 4:34 PM
> To: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; dev <dev@dpdk.org>; Mcnamara, John
> <john.mcnamara@intel.com>
> Subject: [EXT] Re: [dpdk-dev] [PATCH v2] test/graph: fix memory leak
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Thu, May 14, 2020 at 10:57 AM <kirankumark@marvell.com> wrote:
> >
> > From: Kiran Kumar K <kirankumark@marvell.com>
> >
> > Fix memory leaks reported by coverity.
> >
> > Coverity issue: 358439, 358451, 358448.
> 
> Please no '.' at the end of a tag (and sorting would not hurt).
> 


Will fix in V3.

> I wanted to get a look at those, but I can't find them in coverity webui.
> Maybe those issues have been closed, but then I can't look at them.. ?
> Any help would be appreciated.
> 
> 
> > Fixes: 6b89650418("test/graph: add functional tests")
> >
> > Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
> > ---
> > V2 changes:
> > * Added Coverity issue and Fixes info.
> >
> >  app/test/test_graph.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test/test_graph.c b/app/test/test_graph.c index
> > cf6df0744..ed69eda99 100644
> > --- a/app/test/test_graph.c
> > +++ b/app/test/test_graph.c
> > @@ -12,6 +12,7 @@
> >  #include <rte_graph.h>
> >  #include <rte_graph_worker.h>
> >  #include <rte_mbuf.h>
> > +#include <rte_random.h>
> >
> >  #include "test.h"
> >
> > @@ -145,7 +146,7 @@ uint16_t
> >  test_node_worker_source(struct rte_graph *graph, struct rte_node *node,
> >                         void **objs, uint16_t nb_objs)  {
> > -       uint32_t obj_node0 = rand() % 100, obj_node1;
> > +       uint32_t obj_node0 = rte_rand() % 100, obj_node1;
> 
> The commitlog indicates memory leaks, I am a bit surprised to see this change.
> What is the rationale?
> 
Merged all the coverity issues to single patch. Will change the description in V3.

> 
> >         test_main_t *tm = &test_main;
> >         struct rte_mbuf *data;
> >         void **next_stream;
> > @@ -193,7 +194,7 @@ test_node0_worker(struct rte_graph *graph, struct
> rte_node *node, void **objs,
> >         test_main_t *tm = &test_main;
> >
> >         if (*(uint32_t *)node->ctx == test_node0.id) {
> > -               uint32_t obj_node0 = rand() % 100, obj_node1;
> > +               uint32_t obj_node0 = rte_rand() % 100, obj_node1;
> 
> Idem.
> 
> 
> >                 struct rte_mbuf *data;
> >                 uint8_t second_pass = 0;
> >                 uint32_t count = 0;
> > @@ -496,6 +497,7 @@ test_lookup_functions(void)
> >                         printf("Test number of edges for node = %s failed Expected = %d,
> got %d\n",
> >                                tm->test_node[i].node.name,
> >                                tm->test_node[i].node.nb_edges, count);
> > +                       free(next_edges);
> >                         return -1;
> >                 }
> >
> > @@ -505,6 +507,7 @@ test_lookup_functions(void)
> >                                 printf("Edge name miss match, expected = %s got = %s\n",
> >                                        tm->test_node[i].node.next_nodes[j],
> >                                        next_edges[j]);
> > +                               free(next_edges);
> >                                 return -1;
> >                         }
> >                 }
> > --
> > 2.17.1
> >
> 
> 
> --
> David Marchand


      reply	other threads:[~2020-05-14 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  8:56 [dpdk-dev] " kirankumark
2020-05-14 11:03 ` David Marchand
2020-05-14 11:20   ` Kiran Kumar Kokkilagadda [this message]

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=DM6PR18MB29692D125B67F288E128093BACBC0@DM6PR18MB2969.namprd18.prod.outlook.com \
    --to=kirankumark@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=john.mcnamara@intel.com \
    --cc=ndabilpuram@marvell.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).