[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM7PR04MB6885805B7D5D11DD8DC1CA28F84E9@AM7PR04MB6885.eurprd04.prod.outlook.com>
Date: Wed, 14 Apr 2021 06:18:57 +0000
From: "Y.b. Lu" <yangbo.lu@....com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <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] enetc: fix locking for one-step timestamping packet
transfer
Hi Jakub,
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: 2021年4月14日 1:11
> 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] enetc: fix locking for one-step timestamping packet
> transfer
>
> On Tue, 13 Apr 2021 11:48:17 +0800 Yangbo Lu wrote:
> > + /* Queue one-step Sync packet if already locked */
> > + if (skb->cb[0] & ENETC_F_TX_ONESTEP_SYNC_TSTAMP) {
> > + if
> (test_and_set_bit_lock(ENETC_TX_ONESTEP_TSTAMP_IN_PROGRESS,
> > + &priv->flags)) {
> > + skb_queue_tail(&priv->tx_skbs, skb);
> > + return NETDEV_TX_OK;
> > + }
> > + }
>
> Isn't this missing queue_work() as well?
>
> Also as I mentioned I don't understand why you created a separate workqueue
> instead of using the system workqueue via schedule_work().
queue_work(system_wq, ) was put in clean_tx. I finally followed the logic you suggested :)
See my reply in v2 discussion
https://patchwork.kernel.org/project/netdevbpf/patch/20210408111350.3817-3-yangbo.lu@nxp.com/
And v3 patch merged (7294380c5211 enetc: support PTP Sync packet one-step timestamping)
https://patchwork.kernel.org/project/netdevbpf/patch/20210412090327.22330-3-yangbo.lu@nxp.com/
Thanks.
Powered by blists - more mailing lists