linux/net/sched/sch_fq_pie.c

// SPDX-License-Identifier: GPL-2.0-only
/* Flow Queue PIE discipline
 *
 * Copyright (C) 2019 Mohit P. Tahiliani <[email protected]>
 * Copyright (C) 2019 Sachin D. Patil <[email protected]>
 * Copyright (C) 2019 V. Saicharan <[email protected]>
 * Copyright (C) 2019 Mohit Bhasi <[email protected]>
 * Copyright (C) 2019 Leslie Monis <[email protected]>
 * Copyright (C) 2019 Gautam Ramakrishnan <[email protected]>
 */

#include <linux/jhash.h>
#include <linux/module.h>
#include <linux/sizes.h>
#include <linux/vmalloc.h>
#include <net/pkt_cls.h>
#include <net/pie.h>

/* Flow Queue PIE
 *
 * Principles:
 *   - Packets are classified on flows.
 *   - This is a Stochastic model (as we use a hash, several flows might
 *                                 be hashed to the same slot)
 *   - Each flow has a PIE managed queue.
 *   - Flows are linked onto two (Round Robin) lists,
 *     so that new flows have priority on old ones.
 *   - For a given flow, packets are not reordered.
 *   - Drops during enqueue only.
 *   - ECN capability is off by default.
 *   - ECN threshold (if ECN is enabled) is at 10% by default.
 *   - Uses timestamps to calculate queue delay by default.
 */

/**
 * struct fq_pie_flow - contains data for each flow
 * @vars:	pie vars associated with the flow
 * @deficit:	number of remaining byte credits
 * @backlog:	size of data in the flow
 * @qlen:	number of packets in the flow
 * @flowchain:	flowchain for the flow
 * @head:	first packet in the flow
 * @tail:	last packet in the flow
 */
struct fq_pie_flow {};

struct fq_pie_sched_data {};

static unsigned int fq_pie_hash(const struct fq_pie_sched_data *q,
				struct sk_buff *skb)
{}

static unsigned int fq_pie_classify(struct sk_buff *skb, struct Qdisc *sch,
				    int *qerr)
{}

/* add skb to flow queue (tail add) */
static inline void flow_queue_add(struct fq_pie_flow *flow,
				  struct sk_buff *skb)
{}

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

static const struct netlink_range_validation fq_pie_q_range =;

static const struct nla_policy fq_pie_policy[TCA_FQ_PIE_MAX + 1] =;

static inline struct sk_buff *dequeue_head(struct fq_pie_flow *flow)
{}

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

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

static void fq_pie_timer(struct timer_list *t)
{}

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

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

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

static void fq_pie_reset(struct Qdisc *sch)
{}

static void fq_pie_destroy(struct Qdisc *sch)
{}

static struct Qdisc_ops fq_pie_qdisc_ops __read_mostly =;
MODULE_ALIAS_NET_SCH();

static int __init fq_pie_module_init(void)
{}

static void __exit fq_pie_module_exit(void)
{}

module_init();
module_exit(fq_pie_module_exit);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();