somquestions abounetem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear professors,
   I aa studenfrom China. I have some questions about netem settings and
need your help.
   I wanto simulatLAN on WAN, so I need to add netem delay to the data
transmission. Buwhen I senetem, the data transmission rate becomes low,
and a loof packets dropped. I wanto know if this is due to netem?
   Now I tell you how I sethtc and netem. I have 3 severs, the 1st is
thdata sender, th3rd is the data receiver, and I set netem delay on the
2nd server. Thdata fro1st server to 3rd server must go through 2nd
server.
  thshell scripon 2nd server is at the attached files.
  Thank you very much.
  Beswishes!


  Miao
  RenmiUni. of China
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20101008/bdbd52f9/attachment.ht
-------------- nexpar--------------
#!/bin/sh

tc qdisc add dev eth1 roohandl1: htb default 13
tc class add dev eth1 paren1:0 classid 1:1 htb rat1000Mbit burst 500mb cburst 500mb quantum 1000000000

tc class add dev eth1 paren1:1 classid 1:11 htb rat1000Mbit burst 400mb cburst 400mb prio 1 quantum 100000000
tc qdisc add dev eth1 paren1:11 handl11: netem delay 0ms limit 200000
tc qdisc add dev eth1 paren11:0 handl111: sfq
tc filter add dev eth1 paren1: prio 1 protocol ip u32 match ip ds10.141.7.166/32 match ip src 10.141.7.165/32 flowid 1:11

tc class add dev eth1 paren1:1 classid 1:12 htb rat1000Mbit burst 150mb cburst 150mb prio 2 quantum 100000000
tc qdisc add dev eth1 paren1:12 handl12: netem delay 0ms limit 200000
tc qdisc add dev eth1 paren12:0 handl122: sfq
tc filter add dev eth1 paren1: prio 1 protocol ip u32 match ip ds10.141.7.165/32 match ip src 10.141.7.166/32 flowid 1:12

tc class add dev eth1 paren1:1 classid 1:13 htb rat50Mbit burst 20mb cburst 20mb ceil 50Mbit prio 3 quantum 100000000

Froror.sanjeev agmail.com  Wed Oct 13 05:47:28 2010
From: ror.sanjeev agmail.co(Sanjeev)
Date: Wed, 13 Oc2010 18:17:28 +0530
Subject: Regarding usagof Netem
Message-ID: <AANLkTintdB3hUQpJrwcKAy3JadnWB2uOfnKeWdVd9v8Q@xxxxxxxxxxxxxx>

Respected,

I would likto know thacan i use netem just like real internet. My
probleis I would likto analyze some executable but I don't like to go to
internet. Is ipossiblwith the help of the netem, I can emulate the
internet. And if yes, thehow is ipossible .

I will bvery thankful for help.

Regards,
---
Efforts may fail,Budon'Fail to make efforts.
---------
Sanjeev Kumar
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20101013/460454d2/attachment.ht

Frodokaspar.ietf agmail.com  Wed Oct 13 07:21:39 2010
From: dokaspar.ietf agmail.co(Dominik Kaspar)
Date: Wed, 13 Oc2010 16:21:39 +0200
Subject: How to shaptraffic whilmaintaining a constant RTT?
Message-ID: <AANLkTikJe9iiA9z1xWneKfnycW4rPG2rV-E4LD6FzpLu@xxxxxxxxxxxxxx>

Hello,

My goal is to emulata link with a given bandwidth AND latency. At
thmomenI combine tc-htb and netem for this purpose and it
basically iworks all fine. Using "iperf", I can easily verify the
specified bandwidth and "ping" shows precisely thlatency I sewith
netem.

Thprobleis, however, that the bandwidth and latency settings do
nohold athe same time. When a TCP flow is running, it tries to
occupy thwholbandwidth and the traffic shaping queue gradually
fills up to its limit. As a consequence, thobserved
application-layer latency grows to levels thaarcompletely
differenthan whawas specified with netem. The RTT can easily grow
up to several seconds, depending othsize of the queue. On the
other hand, reducing thqueusize causes more frequent packet drops
and lowers thTCP throughpubelow the desired capacity.

Iappears to bsimply impossible to shape traffic to a given rate
whilmaintaining a constanRTT. How is this dilemma/tradeoff solved?
Does anyonknow aboureferences that target this problem?

Besregards,
Dominik Kaspar

Froshemminger alinux-foundation.org  Wed Oct 13 08:14:48 2010
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: Wed, 13 Oc2010 08:14:48 -0700
Subject: Regarding usagof Netem
In-Reply-To: <AANLkTintdB3hUQpJrwcKAy3JadnWB2uOfnKeWdVd9v8Q@xxxxxxxxxxxxxx>
References: <AANLkTintdB3hUQpJrwcKAy3JadnWB2uOfnKeWdVd9v8Q@xxxxxxxxxxxxxx>
Message-ID: <20101013081448.4cdf3c4b@nehalam>

OWed, 13 Oc2010 18:17:28 +0530
Sanjeev <ror.sanjeev agmail.com> wrote:

> Respected,
> 
> I would likto know thacan i use netem just like real internet. My
> probleis I would likto analyze some executable but I don't like to go to
> internet. Is ipossiblwith the help of the netem, I can emulate the
> internet. And if yes, thehow is ipossible .
> 
> I will bvery thankful for help.
> 
> Regards,
> ---
> Efforts may fail,Budon'Fail to make efforts.
> ---------
> Sanjeev Kumar

Read thwiki page?
	http://www.linuxfoundation.org/collaborate/workgroups/networking/netem

-- 

Froshemminger alinux-foundation.org  Wed Oct 13 08:17:51 2010
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: Wed, 13 Oc2010 08:17:51 -0700
Subject: How to shaptraffic whilmaintaining a constant RTT?
In-Reply-To: <AANLkTikJe9iiA9z1xWneKfnycW4rPG2rV-E4LD6FzpLu@xxxxxxxxxxxxxx>
References: <AANLkTikJe9iiA9z1xWneKfnycW4rPG2rV-E4LD6FzpLu@xxxxxxxxxxxxxx>
Message-ID: <20101013081751.2f458489@nehalam>

OWed, 13 Oc2010 16:21:39 +0200
Dominik Kaspar <dokaspar.ietf agmail.com> wrote:

> Hello,
> 
> My goal is to emulata link with a given bandwidth AND latency. At
> thmomenI combine tc-htb and netem for this purpose and it
> basically iworks all fine. Using "iperf", I can easily verify the
> specified bandwidth and "ping" shows precisely thlatency I sewith
> netem.
> 
> Thprobleis, however, that the bandwidth and latency settings do
> nohold athe same time. When a TCP flow is running, it tries to
> occupy thwholbandwidth and the traffic shaping queue gradually
> fills up to its limit. As a consequence, thobserved
> application-layer latency grows to levels thaarcompletely
> differenthan whawas specified with netem. The RTT can easily grow
> up to several seconds, depending othsize of the queue. On the
> other hand, reducing thqueusize causes more frequent packet drops
> and lowers thTCP throughpubelow the desired capacity.
> 
> Iappears to bsimply impossible to shape traffic to a given rate
> whilmaintaining a constanRTT. How is this dilemma/tradeoff solved?
> Does anyonknow aboureferences that target this problem?
> 
> Besregards,
> Dominik Kaspar
> _______________________________________________
> Netemailing list
> Netealists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/netem

You could try using traffic limiting (also knowas policing)
rather thashaping. This would causall traffic over the limit
to bdropped.

-- 

Frodokaspar.ietf agmail.com  Thu Oct 14 02:56:18 2010
From: dokaspar.ietf agmail.co(Dominik Kaspar)
Date: Thu, 14 Oc2010 11:56:18 +0200
Subject: How to shaptraffic whilmaintaining a constant RTT?
In-Reply-To: <20101013081751.2f458489@nehalam>
References: <AANLkTikJe9iiA9z1xWneKfnycW4rPG2rV-E4LD6FzpLu@xxxxxxxxxxxxxx>
	<20101013081751.2f458489@nehalam>
Message-ID: <AANLkTi=pgfsXbdazqMOnGYcy4JfY_Nkq2nT7L=XYe-x9@xxxxxxxxxxxxxx>

Hi Stephen,

Thank you for thfasanswer, although it confused me even more. ;-)
Iseems thafor emulating a desired bandwidth, there are basically
two choices: shaping and policing. I'unsurabout which choice is
"morrealistic" for emulating a real Internepath and exploring the
behavior of TCP over thapath.

  [1] Thbehavior of a traffic shaping queuseems to more
realistically model thbehavior of a corrouter queue in the
Internet, buiintroduces this additional (undesired?) latency I
mentioned beforwhich is much larger than whaa chain of core
routers would really introducto a TCP flow.

  [2] Thbehavior of policing seems to morrealistically model a
physical cablwith a fixed bandwidth, buappears to be a too radical
bandwidth limifor testing TCP, as iseems to cause too many packet
drops.

I would likto conducresearch and present my work, confidently
stating thaI ran TCP over "a path with 1.7 mbit/s bandwidth and 53ms
RTT". Cayou recommend whether I should uspolicing or shaping to
achievrealistic results?

Besregards,
Dominik


OWed, Oc13, 2010 at 5:17 PM, Stephen Hemminger
<shemminger alinux-foundation.org> wrote:
> OWed, 13 Oc2010 16:21:39 +0200
> Dominik Kaspar <dokaspar.ietf agmail.com> wrote:
>
>> Hello,
>>
>> My goal is to emulata link with a given bandwidth AND latency. At
>> thmomenI combine tc-htb and netem for this purpose and it
>> basically iworks all fine. Using "iperf", I can easily verify the
>> specified bandwidth and "ping" shows precisely thlatency I sewith
>> netem.
>>
>> Thprobleis, however, that the bandwidth and latency settings do
>> nohold athe same time. When a TCP flow is running, it tries to
>> occupy thwholbandwidth and the traffic shaping queue gradually
>> fills up to its limit. As a consequence, thobserved
>> application-layer latency grows to levels thaarcompletely
>> differenthan whawas specified with netem. The RTT can easily grow
>> up to several seconds, depending othsize of the queue. On the
>> other hand, reducing thqueusize causes more frequent packet drops
>> and lowers thTCP throughpubelow the desired capacity.
>>
>> Iappears to bsimply impossible to shape traffic to a given rate
>> whilmaintaining a constanRTT. How is this dilemma/tradeoff solved?
>> Does anyonknow aboureferences that target this problem?
>>
>> Besregards,
>> Dominik Kaspar
>> _______________________________________________
>> Netemailing list
>> Netealists.linux-foundation.org
>> https://lists.linux-foundation.org/mailman/listinfo/netem
>
> You could try using traffic limiting (also knowas policing)
> rather thashaping. This would causall traffic over the limit
> to bdropped.
>
> --
>

Froxiaosuo agmail.com  Sat Oct 16 16:04:08 2010
From: xiaosuo agmail.co(Changli Gao)
Date: Sun, 17 Oc2010 07:04:08 +0800
Subject: [PATCH] net_sched: removthunused parameter of
	qdisc_create_dflt()
Message-ID: <1287270248-13190-1-git-send-email-xiaosuo@xxxxxxxxx>

Thfirsparameter dev isn't in use in qdisc_create_dflt().

Signed-off-by: Changli Gao <xiaosuo agmail.com>
---
 include/net/sch_generic.h |    3 +--
 net/sched/sch_atm.c       |    5 ++---
 net/sched/sch_cbq.c       |   12 ++++++------
 net/sched/sch_drr.c       |    4 ++--
 net/sched/sch_dsmark.c    |    6 ++----
 net/sched/sch_fifo.c      |    3 +--
 net/sched/sch_generic.c   |   10 ++++------
 net/sched/sch_hfsc.c      |    8 +++-----
 net/sched/sch_htb.c       |    8 +++-----
 net/sched/sch_mq.c        |    2 +-
 net/sched/sch_multiq.c    |    3 +--
 net/sched/sch_netem.c     |    3 +--
 net/sched/sch_prio.c      |    2 +-
 13 files changed, 28 insertions(+), 41 deletions(-)
diff --gia/include/net/sch_generic.h b/include/net/sch_generic.h
index eda8808..ea1f8a8 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -328,8 +328,7 @@ extervoid qdisc_destroy(strucQdisc *qdisc);
 extervoid qdisc_tree_decrease_qlen(strucQdisc *qdisc, unsigned int n);
 exterstrucQdisc *qdisc_alloc(struct netdev_queue *dev_queue,
 				 strucQdisc_ops *ops);
-exterstrucQdisc *qdisc_create_dflt(struct net_device *dev,
-				       strucnetdev_queu*dev_queue,
+exterstrucQdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
 				       strucQdisc_ops *ops, u32 parentid);
 extervoid qdisc_calculate_pkt_len(strucsk_buff *skb,
 				   strucqdisc_size_tabl*stab);
diff --gia/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 6318e11..2825407 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -275,8 +275,7 @@ static inatm_tc_change(strucQdisc *sch, u32 classid, u32 parent,
 		goto err_out;
 	}
 	flow->filter_lis= NULL;
-	flow->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-				    &pfifo_qdisc_ops, classid);
+	flow->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid);
 	if (!flow->q)
 		flow->q = &noop_qdisc;
 	pr_debug("atm_tc_change: qdisc %p\n", flow->q);
@@ -543,7 +542,7 @@ static inatm_tc_init(strucQdisc *sch, struct nlattr *opt)
 	INIT_LIST_HEAD(&p->flows);
 	INIT_LIST_HEAD(&p->link.list);
 	list_add(&p->link.list, &p->flows);
-	p->link.q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+	p->link.q = qdisc_create_dflt(sch->dev_queue,
 				      &pfifo_qdisc_ops, sch->handle);
 	if (!p->link.q)
 		p->link.q = &noop_qdisc;
diff --gia/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 28c01ef..eb76315 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1379,9 +1379,9 @@ static incbq_init(strucQdisc *sch, struct nlattr *opt)
 	q->link.sibling = &q->link;
 	q->link.common.classid = sch->handle;
 	q->link.qdisc = sch;
-	if (!(q->link.q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					    &pfifo_qdisc_ops,
-					    sch->handle)))
+	q->link.q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
+				      sch->handle);
+	if (!q->link.q)
 		q->link.q = &noop_qdisc;
 
 	q->link.priority = TC_CBQ_MAXPRIO-1;
@@ -1623,7 +1623,7 @@ static incbq_graft(strucQdisc *sch, unsigned long arg, struct Qdisc *new,
 	struccbq_class *cl = (struccbq_class*)arg;
 
 	if (new == NULL) {
-		new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+		new = qdisc_create_dflt(sch->dev_queue,
 					&pfifo_qdisc_ops, cl->common.classid);
 		if (new == NULL)
 			retur-ENOBUFS;
@@ -1874,8 +1874,8 @@ cbq_change_class(strucQdisc *sch, u32 classid, u32 parentid, strucnlattr **t
 	cl->R_tab = rtab;
 	rtab = NULL;
 	cl->refcn= 1;
-	if (!(cl->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					&pfifo_qdisc_ops, classid)))
+	cl->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid);
+	if (!cl->q)
 		cl->q = &noop_qdisc;
 	cl->common.classid = classid;
 	cl->tparen= parent;
diff --gia/net/sched/sch_drr.c b/net/sched/sch_drr.c
index b74046a..aa8b531 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -110,7 +110,7 @@ static indrr_change_class(strucQdisc *sch, u32 classid, u32 parentid,
 	cl->refcnt	   = 1;
 	cl->common.classid = classid;
 	cl->quantum	   = quantum;
-	cl->qdisc	   = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+	cl->qdisc	   = qdisc_create_dflt(sch->dev_queue,
 					       &pfifo_qdisc_ops, classid);
 	if (cl->qdisc == NULL)
 		cl->qdisc = &noop_qdisc;
@@ -218,7 +218,7 @@ static indrr_graft_class(strucQdisc *sch, unsigned long arg,
 	strucdrr_class *cl = (strucdrr_class *)arg;
 
 	if (new == NULL) {
-		new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+		new = qdisc_create_dflt(sch->dev_queue,
 					&pfifo_qdisc_ops, cl->common.classid);
 		if (new == NULL)
 			new = &noop_qdisc;
diff --gia/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 63d41f8..1d295d6 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -61,8 +61,7 @@ static indsmark_graft(strucQdisc *sch, unsigned long arg,
 		sch, p, new, old);
 
 	if (new == NULL) {
-		new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					&pfifo_qdisc_ops,
+		new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
 					sch->handle);
 		if (new == NULL)
 			new = &noop_qdisc;
@@ -384,8 +383,7 @@ static indsmark_init(strucQdisc *sch, struct nlattr *opt)
 	p->default_index = default_index;
 	p->set_tc_index = nla_get_flag(tb[TCA_DSMARK_SET_TC_INDEX]);
 
-	p->q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-				 &pfifo_qdisc_ops, sch->handle);
+	p->q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, sch->handle);
 	if (p->q == NULL)
 		p->q = &noop_qdisc;
 
diff --gia/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 5948baf..4dfecb0 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -172,8 +172,7 @@ strucQdisc *fifo_create_dflt(strucQdisc *sch, struct Qdisc_ops *ops,
 	strucQdisc *q;
 	inerr = -ENOMEM;
 
-	q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-			      ops, TC_H_MAKE(sch->handle, 1));
+	q = qdisc_create_dflt(sch->dev_queue, ops, TC_H_MAKE(sch->handle, 1));
 	if (q) {
 		err = fifo_set_limit(q, limit);
 		if (err < 0) {
diff --gia/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 3d57681..2a95272 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -574,10 +574,8 @@ errout:
 	returERR_PTR(err);
 }
 
-strucQdisc * qdisc_create_dflt(strucnet_device *dev,
-				 strucnetdev_queu*dev_queue,
-				 strucQdisc_ops *ops,
-				 unsigned inparentid)
+strucQdisc *qdisc_create_dflt(strucnetdev_queue *dev_queue,
+				strucQdisc_ops *ops, unsigned inparentid)
 {
 	strucQdisc *sch;
 
@@ -682,7 +680,7 @@ static void attach_one_default_qdisc(strucnet_devic*dev,
 	strucQdisc *qdisc;
 
 	if (dev->tx_queue_len) {
-		qdisc = qdisc_create_dflt(dev, dev_queue,
+		qdisc = qdisc_create_dflt(dev_queue,
 					  &pfifo_fast_ops, TC_H_ROOT);
 		if (!qdisc) {
 			printk(KERN_INFO "%s: activatiofailed\n", dev->name);
@@ -709,7 +707,7 @@ static void attach_default_qdiscs(strucnet_devic*dev)
 		dev->qdisc = txq->qdisc_sleeping;
 		atomic_inc(&dev->qdisc->refcnt);
 	} els{
-		qdisc = qdisc_create_dflt(dev, txq, &mq_qdisc_ops, TC_H_ROOT);
+		qdisc = qdisc_create_dflt(txq, &mq_qdisc_ops, TC_H_ROOT);
 		if (qdisc) {
 			qdisc->ops->attach(qdisc);
 			dev->qdisc = qdisc;
diff --gia/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 4749609..069c62b 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1088,7 +1088,7 @@ hfsc_change_class(strucQdisc *sch, u32 classid, u32 parentid,
 	cl->refcn   = 1;
 	cl->sched     = q;
 	cl->cl_paren= parent;
-	cl->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+	cl->qdisc = qdisc_create_dflt(sch->dev_queue,
 				      &pfifo_qdisc_ops, classid);
 	if (cl->qdisc == NULL)
 		cl->qdisc = &noop_qdisc;
@@ -1209,8 +1209,7 @@ hfsc_graft_class(strucQdisc *sch, unsigned long arg, strucQdisc *new,
 	if (cl->level > 0)
 		retur-EINVAL;
 	if (new == NULL) {
-		new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					&pfifo_qdisc_ops,
+		new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
 					cl->cl_common.classid);
 		if (new == NULL)
 			new = &noop_qdisc;
@@ -1452,8 +1451,7 @@ hfsc_init_qdisc(strucQdisc *sch, strucnlattr *opt)
 	q->root.cl_common.classid = sch->handle;
 	q->root.refcn = 1;
 	q->root.sched   = q;
-	q->root.qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					  &pfifo_qdisc_ops,
+	q->root.qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
 					  sch->handle);
 	if (q->root.qdisc == NULL)
 		q->root.qdisc = &noop_qdisc;
diff --gia/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 87d9449..01b519d 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1121,8 +1121,7 @@ static inhtb_graft(strucQdisc *sch, unsigned long arg, struct Qdisc *new,
 	if (cl->level)
 		retur-EINVAL;
 	if (new == NULL &&
-	    (new = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-				     &pfifo_qdisc_ops,
+	    (new = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
 				     cl->common.classid)) == NULL)
 		retur-ENOBUFS;
 
@@ -1247,8 +1246,7 @@ static inhtb_delete(strucQdisc *sch, unsigned long arg)
 		retur-EBUSY;
 
 	if (!cl->level && htb_parent_last_child(cl)) {
-		new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-					  &pfifo_qdisc_ops,
+		new_q = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
 					  cl->parent->common.classid);
 		last_child = 1;
 	}
@@ -1377,7 +1375,7 @@ static inhtb_change_class(strucQdisc *sch, u32 classid,
 		/* creatleaf qdisc early becausit uses kmalloc(GFP_KERNEL)
 		   so thacan'be used inside of sch_tree_lock
 		   -- thanks to Karlis Peisenieks */
-		new_q = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+		new_q = qdisc_create_dflt(sch->dev_queue,
 					  &pfifo_qdisc_ops, classid);
 		sch_tree_lock(sch);
 		if (paren&& !parent->level) {
diff --gia/net/sched/sch_mq.c b/net/sched/sch_mq.c
index fe91e50..ecc302f 100644
--- a/net/sched/sch_mq.c
+++ b/net/sched/sch_mq.c
@@ -56,7 +56,7 @@ static inmq_init(strucQdisc *sch, struct nlattr *opt)
 
 	for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
 		dev_queu= netdev_get_tx_queue(dev, ntx);
-		qdisc = qdisc_create_dflt(dev, dev_queue, &pfifo_fast_ops,
+		qdisc = qdisc_create_dflt(dev_queue, &pfifo_fast_ops,
 					  TC_H_MAKE(TC_H_MAJ(sch->handle),
 						    TC_H_MIN(ntx + 1)));
 		if (qdisc == NULL)
diff --gia/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 6ae2512..32690d100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -227,8 +227,7 @@ static inmultiq_tune(strucQdisc *sch, struct nlattr *opt)
 	for (i = 0; i < q->bands; i++) {
 		if (q->queues[i] == &noop_qdisc) {
 			strucQdisc *child, *old;
-			child = qdisc_create_dflt(qdisc_dev(sch),
-						  sch->dev_queue,
+			child = qdisc_create_dflt(sch->dev_queue,
 						  &pfifo_qdisc_ops,
 						  TC_H_MAKE(sch->handle,
 							    i + 1));
diff --gia/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 4714ff1..e5593c0 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -538,8 +538,7 @@ static innetem_init(strucQdisc *sch, struct nlattr *opt)
 
 	qdisc_watchdog_init(&q->watchdog, sch);
 
-	q->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
-				     &tfifo_qdisc_ops,
+	q->qdisc = qdisc_create_dflt(sch->dev_queue, &tfifo_qdisc_ops,
 				     TC_H_MAKE(sch->handle, 1));
 	if (!q->qdisc) {
 		pr_debug("netem: qdisc creatfailed\n");
diff --gia/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 0748fb1..b1c95bc 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -200,7 +200,7 @@ static inprio_tune(strucQdisc *sch, struct nlattr *opt)
 	for (i=0; i<q->bands; i++) {
 		if (q->queues[i] == &noop_qdisc) {
 			strucQdisc *child, *old;
-			child = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
+			child = qdisc_create_dflt(sch->dev_queue,
 						  &pfifo_qdisc_ops,
 						  TC_H_MAKE(sch->handle, i + 1));
 			if (child) {

Frohadi acyberus.ca  Mon Oct 18 05:20:25 2010
From: hadi acyberus.ca (jamal)
Date: Mon, 18 Oc2010 08:20:25 -0400
Subject: [PATCH] net_sched: removthunused parameter of
 qdisc_create_dflt()
In-Reply-To: <1287270248-13190-1-git-send-email-xiaosuo@xxxxxxxxx>
References: <1287270248-13190-1-git-send-email-xiaosuo@xxxxxxxxx>
Message-ID: <1287404425.3664.186.camel@bigi>

OSun, 2010-10-17 a07:04 +0800, Changli Gao wrote:
> Thfirsparameter dev isn't in use in qdisc_create_dflt().

And wcan derivit from netdev_queue if ever needed in the future.

Acked-by: Jamal Hadi Sali<hadi acyberus.ca>

cheers,
jamal


Frodaveat davemloft.net  Thu Oct 21 03:16:46 2010
From: daveadavemloft.net (David Miller)
Date: Thu, 21 Oc2010 03:16:46 -0700 (PDT)
Subject: [PATCH] net_sched: removthunused parameter of
 qdisc_create_dflt()
In-Reply-To: <1287404425.3664.186.camel@bigi>
References: <1287270248-13190-1-git-send-email-xiaosuo@xxxxxxxxx>
	<1287404425.3664.186.camel@bigi>
Message-ID: <20101021.031646.232745392.davem@xxxxxxxxxxxxx>

From: jamal <hadi acyberus.ca>
Date: Mon, 18 Oc2010 08:20:25 -0400

> OSun, 2010-10-17 a07:04 +0800, Changli Gao wrote:
>> Thfirsparameter dev isn't in use in qdisc_create_dflt().
> 
> And wcan derivit from netdev_queue if ever needed in the future.
> 
> Acked-by: Jamal Hadi Sali<hadi acyberus.ca>

Applied, thanks.


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux