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

Re: Using TC to simulate wireless channels



Hi Thomas,

I can only give you my guesses to your last 2 questions:

I'm using this procedure and it works fine with all filters.

Try following:

1. compile your kernel with traffic control elements (classifiers, schedulers )
you want to change as modules.
( It should be possible for all of them I think ).

For your convenience also enable the kmod ( module autoloader ) in 'loadable
modules support'.

2. If you change and recompile s.th. e.g your  sch_tbf.c just do a

	make modules modules_install

and you have your new TBF ready in /lib/modules/2.x.x/

!!! Before you use your new module be sure to check if there is an old e.g.
sch_tb module loded ( with lsmod ). If there is one just unload it with rmmod
sch_tbf. !!!


Patrick


On Aug 15, 16:13, Thomas Zeng wrote:
> Subject: Using TC to simulate wireless channels
> Dear Linux Diffserv Mailling List:
>
> I have been reading mails on this channel for a while. I haven't heard
> anyone talking
> about the following problem that I am trying to solve:
>
> I would like to use TC (Traffic Control) to simulate a random channel
> (targeting 3G wireless, but
> can be any channel).
>
> I would like to simulate the following 4 parameters:
> 1. Channel bandwidth in bits per second, which is variable.
> 2. A limited packet buffer at the input to the channel, say at 64k Bytes.
> 3. A random delay through the channel, in the order of hundreds of msec.
> 4. Random packet losses, according to some fading statistics and MAC layer
> resource allocation schemes.
>
> >
> [Thomas Zeng]   Here is how I plan to do it:
> > 1. How to simulate variable bandwidth [Thomas Zeng]  and queue limitations
> > of the channel?
> >        We can set up token bucket filters using queue disciplines in TC.
> > [Thomas Zeng]   Treat overflow as drop.
> >
> > 2. How to implement random dropping and/or variable delay?
> >     [Thomas Zeng]  Change source code in file net/sch/sch_tbf.c:
> >
> > tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
> > {
> >         struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
> >
> > 	/* drop packet with appropriate probability for GPRS */
> > 	/* Also delay with prescribed latency: e.g., use the latency field
> > in TC TBF command option, read from a file */
> >         if (skb->len > q->max_size)
> >                 goto drop;
> >         __skb_queue_tail(&sch->q, skb);
> [Thomas Zeng]  ...
> }
>
>
> My question for the experts in TC are:
>
> [Thomas Zeng]  1. If I change and recompile net/sched/sch_tbf.c, do I need
> to patch the kernel ?  Or reboot the Linux OS?
> 	2. If the answer to 1 is yes, is there anyway I can do it without
> rebooting OS?
>
>
> thank you very much for your help,
>
> > thomas zeng
> >
>-- End of excerpt from Thomas Zeng