Sending UDP from within packet handler

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

 



Hi all,

i am trying to create a module that will receive frames from a physical interface, using a packet handler registered via dev_add_pack, mangle the frame content and send it over a UDP socket. To transmit over UDP I created a socket and I am sending the frame using sock_sendmsg. It is mostly working except that I am getting some error and, above all, the kernel is crashing :-(

The error message that I get the most is "scheduling while atomic". This leads me to believe that sock_sendmsg cannot be used while in softirq context, which, as per my understanding, is the context when the packet handlers are called.

So, I am a little puzzled as to what are my options. Should I use some queuing and then dispatch something that will execute in the proper context? Or try to find a lower entry point into UDP that would work in softirq context? Any suggestions?

Thanks
begin:vcard
fn:Claude Robitaille
n:Robitaille;Claude
email;internet:clauder@xxxxxxxxxxxx
tel;work:514-764-0119
tel;cell:514-796-7225
x-mozilla-html:TRUE
version:2.1
end:vcard


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux