All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Vlad Buslov <vladbu@mellanox.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [bug report] net/mlx5e: Extend encap entry with reference counter
Date: Wed, 14 Aug 2019 17:00:25 +0300	[thread overview]
Message-ID: <20190814140025.GA24910@kadam> (raw)
In-Reply-To: <vbfpnl73lhc.fsf@mellanox.com>

On Wed, Aug 14, 2019 at 01:49:54PM +0000, Vlad Buslov wrote:
> >   1447
> >   1448                          if (mlx5e_is_offloaded_flow(flow)) {
> >   1449                                  counter = mlx5e_tc_get_counter(flow);
> >   1450                                  lastuse = mlx5_fc_query_lastuse(counter);
> >   1451                                  if (time_after((unsigned long)lastuse, nhe->reported_lastuse)) {
> >   1452                                          mlx5e_flow_put(netdev_priv(e->out_dev), flow);
> >   1453                                          neigh_used = true;
> >   1454                                          break;
> >
> > I think we need to call mlx5e_encap_put(netdev_priv(e->out_dev), e);
> > before this break;
> 
> We are breaking from the inner loop (not returning from the function,
> just breaking the innermost loop) here after releasing the reference to
> flow which was obtained at the beginning of the loop.
> 

Oh...  Duh.  I am embarrassed.  I misread it to think we were breaking
from the outer loop.

regards,
dan carpenter


      reply	other threads:[~2019-08-14 14:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 10:53 [bug report] net/mlx5e: Extend encap entry with reference counter Dan Carpenter
2019-08-14 13:49 ` Vlad Buslov
2019-08-14 14:00   ` Dan Carpenter [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=20190814140025.GA24910@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=vladbu@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.