#include <linux/ethtool.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <linux/units.h>
#include <net/netevent.h>
#include <net/netlink.h>
#include <net/sch_generic.h>
#include <net/pkt_sched.h>
static LIST_HEAD(cbs_list);
static DEFINE_SPINLOCK(cbs_list_lock);
struct cbs_sched_data { … };
static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct Qdisc *child,
struct sk_buff **to_free)
{ … }
static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{ … }
static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{ … }
static int cbs_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{ … }
static s64 timediff_to_credits(s64 timediff, s64 slope)
{ … }
static s64 delay_from_credits(s64 credits, s64 slope)
{ … }
static s64 credits_from_len(unsigned int len, s64 slope, s64 port_rate)
{ … }
static struct sk_buff *cbs_child_dequeue(struct Qdisc *sch, struct Qdisc *child)
{ … }
static struct sk_buff *cbs_dequeue_soft(struct Qdisc *sch)
{ … }
static struct sk_buff *cbs_dequeue_offload(struct Qdisc *sch)
{ … }
static struct sk_buff *cbs_dequeue(struct Qdisc *sch)
{ … }
static const struct nla_policy cbs_policy[TCA_CBS_MAX + 1] = …;
static void cbs_disable_offload(struct net_device *dev,
struct cbs_sched_data *q)
{ … }
static int cbs_enable_offload(struct net_device *dev, struct cbs_sched_data *q,
const struct tc_cbs_qopt *opt,
struct netlink_ext_ack *extack)
{ … }
static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
{ … }
static int cbs_dev_notifier(struct notifier_block *nb, unsigned long event,
void *ptr)
{ … }
static int cbs_change(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
{ … }
static int cbs_init(struct Qdisc *sch, struct nlattr *opt,
struct netlink_ext_ack *extack)
{ … }
static void cbs_destroy(struct Qdisc *sch)
{ … }
static int cbs_dump(struct Qdisc *sch, struct sk_buff *skb)
{ … }
static int cbs_dump_class(struct Qdisc *sch, unsigned long cl,
struct sk_buff *skb, struct tcmsg *tcm)
{ … }
static int cbs_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
struct Qdisc **old, struct netlink_ext_ack *extack)
{ … }
static struct Qdisc *cbs_leaf(struct Qdisc *sch, unsigned long arg)
{ … }
static unsigned long cbs_find(struct Qdisc *sch, u32 classid)
{ … }
static void cbs_walk(struct Qdisc *sch, struct qdisc_walker *walker)
{ … }
static const struct Qdisc_class_ops cbs_class_ops = …;
static struct Qdisc_ops cbs_qdisc_ops __read_mostly = …;
MODULE_ALIAS_NET_SCH(…) …;
static struct notifier_block cbs_device_notifier = …;
static int __init cbs_module_init(void)
{ … }
static void __exit cbs_module_exit(void)
{ … }
module_init(…) …
module_exit(…)
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;