linux/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
// Copyright (c) 2020 Mellanox Technologies

#include "en/ptp.h"
#include "en/health.h"
#include "en/txrx.h"
#include "en/params.h"
#include "en/fs_tt_redirect.h"
#include <linux/list.h>
#include <linux/spinlock.h>

struct mlx5e_ptp_fs {};

struct mlx5e_ptp_params {};

struct mlx5e_ptp_port_ts_cqe_tracker {};

struct mlx5e_ptp_port_ts_cqe_list {};

static inline void
mlx5e_ptp_port_ts_cqe_list_add(struct mlx5e_ptp_port_ts_cqe_list *list, u8 metadata)
{}

static void
mlx5e_ptp_port_ts_cqe_list_remove(struct mlx5e_ptp_port_ts_cqe_list *list, u8 metadata)
{}

void mlx5e_ptpsq_track_metadata(struct mlx5e_ptpsq *ptpsq, u8 metadata)
{}

struct mlx5e_skb_cb_hwtstamp {};

void mlx5e_skb_cb_hwtstamp_init(struct sk_buff *skb)
{}

static struct mlx5e_skb_cb_hwtstamp *mlx5e_skb_cb_get_hwts(struct sk_buff *skb)
{}

static void mlx5e_skb_cb_hwtstamp_tx(struct sk_buff *skb,
				     struct mlx5e_ptp_cq_stats *cq_stats)
{}

void mlx5e_skb_cb_hwtstamp_handler(struct sk_buff *skb, int hwtstamp_type,
				   ktime_t hwtstamp,
				   struct mlx5e_ptp_cq_stats *cq_stats)
{}

static struct sk_buff *
mlx5e_ptp_metadata_map_lookup(struct mlx5e_ptp_metadata_map *map, u16 metadata)
{}

static struct sk_buff *
mlx5e_ptp_metadata_map_remove(struct mlx5e_ptp_metadata_map *map, u16 metadata)
{}

static bool mlx5e_ptp_metadata_map_unhealthy(struct mlx5e_ptp_metadata_map *map)
{}

static void mlx5e_ptpsq_mark_ts_cqes_undelivered(struct mlx5e_ptpsq *ptpsq,
						 ktime_t port_tstamp)
{}

#define PTP_WQE_CTR2IDX(val)

static void mlx5e_ptp_handle_ts_cqe(struct mlx5e_ptpsq *ptpsq,
				    struct mlx5_cqe64 *cqe,
				    u8 *md_buff,
				    u8 *md_buff_sz,
				    int budget)
{}

static bool mlx5e_ptp_poll_ts_cq(struct mlx5e_cq *cq, int napi_budget)
{}

static int mlx5e_ptp_napi_poll(struct napi_struct *napi, int budget)
{}

static int mlx5e_ptp_alloc_txqsq(struct mlx5e_ptp *c, int txq_ix,
				 struct mlx5e_params *params,
				 struct mlx5e_sq_param *param,
				 struct mlx5e_txqsq *sq, int tc,
				 struct mlx5e_ptpsq *ptpsq)
{}

static void mlx5e_ptp_destroy_sq(struct mlx5_core_dev *mdev, u32 sqn)
{}

static int mlx5e_ptp_alloc_traffic_db(struct mlx5e_ptpsq *ptpsq, int numa)
{}

static void mlx5e_ptp_drain_metadata_map(struct mlx5e_ptp_metadata_map *map)
{}

static void mlx5e_ptp_free_traffic_db(struct mlx5e_ptpsq *ptpsq)
{}

static void mlx5e_ptpsq_unhealthy_work(struct work_struct *work)
{}

static int mlx5e_ptp_open_txqsq(struct mlx5e_ptp *c, u32 tisn,
				int txq_ix, struct mlx5e_ptp_params *cparams,
				int tc, struct mlx5e_ptpsq *ptpsq)
{}

static void mlx5e_ptp_close_txqsq(struct mlx5e_ptpsq *ptpsq)
{}

static int mlx5e_ptp_open_txqsqs(struct mlx5e_ptp *c,
				 struct mlx5e_ptp_params *cparams)
{}

static void mlx5e_ptp_close_txqsqs(struct mlx5e_ptp *c)
{}

static int mlx5e_ptp_open_tx_cqs(struct mlx5e_ptp *c,
				 struct mlx5e_ptp_params *cparams)
{}

static int mlx5e_ptp_open_rx_cq(struct mlx5e_ptp *c,
				struct mlx5e_ptp_params *cparams)
{}

static void mlx5e_ptp_close_tx_cqs(struct mlx5e_ptp *c)
{}

static void mlx5e_ptp_build_sq_param(struct mlx5_core_dev *mdev,
				     struct mlx5e_params *params,
				     struct mlx5e_sq_param *param)
{}

static void mlx5e_ptp_build_rq_param(struct mlx5_core_dev *mdev,
				     struct net_device *netdev,
				     struct mlx5e_ptp_params *ptp_params)
{}

static void mlx5e_ptp_build_params(struct mlx5e_ptp *c,
				   struct mlx5e_ptp_params *cparams,
				   struct mlx5e_params *orig)
{}

static int mlx5e_init_ptp_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,
			     struct mlx5e_rq *rq)
{}

static int mlx5e_ptp_open_rq(struct mlx5e_ptp *c, struct mlx5e_params *params,
			     struct mlx5e_rq_param *rq_param)
{}

static int mlx5e_ptp_open_queues(struct mlx5e_ptp *c,
				 struct mlx5e_ptp_params *cparams)
{}

static void mlx5e_ptp_close_queues(struct mlx5e_ptp *c)
{}

static int mlx5e_ptp_set_state(struct mlx5e_ptp *c, struct mlx5e_params *params)
{}

static void mlx5e_ptp_rx_unset_fs(struct mlx5e_flow_steering *fs)
{}

static int mlx5e_ptp_rx_set_fs(struct mlx5e_priv *priv)
{}

int mlx5e_ptp_open(struct mlx5e_priv *priv, struct mlx5e_params *params,
		   u8 lag_port, struct mlx5e_ptp **cp)
{}

void mlx5e_ptp_close(struct mlx5e_ptp *c)
{}

void mlx5e_ptp_activate_channel(struct mlx5e_ptp *c)
{}

void mlx5e_ptp_deactivate_channel(struct mlx5e_ptp *c)
{}

int mlx5e_ptp_get_rqn(struct mlx5e_ptp *c, u32 *rqn)
{}

int mlx5e_ptp_alloc_rx_fs(struct mlx5e_flow_steering *fs,
			  const struct mlx5e_profile *profile)
{}

void mlx5e_ptp_free_rx_fs(struct mlx5e_flow_steering *fs,
			  const struct mlx5e_profile *profile)
{}

int mlx5e_ptp_rx_manage_fs(struct mlx5e_priv *priv, bool set)
{}