linux/drivers/net/ethernet/freescale/dpaa2
Yangbo Lu c55211892f dpaa2-eth: support PTP Sync packet one-step timestamping
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@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-18 14:32:48 -07:00
..
Kconfig dpaa2-eth: Add PFC support through DCB ops 2020-06-01 12:04:32 -07:00
Makefile dpaa2-eth: Add PFC support through DCB ops 2020-06-01 12:04:32 -07:00
dpaa2-eth-dcb.c dpaa2-eth: add a dpaa2_eth_ prefix to all functions in dpaa2-eth-dcb.c 2020-09-01 13:23:47 -07:00
dpaa2-eth-debugfs.c dpaa2-eth: Convert to DEFINE_SHOW_ATTRIBUTE 2020-09-17 17:05:29 -07:00
dpaa2-eth-debugfs.h dpaa2: no need to check return value of debugfs_create functions 2019-08-10 15:25:48 -07:00
dpaa2-eth-trace.h dpaa2-eth: fix recursive header include 2020-06-25 16:03:39 -07:00
dpaa2-eth.c dpaa2-eth: support PTP Sync packet one-step timestamping 2020-09-18 14:32:48 -07:00
dpaa2-eth.h dpaa2-eth: support PTP Sync packet one-step timestamping 2020-09-18 14:32:48 -07:00
dpaa2-ethtool.c dpaa2-eth: support PTP Sync packet one-step timestamping 2020-09-18 14:32:48 -07:00
dpaa2-mac.c net: dpaa2-mac: use resolved link config in mac_link_up() 2020-02-27 12:02:14 -08:00
dpaa2-mac.h net: dpaa2-mac: use resolved link config in mac_link_up() 2020-02-27 12:02:14 -08:00
dpaa2-ptp.c dpaa2-eth: define a global ptp_qoriq structure pointer 2020-09-18 14:32:48 -07:00
dpaa2-ptp.h dpaa2-eth: define a global ptp_qoriq structure pointer 2020-09-18 14:32:48 -07:00
dpkg.h
dpmac-cmd.h dpaa2-eth: add ethtool MAC counters 2019-11-07 15:31:53 -08:00
dpmac.c dpaa2-eth: add ethtool MAC counters 2019-11-07 15:31:53 -08:00
dpmac.h dpaa2-eth: add ethtool MAC counters 2019-11-07 15:31:53 -08:00
dpni-cmd.h dpaa2-eth: add APIs of 1588 single step timestamping 2020-09-18 14:32:47 -07:00
dpni.c dpaa2-eth: add APIs of 1588 single step timestamping 2020-09-18 14:32:47 -07:00
dpni.h dpaa2-eth: add APIs of 1588 single step timestamping 2020-09-18 14:32:47 -07:00
dprtc-cmd.h dpaa2-ptp: add external trigger event support 2019-12-16 15:56:41 -08:00
dprtc.c dpaa2-ptp: add interrupt support 2019-06-15 13:43:06 -07:00
dprtc.h dpaa2-ptp: add external trigger event support 2019-12-16 15:56:41 -08:00