patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, stable@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
	 Kiran Kumar K <kirankumark@marvell.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	 Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: Re: [PATCH] graph: fix node shrink
Date: Mon, 23 Jan 2023 19:23:00 +0530	[thread overview]
Message-ID: <CALBAE1NeCSZStkTYOBuNDFoHaLg07RR8ti37AtZkZSb9AtB6nw@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8xNQvPkZ0JYD4cMmtLZHkn1=O-Zy1ooAZaPjV6BtFddLQ@mail.gmail.com>

On Mon, Jan 23, 2023 at 7:21 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Mon, Jan 23, 2023 at 2:33 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Thu, Jan 19, 2023 at 4:02 PM David Marchand
> > <david.marchand@redhat.com> wrote:
> > >
> > > If the node id check failed, graph_lock was not taken before releasing.
> >
> > Thanks for the fix.
> >
> >
> > Why not this oneline fix?
> >
> > [main][dpdk.org] $ git diff
> > diff --git a/lib/graph/node.c b/lib/graph/node.c
> > index fc6345de07..89cdcf0207 100644
> > --- a/lib/graph/node.c
> > +++ b/lib/graph/node.c
> > @@ -293,8 +293,8 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t size)
> >         rte_edge_t rc = RTE_EDGE_ID_INVALID;
> >         struct node *node;
> >
> > -       NODE_ID_CHECK(id);
> >         graph_spinlock_lock();
> > +       NODE_ID_CHECK(id);
> >
> >         STAILQ_FOREACH(node, &node_list, next) {
> >                 if (node->id == id) {
>
> Other calls to NODE_ID_CHECK input check are done out of the lock.
> And to keep consistency with the rest of this library code.


Acked-by: Jerin Jacob <jerinj@marvell.com>


>
> --
> David Marchand
>

  reply	other threads:[~2023-01-23 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 10:32 David Marchand
2023-01-19 13:57 ` [EXT] " Kiran Kumar Kokkilagadda
2023-01-23 13:32 ` Jerin Jacob
2023-01-23 13:50   ` David Marchand
2023-01-23 13:53     ` Jerin Jacob [this message]
2023-01-31 10:13 ` David Marchand

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=CALBAE1NeCSZStkTYOBuNDFoHaLg07RR8ti37AtZkZSb9AtB6nw@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stable@dpdk.org \
    /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).