netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to change classful netem loss probability?
@ 2006-04-26 22:46 George Nychis
  2006-04-28  1:18 ` [LARTC] " George P Nychis
  0 siblings, 1 reply; 6+ messages in thread
From: George Nychis @ 2006-04-26 22:46 UTC (permalink / raw)
  To: LARTC, netdev

Hi,

I am using netem to add loss and then adding another qdisc within netem 
according to the wiki.  Then i want to change the netem drop probability 
without having to delete the qdisc and recreate it.  I try it but I get 
invalid argument:

thorium-ini hedpe # tc qdisc add dev ath0 root handle 1:0 netem drop 1%
thorium-ini hedpe # tc qdisc add dev ath0 parent 1:1 handle 10: xcp 
capacity 54Mbit limit 500
thorium-ini hedpe # tc -s qdisc ls dev ath0
qdisc netem 1: limit 1000 loss 1%
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc xcp 10: parent 1:1 capacity 52734Kbit limit 500p
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
thorium-ini hedpe # tc qdisc change dev ath0 root handle 1:0 netem drop 1%
RTNETLINK answers: Invalid argument
thorium-ini hedpe # tc qdisc change dev ath0 root netem drop 1%
RTNETLINK answers: Invalid argument

any ideas?

Thanks!
George

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LARTC] how to change classful netem loss probability?
  2006-04-26 22:46 how to change classful netem loss probability? George Nychis
@ 2006-04-28  1:18 ` George P Nychis
  2006-04-28 17:24   ` Stephen Hemminger
  0 siblings, 1 reply; 6+ messages in thread
From: George P Nychis @ 2006-04-28  1:18 UTC (permalink / raw)
  To: George Nychis; +Cc: lartc, netdev

And if its not possible to change the probability, is there another method I can use instead?

> Hi,
> 
> I am using netem to add loss and then adding another qdisc within netem 
> according to the wiki.  Then i want to change the netem drop probability 
> without having to delete the qdisc and recreate it.  I try it but I get 
> invalid argument:
> 
> thorium-ini hedpe # tc qdisc add dev ath0 root handle 1:0 netem drop 1% 
> thorium-ini hedpe # tc qdisc add dev ath0 parent 1:1 handle 10: xcp 
> capacity 54Mbit limit 500 thorium-ini hedpe # tc -s qdisc ls dev ath0 qdisc
> netem 1: limit 1000 loss 1% Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
> qdisc xcp 10: parent 1:1 capacity 52734Kbit limit 500p Sent 0 bytes 0 pkts
> (dropped 0, overlimits 0) thorium-ini hedpe # tc qdisc change dev ath0
> root handle 1:0 netem drop 1% RTNETLINK answers: Invalid argument 
> thorium-ini hedpe # tc qdisc change dev ath0 root netem drop 1% RTNETLINK
> answers: Invalid argument
> 
> any ideas?
> 
> Thanks! George _______________________________________________ LARTC mailing
> list LARTC@mailman.ds9a.nl 
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
> 
> 


-- 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LARTC] how to change classful netem loss probability?
  2006-04-28  1:18 ` [LARTC] " George P Nychis
@ 2006-04-28 17:24   ` Stephen Hemminger
  2006-05-04 23:35     ` George P Nychis
  2006-05-05 15:08     ` where i can find this netem patch? George Nychis
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Hemminger @ 2006-04-28 17:24 UTC (permalink / raw)
  To: George P Nychis; +Cc: George Nychis, lartc, netdev

Loss was broken, patch sent.

The following works now:

# tc qdisc add dev eth1 root handle 1:0 netem loss 20%

# tc qdisc add dev eth1 parent 1:1 handle 10: tbf \
  rate 256kbit buffer 1600 limit 3000
# ping -f -c 1000 shell

1000 packets transmitted, 781 received, 21% packet loss, time 3214ms
rtt min/avg/max/mdev = 0.187/0.398/3.763/0.730 ms, ipg/ewma 3.217/0.538 ms

# tc qdisc chang dev eth1 handle 1: netem loss 1%
# ping -f -c 1000 shell

1000 packets transmitted, 990 received, 1% packet loss, time 2922ms
rtt min/avg/max/mdev = 0.187/2.739/3.298/0.789 ms, ipg/ewma 2.924/2.084 ms



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: how to change classful netem loss probability?
  2006-04-28 17:24   ` Stephen Hemminger
@ 2006-05-04 23:35     ` George P Nychis
  2006-05-05 15:08     ` where i can find this netem patch? George Nychis
  1 sibling, 0 replies; 6+ messages in thread
From: George P Nychis @ 2006-05-04 23:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: lartc, netdev

where did you send this patch?

I don't think I ever got it

> Loss was broken, patch sent.
> 
> The following works now:
> 
> # tc qdisc add dev eth1 root handle 1:0 netem loss 20%
> 
> # tc qdisc add dev eth1 parent 1:1 handle 10: tbf \ rate 256kbit buffer
> 1600 limit 3000 # ping -f -c 1000 shell
> 
> 1000 packets transmitted, 781 received, 21% packet loss, time 3214ms rtt
> min/avg/max/mdev = 0.187/0.398/3.763/0.730 ms, ipg/ewma 3.217/0.538 ms
> 
> # tc qdisc chang dev eth1 handle 1: netem loss 1% # ping -f -c 1000 shell
> 
> 1000 packets transmitted, 990 received, 1% packet loss, time 2922ms rtt
> min/avg/max/mdev = 0.187/2.739/3.298/0.789 ms, ipg/ewma 2.924/2.084 ms
> 
> 
> 
> 


-- 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* where i can find this netem patch?
  2006-04-28 17:24   ` Stephen Hemminger
  2006-05-04 23:35     ` George P Nychis
@ 2006-05-05 15:08     ` George Nychis
  2006-05-05 17:15       ` [Netem] " Stephen Hemminger
  1 sibling, 1 reply; 6+ messages in thread
From: George Nychis @ 2006-05-05 15:08 UTC (permalink / raw)
  To: netdev; +Cc: lartc, netem

Hi,

I need help finding this patch that Stephen made.

He sent me a patch, but i do not think its related to the patch that
solved this problem.  I will include the patch he did forward to me at
the bottom.

However here is the problem, i even rtied his misspelling of change :)

thorium-ini 15849-tests # tc qdisc add dev ath0 root handle 1:0 netem
drop 0%
thorium-ini 15849-tests # tc qdisc add dev ath0 parent 1:1 handle 10:
xcp capacity 54Mbit limit 500
thorium-ini 15849-tests # tc qdisc change dev ath0 root handle 1:0 netem
drop 1%
RTNETLINK answers: Invalid argument
thorium-ini 15849-tests # tc qdisc chang dev ath0 root handle 1:0 netem
drop 1%
RTNETLINK answers: Invalid argument
thorium-ini 15849-tests # tc qdisc change dev ath0 root handle 1: netem
drop 1%
RTNETLINK answers: Invalid argument

here is the patch i was forwarded, but did not solve this problem:
--- linux-2.6.orig/net/sched/sch_netem.c
+++ linux-2.6/net/sched/sch_netem.c
@@ -167,7 +167,7 @@ static int netem_enqueue(struct sk_buff
 	if (count == 0) {
 		sch->qstats.drops++;
 		kfree_skb(skb);
-		return NET_XMIT_DROP;
+		return NET_XMIT_BYPASS;
 	}

 	/*

I'd greatly appreciate any help solving the change problem.

Thanks!
George

Stephen Hemminger wrote:
> Loss was broken, patch sent.
> 
> The following works now:
> 
> # tc qdisc add dev eth1 root handle 1:0 netem loss 20%
> 
> # tc qdisc add dev eth1 parent 1:1 handle 10: tbf \
>   rate 256kbit buffer 1600 limit 3000
> # ping -f -c 1000 shell
> 
> 1000 packets transmitted, 781 received, 21% packet loss, time 3214ms
> rtt min/avg/max/mdev = 0.187/0.398/3.763/0.730 ms, ipg/ewma 3.217/0.538 ms
> 
> # tc qdisc chang dev eth1 handle 1: netem loss 1%
> # ping -f -c 1000 shell
> 
> 1000 packets transmitted, 990 received, 1% packet loss, time 2922ms
> rtt min/avg/max/mdev = 0.187/2.739/3.298/0.789 ms, ipg/ewma 2.924/2.084 ms
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Netem] where i can find this netem patch?
  2006-05-05 15:08     ` where i can find this netem patch? George Nychis
@ 2006-05-05 17:15       ` Stephen Hemminger
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2006-05-05 17:15 UTC (permalink / raw)
  To: George Nychis; +Cc: netdev, lartc, netem

On Fri, 05 May 2006 11:08:23 -0400
George Nychis <gnychis@cmu.edu> wrote:

> Hi,
> 
> I need help finding this patch that Stephen made.
> 
> He sent me a patch, but i do not think its related to the patch that
> solved this problem.  I will include the patch he did forward to me at
> the bottom.

 
> However here is the problem, i even rtied his misspelling of change :)
>
> thorium-ini 15849-tests # tc qdisc add dev ath0 root handle 1:0 netem
> drop 0%
> thorium-ini 15849-tests # tc qdisc add dev ath0 parent 1:1 handle 10:
> xcp capacity 54Mbit limit 500
> thorium-ini 15849-tests # tc qdisc change dev ath0 root handle 1:0 netem
> drop 1%
> RTNETLINK answers: Invalid argument
>

The problem was you are giving handle 1:0 so the change request was
going to xcp. And xcp doesn't understand netem rtnetlink message.

You want to do:
# tc qdisc change dev ath0 root netem drop 1%


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-05 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-26 22:46 how to change classful netem loss probability? George Nychis
2006-04-28  1:18 ` [LARTC] " George P Nychis
2006-04-28 17:24   ` Stephen Hemminger
2006-05-04 23:35     ` George P Nychis
2006-05-05 15:08     ` where i can find this netem patch? George Nychis
2006-05-05 17:15       ` [Netem] " Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).