Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17045755 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: sched: factorize code (qdisc_drop())



Use qdisc_drop() helper where possible.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 041441d0
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -332,9 +332,7 @@ static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch)
	}

	q->stats.pdrop++;
	sch->qstats.drops++;
	kfree_skb(skb);
	return NET_XMIT_DROP;
	return qdisc_drop(skb, sch);

congestion_drop:
	qdisc_drop(skb, sch);
+1 −2
Original line number Diff line number Diff line
@@ -265,8 +265,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch)
	return NET_XMIT_SUCCESS;

drop:
	kfree_skb(skb);
	sch->qstats.drops++;
	qdisc_drop(skb, sch);
	return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
}

+1 −3
Original line number Diff line number Diff line
@@ -558,9 +558,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
			__skb_queue_tail(&q->direct_queue, skb);
			q->direct_pkts++;
		} else {
			kfree_skb(skb);
			sch->qstats.drops++;
			return NET_XMIT_DROP;
			return qdisc_drop(skb, sch);
		}
#ifdef CONFIG_NET_CLS_ACT
	} else if (!cl) {
+1 −3
Original line number Diff line number Diff line
@@ -88,9 +88,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc *sch)
		return NET_XMIT_SUCCESS;
	}

	kfree_skb(skb);
	sch->qstats.drops++;
	return NET_XMIT_DROP;
	return qdisc_drop(skb, sch);
}

static struct sk_buff *