Re: [LARTC] how to debug RTNETLINK invalid argument?

2006-05-24 Thread George Nychis


George Nychis wrote:
 
 Luciano Ruete wrote:
 El Tuesday 23 May 2006 13:17, George Nychis escribió:
 Hey,

 I am getting an invalid argument trying to insert a qdisc:

 [EMAIL PROTECTED] iproute2]# tc qdisc add dev eth0 root xcp capacity 50Mbit
 limit 500
 RTNETLINK answers: Invalid argument

 I'm not sure whats wrong here, because i can successfully insert this
 qdisc on other computers of mine.

 How can i debug this?
 maybe strace (system calls and signals trace) can give you some clues.

 strace tc qdisc add dev eth0 root xcp capacity 50Mbit limit 500

 
 Heres what I get as the output:
 
 execve(/sbin/tc, [tc, qdisc, add, dev, eth0, root, xcp,
 capacity, 50Mbit, limit, 500], [/* 22 vars */]) = 0
 uname({sys=Linux, node=emu-5, ...}) = 0
 set_tid_address(0)  = -1 ENOSYS (Function not
 implemented)
 brk(0)  = 0x80705cc
 brk(0x8071000)  = 0x8071000
 access(/etc/ld.so.preload, R_OK)  = -1 ENOENT (No such file or
 directory)
 open(/etc/ld.so.cache, O_RDONLY)  = 3
 fstat64(3, {st_mode=S_IFREG|0644, st_size=63789, ...}) = 0
 old_mmap(NULL, 63789, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4000
 close(3)= 0
 open(/lib/libresolv.so.2, O_RDONLY)   = 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\223...,
 512) = 512
 fstat64(3, {st_mode=S_IFREG|0755, st_size=81316, ...}) = 0
 old_mmap(0x4e2d7000, 80040, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4e2d7000
 mprotect(0x4e2e6000, 18600, PROT_NONE)  = 0
 old_mmap(0x4e2e7000, 8192, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x4e2e7000
 old_mmap(0x4e2e9000, 6312, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4e2e9000
 close(3)= 0
 open(/lib/i686/libm.so.6, O_RDONLY)   = 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\263G...,
 512) = 512
 fstat64(3, {st_mode=S_IFREG|0755, st_size=215248, ...}) = 0
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x4001
 old_mmap(0x44478000, 139424, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x44478000
 old_mmap(0x44499000, 8192, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0x44499000
 close(3)= 0
 open(/lib/libdl.so.2, O_RDONLY)   = 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\333...,
 512) = 512
 fstat64(3, {st_mode=S_IFREG|0755, st_size=16908, ...}) = 0
 old_mmap(0x473fd000, 12388, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x473fd000
 old_mmap(0x473ff000, 8192, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x473ff000
 close(3)= 0
 open(/lib/i686/libc.so.6, O_RDONLY)   = 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p36D4\0...,
 512) = 512
 fstat64(3, {st_mode=S_IFREG|0755, st_size=1499368, ...}) = 0
 old_mmap(0x4434e000, 1211684, PROT_READ|PROT_EXEC,
 MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4434e000
 mprotect(0x4446f000, 27940, PROT_NONE)  = 0
 old_mmap(0x4447, 16384, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x121000) = 0x4447
 old_mmap(0x44474000, 7460, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x44474000
 close(3)= 0
 mprotect(0x4447, 8192, PROT_READ)   = 0
 mprotect(0x473ff000, 4096, PROT_READ)   = 0
 mprotect(0x44499000, 4096, PROT_READ)   = 0
 mprotect(0x4e2e7000, 4096, PROT_READ)   = 0
 mprotect(0xb8b000, 4096, PROT_READ) = 0
 munmap(0x4000, 63789)   = 0
 brk(0)  = 0x8071000
 brk(0x8092000)  = 0x8092000
 open(/proc/net/psched, O_RDONLY)  = 3
 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
 0) = 0x4000
 read(3, 000c8000 000f4240 000f4240 0..., 4096) = 36
 close(3)= 0
 munmap(0x4000, 4096)= 0
 socket(PF_NETLINK, SOCK_RAW, 0) = 3
 setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
 setsockopt(3, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
 bind(3, {sa_family=AF_NETLINK, pid=0, groups=}, 12) = 0
 getsockname(3, {sa_family=AF_NETLINK, pid=5407, groups=}, [12]) = 0
 time(NULL)  = 1148447549
 open(/usr/lib/tc/q_xcp.so, O_RDONLY)  = 4
 read(4, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\270\5\0...,
 512) = 512
 fstat64(4, {st_mode=S_IFREG|0755, st_size=4192, ...}) = 0
 old_mmap(NULL, 6908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4,
 0) = 0x4000
 old_mmap(0x40001000, 4096, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0) = 0x40001000
 close(4)= 0
 sendto(3, \24\0\0\0\22\0\1\3\353sD\0\0\0\0\0\0\0\0, 20, 0,
 {sa_family=AF_NETLINK, pid=0, groups=}, 12) = 20

Re: [LARTC] how to debug RTNETLINK invalid argument?

2006-05-24 Thread George Nychis
Well it turns out that the problem may very well be the environment, it
seems as though i'm getting a hint in dmesg:

[EMAIL PROTECTED] net]# dmesg
request_module[sch_xcp]: fork failed, errno 1

that occurs after trying to add the qdisc through tc

so it seems to be failing because a fork is failing in the module, which
 I am guessing is an environment problem.

Anyone suggestions?

I'll keep trying!

- George
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] how to debug RTNETLINK invalid argument?

2006-05-23 Thread George Nychis
Hey,

I am getting an invalid argument trying to insert a qdisc:

[EMAIL PROTECTED] iproute2]# tc qdisc add dev eth0 root xcp capacity 50Mbit
limit 500
RTNETLINK answers: Invalid argument

I'm not sure whats wrong here, because i can successfully insert this
qdisc on other computers of mine.

How can i debug this?

Thanks!
George
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] how to debug RTNETLINK invalid argument?

2006-05-23 Thread George Nychis


Larry Brigman wrote:
 On 5/23/06, George Nychis [EMAIL PROTECTED] wrote:
 Hey,

 I am getting an invalid argument trying to insert a qdisc:

 [EMAIL PROTECTED] iproute2]# tc qdisc add dev eth0 root xcp capacity 50Mbit
 limit 500
 RTNETLINK answers: Invalid argument

 I'm not sure whats wrong here, because i can successfully insert this
 qdisc on other computers of mine.

 How can i debug this?

 Check to see which kernel versions you have on the boxes that work and
 the one that
 does not.  Also check to see if you have the latest version of
 iproute2 installed on the
 machine that does not work.
 

They are both running the exact same kernel and version of iproute2,
however they are in different environments, what could the environment
have to do with it?

Thanks!
George
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] how to debug RTNETLINK invalid argument?

2006-05-23 Thread George Nychis


Larry Brigman wrote:
 On 5/23/06, George Nychis [EMAIL PROTECTED] wrote:
 Larry Brigman wrote:
  On 5/23/06, George Nychis [EMAIL PROTECTED] wrote:
  Larry Brigman wrote:
   On 5/23/06, George Nychis [EMAIL PROTECTED] wrote:
   Hey,
  
   I am getting an invalid argument trying to insert a qdisc:
  
   [EMAIL PROTECTED] iproute2]# tc qdisc add dev eth0 root xcp capacity
 50Mbit
   limit 500
   RTNETLINK answers: Invalid argument
  
   I'm not sure whats wrong here, because i can successfully insert
 this
   qdisc on other computers of mine.
  
   How can i debug this?
  
   Check to see which kernel versions you have on the boxes that
 work and
   the one that
   does not.  Also check to see if you have the latest version of
   iproute2 installed on the
   machine that does not work.
  
 
  They are both running the exact same kernel and version of iproute2,
  however they are in different environments, what could the environment
  have to do with it?
 
  Modules that are not loaded?  modprobe.conf?
  lsmod on both boxes looking for specific networking modules.
 

 What modules would qdisc's be dependent on?  The weird thing is, netem
 works on both machines... therefore I know qdisc's in general are
 working.  Lets just say its not working on my other machine, how do i go
 about debugging it on the one machine alone?

 
 Has the tc command been changed recently from your customized version back
 to the standard release (ie yum running via cron) or your environment
 path changed to
 pick up the wrong tc command?
 

the tc I am using is the standard tc, i didn't change anything about tc,
only trying to use a new custom qdisc with it... i'm not sure honestly,
theres no way to figure out why i'm getting the invalid argument?
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] where i can find this netem patch?

2006-05-05 Thread George Nychis
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
 
 
 
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] how to change classful netem loss probability?

2006-04-26 Thread George Nychis

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


[LARTC] any alternative to netem drop? slow

2006-04-20 Thread George Nychis

Hi,

I was wondering if there is any alternative to netem drop probability... 
the reason I ask is that whenever I turn it on I get about 500KB/sec 
less throughput with 0% packet loss


The caveat is that it must work with 2.4.32 :)

Thanks!
George


Jason Boxman wrote:


On Thursday 20 April 2006 22:19, Francisco wrote:
 


L7 filter works very well too:
http://l7-filter.sourceforge.net/

Although I didn't try it with sip, I use it to control my P2P and server
applications and have a very usable ADSL link at almost 100% utilization of
my upstream.
   



Does any of that include eMule traffic?  I stopped having success with eMule 
protocols and L7 a year or two ago and the pattern hasn't been updated in 
ages.


 


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [offlist] Re: [LARTC] how to do probabilistic packet loss in kernel?

2006-04-19 Thread George Nychis

Hey Martin,

I was able to do it with netem and its working great now.

I've actually moved on to another challenge, I would like to drop 
packets at the hardware level such as to see rate control.


Because when netem drops a packet, TCP responds, however the lower level 
card will not interact because it never sees the loss.


What I want to do is somehow cause the card to send a corrupted packet 
based on a probability, or not send the packet but make it think that it 
did.


I'm using madwifi and I've found in the code where it does rate control 
and sends out the data, so i'm hoping to make this happen, but having 
troubles!


So if anyone else has any ideas on how to get rate control interactive 
packet loss, i'd love it.


- George


Martin A. Brown wrote:

Hello George,

Unfortunately, I cannot answer your most recent question.  I'm 
hoping that Stephen Hemminger can answer your question.  He is 
subscribed to the LARTC list, is also the author of netem and 
seems to be a smart cookie.


Good luck,

-Martin


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] how to do probabilistic packet loss in kernel?

2006-04-16 Thread George Nychis

Thanks Martin and Roman.

I will definately look into this.

I have a question for you though... in terms of adding loss like this, 
this will not interact with hardware layer rate control of wireless 
cards right?


For instance... dropping from 54Mbit to 11Mbit on an 802.11g card when 
loss certain loss begins occuring



Martin A. Brown wrote:

Greetings George,

 : I am using iproute2 to setup fowarding, adding routes like ip 
 : route add 192.168.1.3 via 192.168.1.2
 : 
 : I was wondering where in the kernel I can insert probabilistic 
 : packet loss only for forwarded packets?  So that for instance I 
 : can drop 5% of all forwarded packets?
 : 
 : I don't need help with the actual code, just need help finding 
 : where to insert this code :)


I believe you are looking for the netem qdisc [0].  Here's just a 
snippet from Stephen Hemminger's wiki page to help you imagine how 
you could use netem to introduce probabilistic packet loss.


   # tc qdisc add dev eth0 parent 1:3 handle 30: netem \
   delay 200ms 10ms distribution normal

Good luck,

-Martin

 [0] http://linux-net.osdl.org/index.php/Netem


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


Re: [LARTC] created new q_disc, inserted module, tc tells me unknown qdisc

2006-04-10 Thread George Nychis

Hey Tim,

I will take a look at that routine, it just seems no matter what I do I 
cannot seem to find out why it determines it does not have xcp qdisc 
support.  I will look deeper into it.


I am not sure if it has been released to the public yet.  I am using 
Yongguang Zhang and Tom Henderson's Linux implementation.  I am also not 
sure it is the same packet formated as the ISI FreeBSD implementation. 
Tom pre-released it to me for my research on the topic, I think I will 
ask him if it is public yet, because if so I think I could find help a 
lot easier :)


I will get back to you with what I find.

Thanks!
George


Tim Shepard wrote:

To debug this you'll probably want to have a look at the
get_qdisc_kind() routine in tc/tc.c in the iproute sources and
understand how it uses dlopen() to find the routines to parse the
arguments to the various different qdisc implementations..

I hope this helps.


Is your xcp-implementing qdisc code available anywhere yet?  Are you
using the same packet format as the folks at ISI are using in their
FreeBSD implementation?  (They wrote a internet draft describing the
XCP packet format a year or two ago.)

-Tim Shepard
 [EMAIL PROTECTED]


___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc