linux/drivers/net/ethernet/freescale/enetc/enetc_qos.c

// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/* Copyright 2019 NXP */

#include "enetc.h"

#include <net/pkt_sched.h>
#include <linux/math64.h>
#include <linux/refcount.h>
#include <net/pkt_cls.h>
#include <net/tc_act/tc_gate.h>

static u16 enetc_get_max_gcl_len(struct enetc_hw *hw)
{}

void enetc_sched_speed_set(struct enetc_ndev_priv *priv, int speed)
{}

static int enetc_setup_taprio(struct enetc_ndev_priv *priv,
			      struct tc_taprio_qopt_offload *admin_conf)
{}

static void enetc_reset_taprio_stats(struct enetc_ndev_priv *priv)
{}

static void enetc_reset_taprio(struct enetc_ndev_priv *priv)
{}

static void enetc_taprio_destroy(struct net_device *ndev)
{}

static void enetc_taprio_stats(struct net_device *ndev,
			       struct tc_taprio_qopt_stats *stats)
{}

static void enetc_taprio_queue_stats(struct net_device *ndev,
				     struct tc_taprio_qopt_queue_stats *queue_stats)
{}

static int enetc_taprio_replace(struct net_device *ndev,
				struct tc_taprio_qopt_offload *offload)
{}

int enetc_setup_tc_taprio(struct net_device *ndev, void *type_data)
{}

static u32 enetc_get_cbs_enable(struct enetc_hw *hw, u8 tc)
{}

static u8 enetc_get_cbs_bw(struct enetc_hw *hw, u8 tc)
{}

int enetc_setup_tc_cbs(struct net_device *ndev, void *type_data)
{}

int enetc_setup_tc_txtime(struct net_device *ndev, void *type_data)
{}

enum streamid_type {};

enum streamid_vlan_tagged {};

#define ENETC_PSFP_WILDCARD
#define HANDLE_OFFSET

enum forward_type {};

/* This is for limit output type for input actions */
struct actions_fwd {};

struct psfp_streamfilter_counters {};

struct enetc_streamid {};

struct enetc_psfp_filter {};

struct enetc_psfp_gate {};

/* Only enable the green color frame now
 * Will add eir and ebs color blind, couple flag etc when
 * policing action add more offloading parameters
 */
struct enetc_psfp_meter {};

#define ENETC_PSFP_FLAGS_FMI

struct enetc_stream_filter {};

struct enetc_psfp {};

static struct actions_fwd enetc_act_fwd[] =;

static struct enetc_psfp epsfp =;

static LIST_HEAD(enetc_block_cb_list);

/* Stream Identity Entry Set Descriptor */
static int enetc_streamid_hw_set(struct enetc_ndev_priv *priv,
				 struct enetc_streamid *sid,
				 u8 enable)
{}

/* Stream Filter Instance Set Descriptor */
static int enetc_streamfilter_hw_set(struct enetc_ndev_priv *priv,
				     struct enetc_psfp_filter *sfi,
				     u8 enable)
{}

static int enetc_streamcounter_hw_get(struct enetc_ndev_priv *priv,
				      u32 index,
				      struct psfp_streamfilter_counters *cnt)
{}

static u64 get_ptp_now(struct enetc_hw *hw)
{}

static int get_start_ns(u64 now, u64 cycle, u64 *start)
{}

/* Stream Gate Instance Set Descriptor */
static int enetc_streamgate_hw_set(struct enetc_ndev_priv *priv,
				   struct enetc_psfp_gate *sgi,
				   u8 enable)
{}

static int enetc_flowmeter_hw_set(struct enetc_ndev_priv *priv,
				  struct enetc_psfp_meter *fmi,
				  u8 enable)
{}

static struct enetc_stream_filter *enetc_get_stream_by_index(u32 index)
{}

static struct enetc_psfp_gate *enetc_get_gate_by_index(u32 index)
{}

static struct enetc_psfp_filter *enetc_get_filter_by_index(u32 index)
{}

static struct enetc_psfp_meter *enetc_get_meter_by_index(u32 index)
{}

static struct enetc_psfp_filter
	*enetc_psfp_check_sfi(struct enetc_psfp_filter *sfi)
{}

static int enetc_get_free_index(struct enetc_ndev_priv *priv)
{}

static void stream_filter_unref(struct enetc_ndev_priv *priv, u32 index)
{}

static void stream_gate_unref(struct enetc_ndev_priv *priv, u32 index)
{}

static void flow_meter_unref(struct enetc_ndev_priv *priv, u32 index)
{}

static void remove_one_chain(struct enetc_ndev_priv *priv,
			     struct enetc_stream_filter *filter)
{}

static int enetc_psfp_hw_set(struct enetc_ndev_priv *priv,
			     struct enetc_streamid *sid,
			     struct enetc_psfp_filter *sfi,
			     struct enetc_psfp_gate *sgi,
			     struct enetc_psfp_meter *fmi)
{}

static struct actions_fwd *
enetc_check_flow_actions(u64 acts, unsigned long long inputkeys)
{}

static int enetc_psfp_policer_validate(const struct flow_action *action,
				       const struct flow_action_entry *act,
				       struct netlink_ext_ack *extack)
{}

static int enetc_psfp_parse_clsflower(struct enetc_ndev_priv *priv,
				      struct flow_cls_offload *f)
{}

static int enetc_config_clsflower(struct enetc_ndev_priv *priv,
				  struct flow_cls_offload *cls_flower)
{}

static int enetc_psfp_destroy_clsflower(struct enetc_ndev_priv *priv,
					struct flow_cls_offload *f)
{}

static int enetc_destroy_clsflower(struct enetc_ndev_priv *priv,
				   struct flow_cls_offload *f)
{}

static int enetc_psfp_get_stats(struct enetc_ndev_priv *priv,
				struct flow_cls_offload *f)
{}

static int enetc_setup_tc_cls_flower(struct enetc_ndev_priv *priv,
				     struct flow_cls_offload *cls_flower)
{}

static inline void clean_psfp_sfi_bitmap(void)
{}

static void clean_stream_list(void)
{}

static void clean_sfi_list(void)
{}

static void clean_sgi_list(void)
{}

static void clean_psfp_all(void)
{}

int enetc_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
			    void *cb_priv)
{}

int enetc_set_psfp(struct net_device *ndev, bool en)
{}

int enetc_psfp_init(struct enetc_ndev_priv *priv)
{}

int enetc_psfp_clean(struct enetc_ndev_priv *priv)
{}

int enetc_setup_tc_psfp(struct net_device *ndev, void *type_data)
{}

int enetc_qos_query_caps(struct net_device *ndev, void *type_data)
{}