linux/net/sched/sch_red.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * net/sched/sch_red.c	Random Early Detection queue.
 *
 * Authors:	Alexey Kuznetsov, <[email protected]>
 *
 * Changes:
 * J Hadi Salim 980914:	computation fixes
 * Alexey Makarenko <[email protected]> 990814: qave on idle link was calculated incorrectly.
 * J Hadi Salim 980816:  ECN support
 */

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


/*	Parameters, settable by user:
	-----------------------------

	limit		- bytes (must be > qth_max + burst)

	Hard limit on queue length, should be chosen >qth_max
	to allow packet bursts. This parameter does not
	affect the algorithms behaviour and can be chosen
	arbitrarily high (well, less than ram size)
	Really, this limit will never be reached
	if RED works correctly.
 */

struct red_sched_data {};

#define TC_RED_SUPPORTED_FLAGS

static inline int red_use_ecn(struct red_sched_data *q)
{}

static inline int red_use_harddrop(struct red_sched_data *q)
{}

static int red_use_nodrop(struct red_sched_data *q)
{}

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

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

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

static void red_reset(struct Qdisc *sch)
{}

static int red_offload(struct Qdisc *sch, bool enable)
{}

static void red_destroy(struct Qdisc *sch)
{}

static const struct nla_policy red_policy[TCA_RED_MAX + 1] =;

static int __red_change(struct Qdisc *sch, struct nlattr **tb,
			struct netlink_ext_ack *extack)
{}

static inline void red_adaptative_timer(struct timer_list *t)
{}

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

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

static int red_dump_offload_stats(struct Qdisc *sch)
{}

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

static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
{}

static int red_dump_class(struct Qdisc *sch, unsigned long cl,
			  struct sk_buff *skb, struct tcmsg *tcm)
{}

static void red_graft_offload(struct Qdisc *sch,
			      struct Qdisc *new, struct Qdisc *old,
			      struct netlink_ext_ack *extack)
{}

static int red_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
		     struct Qdisc **old, struct netlink_ext_ack *extack)
{}

static struct Qdisc *red_leaf(struct Qdisc *sch, unsigned long arg)
{}

static unsigned long red_find(struct Qdisc *sch, u32 classid)
{}

static void red_walk(struct Qdisc *sch, struct qdisc_walker *walker)
{}

static const struct Qdisc_class_ops red_class_ops =;

static struct Qdisc_ops red_qdisc_ops __read_mostly =;
MODULE_ALIAS_NET_SCH();

static int __init red_module_init(void)
{}

static void __exit red_module_exit(void)
{}

module_init()
module_exit()

MODULE_LICENSE();
MODULE_DESCRIPTION();