Displaying 4 results from an estimated 4 matches for "dly_sched_data".
2004 Mar 18
6
[PATCH] packet delay scheduler
...ude <net/route.h>
+#include <linux/skbuff.h>
+#include <net/sock.h>
+#include <net/pkt_sched.h>
+
+/* Network delay simulator
+ This scheduler adds a fixed delay to all packets.
+ Similar to NISTnet and BSD Dummynet.
+
+ It uses byte fifo underneath similar to TBF */
+struct dly_sched_data {
+ u32 latency;
+ u32 limit;
+ struct timer_list timer;
+ struct Qdisc *qdisc;
+};
+
+/* Time stamp put into socket buffer control block */
+struct dly_skb_cb {
+ psched_time_t queuetime;
+};
+
+/* Enqueue packets with underlying discipline (fifo)
+ * but mark them with current time first.
+ */
+s...
2004 Jul 01
20
[PATCH 2.6] update to network emulation QOS scheduler
...ude <net/route.h>
-#include <linux/skbuff.h>
-#include <net/sock.h>
-#include <net/pkt_sched.h>
-
-/* Network delay simulator
- This scheduler adds a fixed delay to all packets.
- Similar to NISTnet and BSD Dummynet.
-
- It uses byte fifo underneath similar to TBF */
-struct dly_sched_data {
- u32 latency;
- u32 limit;
- u32 loss;
- struct timer_list timer;
- struct Qdisc *qdisc;
-};
-
-/* Time stamp put into socket buffer control block */
-struct dly_skb_cb {
- psched_time_t queuetime;
-};
-
-/* Enqueue packets with underlying discipline (fifo)
- * but mark them with current time fi...
2004 Jun 17
1
[PATCH] (2/4) delay scheduler - retry if requeue fails
...phen Hemminger <shemminger@osdl.org>
diff -Nru a/net/sched/sch_delay.c b/net/sched/sch_delay.c
--- a/net/sched/sch_delay.c 2004-06-17 15:19:07 -07:00
+++ b/net/sched/sch_delay.c 2004-06-17 15:19:07 -07:00
@@ -104,8 +104,10 @@
static struct sk_buff *dly_dequeue(struct Qdisc *sch)
{
struct dly_sched_data *q = (struct dly_sched_data *)sch->data;
- struct sk_buff *skb = q->qdisc->dequeue(q->qdisc);
+ struct sk_buff *skb;
+ retry:
+ skb = q->qdisc->dequeue(q->qdisc);
if (skb) {
struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
psched_time_t now;
@@ -120,6 +122,12...
2004 Jun 17
1
[PATCH] (4/4) add loss option to network delay scheduler
...7 15:26:51 -07:00
@@ -437,5 +437,6 @@
{
__u32 latency;
__u32 limit;
-};
+ __u32 loss;
+};
#endif
diff -Nru a/net/sched/sch_delay.c b/net/sched/sch_delay.c
--- a/net/sched/sch_delay.c 2004-06-17 15:26:51 -07:00
+++ b/net/sched/sch_delay.c 2004-06-17 15:26:51 -07:00
@@ -40,6 +40,7 @@
struct dly_sched_data {
u32 latency;
u32 limit;
+ u32 loss;
struct timer_list timer;
struct Qdisc *qdisc;
};
@@ -58,6 +59,12 @@
struct dly_skb_cb *cb = (struct dly_skb_cb *)skb->cb;
int ret;
+ /* Random packet drop 0 => none, ~0 => all */
+ if (q->loss >= net_random()) {
+ sch->stats.dr...