> -----Original Message----- > From: Jakub Kicinski <k...@kernel.org> > Sent: 2021年4月15日 0:36 > To: Y.b. Lu <yangbo...@nxp.com> > Cc: netdev@vger.kernel.org; David S . Miller <da...@davemloft.net>; Richard > Cochran <richardcoch...@gmail.com>; Claudiu Manoil > <claudiu.man...@nxp.com>; Vladimir Oltean <vladimir.olt...@nxp.com>; > Russell King <li...@armlinux.org.uk> > Subject: Re: [net-next] enetc: fix locking for one-step timestamping packet > transfer > > On Wed, 14 Apr 2021 06:18:57 +0000 Y.b. Lu wrote: > > > 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 :) > > Ah, I didn't look close enough. I was expecting to see schedule_work(), please > consider sending a follow up, queue_work(system_wq, $work) is a rare > construct.
Thank you Jakub. I sent another patch for this. https://patchwork.kernel.org/project/netdevbpf/patch/20210415053455.10029-1-yangbo...@nxp.com/