mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 13:46:47 +07:00
075640e364
The Kconfig currently controlling compilation of this code is: net/sched/Kconfig:menuconfig NET_SCHED net/sched/Kconfig: bool "QoS and/or fair queueing" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We can change to one of the other priority initcalls (subsys?) at any later date, if desired. We also delete the MODULE_LICENSE tag since all that information is already contained at the top of the file in the comments. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
/*
|
|
* net/sched/sch_blackhole.c Black hole queue
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*
|
|
* Authors: Thomas Graf <tgraf@suug.ch>
|
|
*
|
|
* Note: Quantum tunneling is not supported.
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/skbuff.h>
|
|
#include <net/pkt_sched.h>
|
|
|
|
static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|
{
|
|
qdisc_drop(skb, sch);
|
|
return NET_XMIT_SUCCESS;
|
|
}
|
|
|
|
static struct sk_buff *blackhole_dequeue(struct Qdisc *sch)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static struct Qdisc_ops blackhole_qdisc_ops __read_mostly = {
|
|
.id = "blackhole",
|
|
.priv_size = 0,
|
|
.enqueue = blackhole_enqueue,
|
|
.dequeue = blackhole_dequeue,
|
|
.peek = blackhole_dequeue,
|
|
.owner = THIS_MODULE,
|
|
};
|
|
|
|
static int __init blackhole_init(void)
|
|
{
|
|
return register_qdisc(&blackhole_qdisc_ops);
|
|
}
|
|
device_initcall(blackhole_init)
|