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

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */

#include <net/pkt_cls.h>
#include "htb.h"
#include "en.h"
#include "../qos.h"

struct mlx5e_qos_node {};

struct mlx5e_htb {};

#define MLX5E_QOS_QID_INNER
#define MLX5E_HTB_CLASSID_ROOT

/* Software representation of the QoS tree */

int mlx5e_htb_enumerate_leaves(struct mlx5e_htb *htb, mlx5e_fp_htb_enumerate callback, void *data)
{}

int mlx5e_htb_cur_leaf_nodes(struct mlx5e_htb *htb)
{}

static int mlx5e_htb_find_unused_qos_qid(struct mlx5e_htb *htb)
{}

static struct mlx5e_qos_node *
mlx5e_htb_node_create_leaf(struct mlx5e_htb *htb, u16 classid, u16 qid,
			   struct mlx5e_qos_node *parent)
{}

static struct mlx5e_qos_node *mlx5e_htb_node_create_root(struct mlx5e_htb *htb)
{}

static struct mlx5e_qos_node *mlx5e_htb_node_find(struct mlx5e_htb *htb, u32 classid)
{}

static struct mlx5e_qos_node *mlx5e_htb_node_find_rcu(struct mlx5e_htb *htb, u32 classid)
{}

static void mlx5e_htb_node_delete(struct mlx5e_htb *htb, struct mlx5e_qos_node *node)
{}

/* TX datapath API */

int mlx5e_htb_get_txq_by_classid(struct mlx5e_htb *htb, u16 classid)
{}

/* HTB TC handlers */

static int
mlx5e_htb_root_add(struct mlx5e_htb *htb, u16 htb_maj_id, u16 htb_defcls,
		   struct netlink_ext_ack *extack)
{}

static int mlx5e_htb_root_del(struct mlx5e_htb *htb)
{}

static int mlx5e_htb_convert_rate(struct mlx5e_htb *htb, u64 rate,
				  struct mlx5e_qos_node *parent, u32 *bw_share)
{}

static void mlx5e_htb_convert_ceil(struct mlx5e_htb *htb, u64 ceil, u32 *max_average_bw)
{}

int
mlx5e_htb_leaf_alloc_queue(struct mlx5e_htb *htb, u16 classid,
			   u32 parent_classid, u64 rate, u64 ceil,
			   struct netlink_ext_ack *extack)
{}

int
mlx5e_htb_leaf_to_inner(struct mlx5e_htb *htb, u16 classid, u16 child_classid,
			u64 rate, u64 ceil, struct netlink_ext_ack *extack)
{}

static struct mlx5e_qos_node *mlx5e_htb_node_find_by_qid(struct mlx5e_htb *htb, u16 qid)
{}

int mlx5e_htb_leaf_del(struct mlx5e_htb *htb, u16 *classid,
		       struct netlink_ext_ack *extack)
{}

int
mlx5e_htb_leaf_del_last(struct mlx5e_htb *htb, u16 classid, bool force,
			struct netlink_ext_ack *extack)
{}

static int
mlx5e_htb_update_children(struct mlx5e_htb *htb, struct mlx5e_qos_node *node,
			  struct netlink_ext_ack *extack)
{}

int
mlx5e_htb_node_modify(struct mlx5e_htb *htb, u16 classid, u64 rate, u64 ceil,
		      struct netlink_ext_ack *extack)
{}

struct mlx5e_htb *mlx5e_htb_alloc(void)
{}

void mlx5e_htb_free(struct mlx5e_htb *htb)
{}

int mlx5e_htb_init(struct mlx5e_htb *htb, struct tc_htb_qopt_offload *htb_qopt,
		   struct net_device *netdev, struct mlx5_core_dev *mdev,
		   struct mlx5e_selq *selq, struct mlx5e_priv *priv)
{}

void mlx5e_htb_cleanup(struct mlx5e_htb *htb)
{}