>-----Original Message-----
>From: Jakub Kicinski <[email protected]>
>Sent: Thursday, April 8, 2021 7:07 PM
>To: Y.b. Lu <[email protected]>
>Cc: [email protected]; David S . Miller <[email protected]>;
>Richard Cochran <[email protected]>; Claudiu Manoil
><[email protected]>; Vladimir Oltean <[email protected]>;
>Russell King <[email protected]>
>Subject: Re: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step
>timestamping
>
>On Thu, 8 Apr 2021 09:02:50 -0700 Jakub Kicinski wrote:
>>              if (priv->flags & ONESTEP_BUSY) {
>>                      skb_queue_tail(&priv->tx_skbs, skb);
>>                      return ...;
>>              }
>>              priv->flags |= ONESTEP_BUSY;
>
>Ah, if you have multiple queues this needs to be under a separate
>spinlock, 'cause netif_tx_lock() won't be enough.

Hi Yangbo,

Please try test_and_set_bit_lock()/ clear_bit_unlock() based on Jakub's
suggestion, and see if it works for you / whether it can replace the mutex.

Thanks,
Claudiu

Reply via email to