[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AM7PR04MB6885CD2526DA6A647D4B53A7F8210@AM7PR04MB6885.eurprd04.prod.outlook.com>
Date: Wed, 16 Sep 2020 11:43:05 +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>,
Ioana Ciornei <ioana.ciornei@....com>,
Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
Richard Cochran <richardcochran@...il.com>
Subject: RE: [PATCH 5/5] dpaa2-eth: support PTP Sync packet one-step
timestamping
Hi Jakub,
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, September 10, 2020 10:43 PM
> To: Y.b. Lu <yangbo.lu@....com>
> Cc: netdev@...r.kernel.org; David S . Miller <davem@...emloft.net>; Ioana
> Ciornei <ioana.ciornei@....com>; Ioana Ciocoi Radulescu
> <ruxandra.radulescu@....com>; Richard Cochran
> <richardcochran@...il.com>
> Subject: Re: [PATCH 5/5] dpaa2-eth: support PTP Sync packet one-step
> timestamping
>
> On Thu, 10 Sep 2020 17:38:35 +0800 Yangbo Lu wrote:
> > This patch is to add PTP sync packet one-step timestamping support.
> > Before egress, one-step timestamping enablement needs,
> >
> > - Enabling timestamp and FAS (Frame Annotation Status) in
> > dpni buffer layout.
> >
> > - Write timestamp to frame annotation and set PTP bit in
> > FAS to mark as one-step timestamping event.
> >
> > - Enabling one-step timestamping by dpni_set_single_step_cfg()
> > API, with offset provided to insert correction time on frame.
> > The offset must respect all MAC headers, VLAN tags and other
> > protocol headers accordingly. The correction field update can
> > consider delays up to one second. So PTP frame needs to be
> > filtered and parsed, and written timestamp into Sync frame
> > originTimestamp field.
> >
> > The operation of API dpni_set_single_step_cfg() has to be done
> > when no one-step timestamping frames are in flight. So we have
> > to make sure the last one-step timestamping frame has already
> > been transmitted on hardware before starting to send the current
> > one. The resolution is,
> >
> > - Utilize skb->cb[0] to mark timestamping request per packet.
> > If it is one-step timestamping PTP sync packet, queue to skb queue.
> > If not, transmit immediately.
> >
> > - Schedule a work to transmit skbs in skb queue.
> >
> > - mutex lock is used to ensure the last one-step timestamping packet
> > has already been transmitted on hardware through TX confirmation
> queue
> > before transmitting current packet.
> >
> > Signed-off-by: Yangbo Lu <yangbo.lu@....com>
>
> This doesn't build on 32bit:
>
> ERROR: modpost: "__udivdi3"
> [drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-eth.ko] undefined!
> ERROR: modpost: "__umoddi3"
> [drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-eth.ko] undefined!
Will fix by using do_div in next version. Thanks.
Powered by blists - more mailing lists