From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jakub Kicinski <kuba@kernel.org>,
Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
netdev@vger.kernel.org, sasha.neftin@intel.com,
richardcochran@gmail.com,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Naama Meir <naamax.meir@linux.intel.com>
Subject: Re: [PATCH net 2/4] igc: Check if hardware TX timestamping is enabled earlier
Date: Thu, 01 Jun 2023 14:21:35 -0700 [thread overview]
Message-ID: <87353aubds.fsf@intel.com> (raw)
In-Reply-To: <20230531231029.36822957@kernel.org>
Hi,
Jakub Kicinski <kuba@kernel.org> writes:
> On Tue, 30 May 2023 10:49:26 -0700 Tony Nguyen wrote:
>> - if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
>> + if (unlikely(adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON &&
>> + skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) {
>> /* FIXME: add support for retrieving timestamps from
>> * the other timer registers before skipping the
>> * timestamping request.
>> @@ -1586,7 +1587,7 @@ static netdev_tx_t igc_xmit_frame_ring(struct sk_buff *skb,
>> unsigned long flags;
>>
>> spin_lock_irqsave(&adapter->ptp_tx_lock, flags);
>> - if (adapter->tstamp_config.tx_type == HWTSTAMP_TX_ON && !adapter->ptp_tx_skb) {
>> + if (!adapter->ptp_tx_skb) {
>
> AFAICT the cancel / cleanup path is not synchronized (I mean for
> accesses to adapter->tstamp_config) so this looks racy to me :(
>
As far as I can see, the racy behavior wasn't introduced here, can I
propose the fix as a follow up patch? Or do you prefer that I re-spin
this series?
Cheers,
--
Vinicius
next prev parent reply other threads:[~2023-06-01 21:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 17:49 [PATCH net 0/4][pull request] igc: TX timestamping fixes Tony Nguyen
2023-05-30 17:49 ` [PATCH net 1/4] igc: Fix race condition in PTP tx code Tony Nguyen
2023-06-19 7:27 ` naamax.meir
2023-05-30 17:49 ` [PATCH net 2/4] igc: Check if hardware TX timestamping is enabled earlier Tony Nguyen
2023-06-01 6:10 ` Jakub Kicinski
2023-06-01 21:21 ` Vinicius Costa Gomes [this message]
2023-06-02 3:55 ` Jakub Kicinski
2023-06-02 17:56 ` Vinicius Costa Gomes
2023-05-30 17:49 ` [PATCH net 3/4] igc: Retrieve TX timestamp during interrupt handling Tony Nguyen
2023-06-05 11:16 ` Marc Kleine-Budde
2023-06-05 18:11 ` Vinicius Costa Gomes
2023-05-30 17:49 ` [PATCH net 4/4] igc: Add workaround for missing timestamps Tony Nguyen
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=87353aubds.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=naamax.meir@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=sasha.neftin@intel.com \
--cc=vladimir.oltean@nxp.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).