mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
47ed985e97
On TX, timestamping is performed synchronously from the port_deferred_xmit worker thread. In management routes, the switch is requested to take egress timestamps (again partial), which are reconstructed and appended to a clone of the skb that was just sent. The cloning is done by DSA and we retrieve the pointer from the structure that DSA keeps in skb->cb. Then these clones are enqueued to the socket's error queue for application-level processing. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
65 lines
1.4 KiB
C
65 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0
|
|
* Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>
|
|
*/
|
|
#ifndef _SJA1105_PTP_H
|
|
#define _SJA1105_PTP_H
|
|
|
|
#if IS_ENABLED(CONFIG_NET_DSA_SJA1105_PTP)
|
|
|
|
int sja1105_ptp_clock_register(struct sja1105_private *priv);
|
|
|
|
void sja1105_ptp_clock_unregister(struct sja1105_private *priv);
|
|
|
|
int sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts);
|
|
|
|
int sja1105et_ptp_cmd(const void *ctx, const void *data);
|
|
|
|
int sja1105pqrs_ptp_cmd(const void *ctx, const void *data);
|
|
|
|
int sja1105_get_ts_info(struct dsa_switch *ds, int port,
|
|
struct ethtool_ts_info *ts);
|
|
|
|
u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv, u64 now,
|
|
u64 ts_partial);
|
|
|
|
int sja1105_ptp_reset(struct sja1105_private *priv);
|
|
|
|
#else
|
|
|
|
static inline int sja1105_ptp_clock_register(struct sja1105_private *priv)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
|
|
{
|
|
return;
|
|
}
|
|
|
|
static inline int
|
|
sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv,
|
|
u64 now, u64 ts_partial)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int sja1105_ptp_reset(struct sja1105_private *priv)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#define sja1105et_ptp_cmd NULL
|
|
|
|
#define sja1105pqrs_ptp_cmd NULL
|
|
|
|
#define sja1105_get_ts_info NULL
|
|
|
|
#endif /* IS_ENABLED(CONFIG_NET_DSA_SJA1105_PTP) */
|
|
|
|
#endif /* _SJA1105_PTP_H */
|