linux/net/sched/sch_gred.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * net/sched/sch_gred.c	Generic Random Early Detection queue.
 *
 * Authors:    J Hadi Salim ([email protected]) 1998-2002
 *
 *             991129: -  Bug fix with grio mode
 *		       - a better sing. AvgQ mode with Grio(WRED)
 *		       - A finer grained VQ dequeue based on suggestion
 *		         from Ren Liu
 *		       - More error checks
 *
 *  For all the glorious comments look at include/net/red.h
 */

#include <linux/slab.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <net/pkt_cls.h>
#include <net/pkt_sched.h>
#include <net/red.h>

#define GRED_DEF_PRIO
#define GRED_VQ_MASK

#define GRED_VQ_RED_FLAGS

struct gred_sched_data;
struct gred_sched;

struct gred_sched_data {};

enum {};

struct gred_sched {};

static inline int gred_wred_mode(struct gred_sched *table)
{}

static inline void gred_enable_wred_mode(struct gred_sched *table)
{}

static inline void gred_disable_wred_mode(struct gred_sched *table)
{}

static inline int gred_rio_mode(struct gred_sched *table)
{}

static inline void gred_enable_rio_mode(struct gred_sched *table)
{}

static inline void gred_disable_rio_mode(struct gred_sched *table)
{}

static inline int gred_wred_mode_check(struct Qdisc *sch)
{}

static inline unsigned int gred_backlog(struct gred_sched *table,
					struct gred_sched_data *q,
					struct Qdisc *sch)
{}

static inline u16 tc_index_to_dp(struct sk_buff *skb)
{}

static inline void gred_load_wred_set(const struct gred_sched *table,
				      struct gred_sched_data *q)
{}

static inline void gred_store_wred_set(struct gred_sched *table,
				       struct gred_sched_data *q)
{}

static int gred_use_ecn(struct gred_sched_data *q)
{}

static int gred_use_harddrop(struct gred_sched_data *q)
{}

static bool gred_per_vq_red_flags_used(struct gred_sched *table)
{}

static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch,
			struct sk_buff **to_free)
{}

static struct sk_buff *gred_dequeue(struct Qdisc *sch)
{}

static void gred_reset(struct Qdisc *sch)
{}

static void gred_offload(struct Qdisc *sch, enum tc_gred_command command)
{}

static int gred_offload_dump_stats(struct Qdisc *sch)
{}

static inline void gred_destroy_vq(struct gred_sched_data *q)
{}

static int gred_change_table_def(struct Qdisc *sch, struct nlattr *dps,
				 struct netlink_ext_ack *extack)
{}

static inline int gred_change_vq(struct Qdisc *sch, int dp,
				 struct tc_gred_qopt *ctl, int prio,
				 u8 *stab, u32 max_P,
				 struct gred_sched_data **prealloc,
				 struct netlink_ext_ack *extack)
{}

static const struct nla_policy gred_vq_policy[TCA_GRED_VQ_MAX + 1] =;

static const struct nla_policy gred_vqe_policy[TCA_GRED_VQ_ENTRY_MAX + 1] =;

static const struct nla_policy gred_policy[TCA_GRED_MAX + 1] =;

static void gred_vq_apply(struct gred_sched *table, const struct nlattr *entry)
{}

static void gred_vqs_apply(struct gred_sched *table, struct nlattr *vqs)
{}

static int gred_vq_validate(struct gred_sched *table, u32 cdp,
			    const struct nlattr *entry,
			    struct netlink_ext_ack *extack)
{}

static int gred_vqs_validate(struct gred_sched *table, u32 cdp,
			     struct nlattr *vqs, struct netlink_ext_ack *extack)
{}

static int gred_change(struct Qdisc *sch, struct nlattr *opt,
		       struct netlink_ext_ack *extack)
{}

static int gred_init(struct Qdisc *sch, struct nlattr *opt,
		     struct netlink_ext_ack *extack)
{}

static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
{}

static void gred_destroy(struct Qdisc *sch)
{}

static struct Qdisc_ops gred_qdisc_ops __read_mostly =;
MODULE_ALIAS_NET_SCH();

static int __init gred_module_init(void)
{}

static void __exit gred_module_exit(void)
{}

module_init()
module_exit()

MODULE_LICENSE();
MODULE_DESCRIPTION();