提交 94df109a 编写于 作者: T Thomas Graf 提交者: David S. Miller

[PKT_SCHED]: noop/noqueue qdisc style cleanups

Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f87a9c3d
...@@ -243,31 +243,27 @@ static void dev_watchdog_down(struct net_device *dev) ...@@ -243,31 +243,27 @@ static void dev_watchdog_down(struct net_device *dev)
cheaper. cheaper.
*/ */
static int static int noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc)
noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc)
{ {
kfree_skb(skb); kfree_skb(skb);
return NET_XMIT_CN; return NET_XMIT_CN;
} }
static struct sk_buff * static struct sk_buff *noop_dequeue(struct Qdisc * qdisc)
noop_dequeue(struct Qdisc * qdisc)
{ {
return NULL; return NULL;
} }
static int static int noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
{ {
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "%s deferred output. It is buggy.\n", skb->dev->name); printk(KERN_DEBUG "%s deferred output. It is buggy.\n",
skb->dev->name);
kfree_skb(skb); kfree_skb(skb);
return NET_XMIT_CN; return NET_XMIT_CN;
} }
struct Qdisc_ops noop_qdisc_ops = { struct Qdisc_ops noop_qdisc_ops = {
.next = NULL,
.cl_ops = NULL,
.id = "noop", .id = "noop",
.priv_size = 0, .priv_size = 0,
.enqueue = noop_enqueue, .enqueue = noop_enqueue,
...@@ -285,8 +281,6 @@ struct Qdisc noop_qdisc = { ...@@ -285,8 +281,6 @@ struct Qdisc noop_qdisc = {
}; };
static struct Qdisc_ops noqueue_qdisc_ops = { static struct Qdisc_ops noqueue_qdisc_ops = {
.next = NULL,
.cl_ops = NULL,
.id = "noqueue", .id = "noqueue",
.priv_size = 0, .priv_size = 0,
.enqueue = noop_enqueue, .enqueue = noop_enqueue,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册