netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	nirranjan@chelsio.com, vishal@chelsio.com, dt@chelsio.com
Subject: Re: [PATCH net-next v2 1/3] cxgb4: add mirror action to TC-MATCHALL offload
Date: Mon, 29 Jun 2020 17:34:11 -0700	[thread overview]
Message-ID: <20200629173411.01ec967c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <e02bf5f7ba6b6088a7844d9dec55e98af00c2cfc.1593469163.git.rahul.lakkireddy@chelsio.com>

On Tue, 30 Jun 2020 04:19:51 +0530 Rahul Lakkireddy wrote:
> +	if (refcount_read(&pi->vi_mirror_refcnt) > 1) {
> +		refcount_dec(&pi->vi_mirror_refcnt);
> +		goto out_unlock;
> +	}

Please remove the use of refcount_t if you're doing this, otherwise a
person looking at this code will waste time trying to validate if this
clearly bogus use of refcount_t is harmless or not.

  reply	other threads:[~2020-06-30  0:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 22:49 [PATCH net-next v2 0/3] cxgb4: add mirror action support for TC-MATCHALL Rahul Lakkireddy
2020-06-29 22:49 ` [PATCH net-next v2 1/3] cxgb4: add mirror action to TC-MATCHALL offload Rahul Lakkireddy
2020-06-30  0:34   ` Jakub Kicinski [this message]
2020-06-29 22:49 ` [PATCH net-next v2 2/3] cxgb4: add support for mirror Rxqs Rahul Lakkireddy
2020-06-29 22:49 ` [PATCH net-next v2 3/3] cxgb4: add main VI to mirror VI config replication Rahul Lakkireddy

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=20200629173411.01ec967c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dt@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=vishal@chelsio.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).