[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR04MB6754A7B847379CC8DC3D855196739@AM0PR04MB6754.eurprd04.prod.outlook.com>
Date: Fri, 9 Apr 2021 06:37:53 +0000
From: Claudiu Manoil <claudiu.manoil@....com>
To: Jakub Kicinski <kuba@...nel.org>, "Y.b. Lu" <yangbo.lu@....com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>,
Richard Cochran <richardcochran@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Russell King <linux@...linux.org.uk>
Subject: RE: [net-next, v2, 2/2] enetc: support PTP Sync packet one-step
timestamping
>-----Original Message-----
>From: Jakub Kicinski <kuba@...nel.org>
>Sent: Thursday, April 8, 2021 7:07 PM
>To: Y.b. Lu <yangbo.lu@....com>
>Cc: netdev@...r.kernel.org; David S . Miller <davem@...emloft.net>;
>Richard Cochran <richardcochran@...il.com>; Claudiu Manoil
><claudiu.manoil@....com>; Vladimir Oltean <vladimir.oltean@....com>;
>Russell King <linux@...linux.org.uk>
>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
Powered by blists - more mailing lists