Greetings:

I'm trying to create a pause after each packet transmission in
arch/um/drivers/net_kern.c so that I can model packet tranmsission
times.

I'm using a call to:
schedule_timeout_interruptible(msecs_to_jiffies(125));

When I boot up my UML host... it complains:

BUG: scheduling while atomic: avahi-daemon/0x00000100/1981
0f43b81c:  [<080580f4>] dump_stack+0x1c/0x20
0f43b834:  [<081955c3>] schedule+0x49/0x467
0f43b87c:  [<08196106>] schedule_timeout+0x7b/0x9c
0f43b8b4:  [<08196148>] schedule_timeout_interruptible+0x21/0x23
0f43b8c0:  [<0805df6c>] uml_net_start_xmit+0x5c/0xae
0f43b8d8:  [<0814b9bd>] qdisc_restart+0x9a/0x12a
0f43b8f8:  [<0814178d>] dev_queue_xmit+0xcd/0x19e
0f43b914:  [<0815be98>] ip_mc_output+0x262/0x299
0f43b934:  [<0815ddfb>] ip_push_pending_frames+0x2f4/0x3ad
0f43b958:  [<08173e16>] udp_push_pending_frames+0x1f1/0x214
0f43b974:  [<08174237>] udp_sendmsg+0x3c0/0x48c
0f43ba04:  [<08179a6a>] inet_sendmsg+0x34/0x40
0f43ba20:  [<08138eef>] sock_sendmsg+0xd6/0xef
0f43bb08:  [<0813a48e>] sys_sendmsg+0x15d/0x1c0
0f43bc38:  [<0813a7ff>] sys_socketcall+0x153/0x16b
0f43bc68:  [<0805a042>] handle_syscall+0x86/0xa0
0f43bcb4:  [<0806876a>] userspace+0x1fc/0x240
0f43bcfc:  [<08059d7b>] fork_handler+0x97/0x9f
0f43bd1c:  [<00218420>] 0x218420

Any ideas?

Thanks!


John Zavgren
[EMAIL PROTECTED]
603-371-0513 (home)

603-801-2094 (mobile)
"The problem isn't that there are too many fools in this world, but
rather that lightning isn't selective enough."
-- KC Burgess Yakemovic



> -------- Original Message --------
> Subject: Re: [uml-user] include files
> From: Jeff Dike <[EMAIL PROTECTED]>
> Date: Wed, August 23, 2006 10:34 am
> To: John Zavgren <[EMAIL PROTECTED]>
> Cc: [email protected]
> 
> On Tue, Aug 22, 2006 at 04:27:17PM -0700, John Zavgren wrote:
> > I tried to modify the code in arch/um/drivers/net_user.c so that I could
> > introduce a delay (of a few milliseconds) to simulate the transmission time
> > of ethernet packets. I used calls to: set_current_state, and
> > schedule_timeout_interruptable. I added the necessary include files:
> > linux/wait.h and linux/sched.h.
> >
> > Compilation failed. One can easily recreate this by merely including the new
> > include files.
> 
> Note the _user part of that file name.  When you see that, it is compiled
> against glibc, and you can't use kernel primitives or kernel headers in it.
> 
> The converse is true with _kern files - they are built against kernel headers
> and can't have any glibc stuff in them.
> 
> I've mostly gone away from the _user/_kern convention and moved the libc stuff
> into arch/um/os-Linux - anything there is strictly glibc.  Everything else
> is kernel code.
> 
> So, if you're modifying net_user.c, you have to use userspace primitives.
> In this case, you could just nanosleep for a few milliseconds.  This would
> leave the process "running" as far as UML is concerned.  If you really want
> to reschedule within UML, then do that in net_kern.c.
> 
>                               Jeff


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to