Jan. 7, 2014
11:27 a.m.
On Fri, Jan 3, 2014 at 12:42 AM, Guibin(Bill) Tian <gbtian@gmail.com> wrote:
Thank you sirs. But in fact, I don't alloc/free for every packet. I did exactly as what you said---reuse.
I am a little confused why GFP_ATOMIC can work but GFP_KERNEL will cause the system to panic. Does it because that GFP_KERNEL can sleep in kmalloc, then ip_xmit_queue will be held or something? But anyway, GFP_ATOMIC works perfectly.
yup, you nailed it. gfp_kernel sleeps, while ip_xmit_queue is in interrupt context. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com