DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Moti Haimovsky <motih@mellanox.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/mlx4: fix drop flow resources not freed
Date: Tue, 30 Jan 2018 18:24:19 +0100	[thread overview]
Message-ID: <20180130172419.GQ4256@6wind.com> (raw)
In-Reply-To: <20180130164107.GP4256@6wind.com>

On Tue, Jan 30, 2018 at 05:41:07PM +0100, Adrien Mazarguil wrote:
> Hi Moti,
> 
> On Tue, Jan 30, 2018 at 05:54:00PM +0200, Moti Haimovsky wrote:
> > This patch fixes the drop-flow resources not being freed when the device
> > is closed.
> > Issue can be observed when running testpmd and adding the following rule
> > more than once:
> > "flow create 0 ingress pattern eth / end actions drop / end"
> > then either exiting testpmd using the "quit" command or by running the
> > command: "port stop all"
> > 
> > Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> 
> Thanks for investigating this problem, however I do not think the proposed
> patch uses the right approach to address it, more below.
<snip>
> We need to find out why we do not end up with a number of mlx5_drop_put()
> calls matching that of mlx5_drop_get(). One is likely missing somewhere.
> I'll have a look as well.

After investigation, the following change in mlx4_flow_toggle() should
do the trick:

         if (flow->drop) {
 +               if (flow->ibv_flow)
 +                       return 0;
                 mlx4_drop_get(priv);

Without this, an already-enabled drop flow rule takes another reference when
re-enabled, hence the issue. I can send a fix tomorrow.

-- 
Adrien Mazarguil
6WIND

  reply	other threads:[~2018-01-30 17:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 15:54 Moti Haimovsky
2018-01-30 16:41 ` Adrien Mazarguil
2018-01-30 17:24   ` Adrien Mazarguil [this message]
2018-01-31 15:33 ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
2018-02-01  8:40   ` Shahaf Shuler

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=20180130172419.GQ4256@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=motih@mellanox.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).