Contributors: 11
Author Tokens Token Proportion Commits Commit Proportion
Ben Hutchings 156 50.16% 14 50.00%
Edward Cree 43 13.83% 2 7.14%
Stuart Hodgson 37 11.90% 1 3.57%
Martin Habets 32 10.29% 4 14.29%
Jon Cooper 12 3.86% 1 3.57%
Alex Austin 9 2.89% 1 3.57%
Alexandre Rames 8 2.57% 1 3.57%
Taehee Yoo 7 2.25% 1 3.57%
Daniel Pieczko 4 1.29% 1 3.57%
Kory Maincent 2 0.64% 1 3.57%
Thomas Gleixner 1 0.32% 1 3.57%
Total 311 28


/* SPDX-License-Identifier: GPL-2.0-only */
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2005-2006 Fen Systems Ltd.
 * Copyright 2006-2013 Solarflare Communications Inc.
 * Copyright 2019-2020 Xilinx Inc.
 */

#ifndef EFX_PTP_H
#define EFX_PTP_H

#include <linux/net_tstamp.h>
#include "net_driver.h"

struct kernel_ethtool_ts_info;
int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel);
void efx_ptp_defer_probe_with_channel(struct efx_nic *efx);
struct efx_channel *efx_ptp_channel(struct efx_nic *efx);
void efx_ptp_update_channel(struct efx_nic *efx, struct efx_channel *channel);
void efx_ptp_remove(struct efx_nic *efx);
int efx_ptp_set_ts_config(struct efx_nic *efx,
			  struct kernel_hwtstamp_config *config,
			  struct netlink_ext_ack *extack);
int efx_ptp_get_ts_config(struct efx_nic *efx,
			  struct kernel_hwtstamp_config *config);
void efx_ptp_get_ts_info(struct efx_nic *efx,
			 struct kernel_ethtool_ts_info *ts_info);
bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
int efx_ptp_get_mode(struct efx_nic *efx);
int efx_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
			unsigned int new_mode);
int efx_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
void efx_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
size_t efx_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
size_t efx_ptp_update_stats(struct efx_nic *efx, u64 *stats);
void efx_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
void __efx_rx_skb_attach_timestamp(struct efx_channel *channel,
				   struct sk_buff *skb);
static inline void efx_rx_skb_attach_timestamp(struct efx_channel *channel,
					       struct sk_buff *skb)
{
	if (channel->sync_events_state == SYNC_EVENTS_VALID)
		__efx_rx_skb_attach_timestamp(channel, skb);
}
void efx_ptp_start_datapath(struct efx_nic *efx);
void efx_ptp_stop_datapath(struct efx_nic *efx);
bool efx_ptp_use_mac_tx_timestamps(struct efx_nic *efx);
ktime_t efx_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue);

#endif /* EFX_PTP_H */