mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander H Duyck <alexander.duyck@gmail.com>
To: Shmuel Hazan <shmuel.h@siklu.com>, Russell King <linux@armlinux.org.uk>
Cc: Marcin Wojtas <mw@semihalf.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	horatiu.vultur@microchip.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/3] net: mvpp2: tai: add refcount for ptp worker
Date: Mon, 01 May 2023 08:04:41 -0700	[thread overview]
Message-ID: <c5cb682ad747ee5755ff96736c3358ebdb2c0f1c.camel@gmail.com> (raw)
In-Reply-To: <20230430170656.137549-2-shmuel.h@siklu.com>

On Sun, 2023-04-30 at 20:06 +0300, Shmuel Hazan wrote:
> In some configurations, a single TAI can be responsible for multiple
> mvpp2 interfaces. However, the mvpp2 driver will call mvpp22_tai_stop
> and mvpp22_tai_start per interface RX timestamp disable/enable.
> 
> As a result, disabling timestamping for one interface would stop the
> worker and corrupt the other interface's RX timestamps.
> 
> This commit solves the issue by introducing a simpler ref count for each
> TAI instance.
> 
> Due to the ref count, we need now to lock tai->refcount_lock before
> doing anything. As a result, we can't call mvpp22_tai_do_aux_work as it
> will cause a deadlock. Therefore, we will just schedule the worker to
> start immediately.
> 
> Fixes: ce3497e2072e ("net: mvpp2: ptp: add support for receive timestamping")
> Signed-off-by: Shmuel Hazan <shmuel.h@siklu.com>
> ---
> v1 -> v2: lock tai->lock before touching poll_worker_refcount.
> v2 -> v3: no change
> v3 -> v4: added additional lock for poll_worker_refcount due to
> 	  a possible deadlock.
> ---
>  .../net/ethernet/marvell/mvpp2/mvpp2_tai.c    | 28 +++++++++++++++++--
>  1 file changed, 25 insertions(+), 3 deletions(-)
> 

So this patch looks fine to me. However you submitted this and the
other 2 for net. The other 2 patches in this series seem to be a
feature add rather than a fix. As such you may want to split up this
set and submit the other two patches for net-next instead of net.

Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>


  reply	other threads:[~2023-05-01 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 17:06 [PATCH v4 0/3] net: mvpp2: tai: add extts support Shmuel Hazan
2023-04-30 17:06 ` [PATCH v4 1/3] net: mvpp2: tai: add refcount for ptp worker Shmuel Hazan
2023-05-01 15:04   ` Alexander H Duyck [this message]
2023-04-30 17:06 ` [PATCH v4 2/3] net: mvpp2: tai: add extts support Shmuel Hazan
2023-04-30 17:06 ` [PATCH v4 3/3] dt-bindings: net: marvell,pp2: add extts docs Shmuel Hazan
2023-05-01 19:45 ` [PATCH v4 0/3] net: mvpp2: tai: add extts support Russell King (Oracle)

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=c5cb682ad747ee5755ff96736c3358ebdb2c0f1c.camel@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=shmuel.h@siklu.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

all inboxes | Powered by JetHome®