cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

ptp.h (1960B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/****************************************************************************
      3 * Driver for Solarflare network controllers and boards
      4 * Copyright 2005-2006 Fen Systems Ltd.
      5 * Copyright 2006-2013 Solarflare Communications Inc.
      6 * Copyright 2019-2020 Xilinx Inc.
      7 */
      8
      9#ifndef EFX_PTP_H
     10#define EFX_PTP_H
     11
     12#include <linux/net_tstamp.h>
     13#include "net_driver.h"
     14
     15struct ethtool_ts_info;
     16void efx_siena_ptp_defer_probe_with_channel(struct efx_nic *efx);
     17struct efx_channel *efx_siena_ptp_channel(struct efx_nic *efx);
     18int efx_siena_ptp_set_ts_config(struct efx_nic *efx, struct ifreq *ifr);
     19int efx_siena_ptp_get_ts_config(struct efx_nic *efx, struct ifreq *ifr);
     20void efx_siena_ptp_get_ts_info(struct efx_nic *efx,
     21			       struct ethtool_ts_info *ts_info);
     22bool efx_siena_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
     23int efx_siena_ptp_get_mode(struct efx_nic *efx);
     24int efx_siena_ptp_change_mode(struct efx_nic *efx, bool enable_wanted,
     25			      unsigned int new_mode);
     26int efx_siena_ptp_tx(struct efx_nic *efx, struct sk_buff *skb);
     27void efx_siena_ptp_event(struct efx_nic *efx, efx_qword_t *ev);
     28size_t efx_siena_ptp_describe_stats(struct efx_nic *efx, u8 *strings);
     29size_t efx_siena_ptp_update_stats(struct efx_nic *efx, u64 *stats);
     30void efx_siena_time_sync_event(struct efx_channel *channel, efx_qword_t *ev);
     31void __efx_siena_rx_skb_attach_timestamp(struct efx_channel *channel,
     32					 struct sk_buff *skb);
     33static inline void efx_rx_skb_attach_timestamp(struct efx_channel *channel,
     34					       struct sk_buff *skb)
     35{
     36	if (channel->sync_events_state == SYNC_EVENTS_VALID)
     37		__efx_siena_rx_skb_attach_timestamp(channel, skb);
     38}
     39
     40void efx_siena_ptp_start_datapath(struct efx_nic *efx);
     41void efx_siena_ptp_stop_datapath(struct efx_nic *efx);
     42bool efx_siena_ptp_use_mac_tx_timestamps(struct efx_nic *efx);
     43ktime_t efx_siena_ptp_nic_to_kernel_time(struct efx_tx_queue *tx_queue);
     44
     45#endif /* EFX_PTP_H */