lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20081014095308.GB10804@ff.dom.local>
Date:	Tue, 14 Oct 2008 09:53:09 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: [PATCH 01/14] pkt_sched: Add qdisc_dequeue() helper.

-------- Original Message --------
Subject: [PATCH 3/9]: pkt_sched: Add qdisc_dequeue() helper.
Date: Mon, 18 Aug 2008 01:36:55 -0700 (PDT)
From: David Miller <davem@...emloft.net>

Modified sch_generic.c part.

------------->
From: David Miller <davem@...emloft.net>
pkt_sched: Add qdisc_dequeue() helper.

It prioritizes packets on the ->requeue list.

Use in qdisc_restart() as it's basically a complete
copy of dequeue_skb().

Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
---
 include/net/sch_generic.h |    8 ++++++++
 net/sched/sch_generic.c   |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 3fe49d8..00c1309 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -369,6 +369,14 @@ enum net_xmit_qdisc_t {
 #define net_xmit_drop_count(e)	(1)
 #endif
 
+static inline struct sk_buff *qdisc_dequeue(struct Qdisc *sch)
+{
+	struct sk_buff *skb = __skb_dequeue(&sch->requeue);
+	if (!skb)
+		skb = sch->dequeue(sch);
+	return skb;
+}
+
 static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
 #ifdef CONFIG_NET_SCHED
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 7b5572d..6730bac 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -66,7 +66,7 @@ static inline struct sk_buff *dequeue_skb(struct Qdisc *q)
 		else
 			skb = NULL;
 	} else {
-		skb = q->dequeue(q);
+		skb = qdisc_dequeue(q);
 	}
 
 	return skb;
-- 
1.5.6.5

To: 
Cc: 
Bcc: 
Subject: 
Reply-To: 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ