RE: reading skb at interrupt handler

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

 



 
Thanks for all of the comments. I understand why my experimental code seemed 
to work properly. My code read the previously set data of skb, not the data of just 
arrived packet. I checked the behavior by printk, but I couldn't realized that's not valid 
data. Actually, I got kernel panic several times. I think it was due to such
invalid reading of skb. 

Thanks for your valuable comments. 

Naoya Maruyama

> -----Original Message-----
> From: kernelnewbies-bounce@nl.linux.org 
> [mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Zeeshan Ali
> Sent: Friday, April 16, 2004 6:02 AM
> To: kernelnewbies@nl.linux.org
> Subject: Re: reading skb at interrupt handler
> 
> Hello,
> 
> > If i remember correctly, net_rx_action sets
> > skb->nh.raw, atleast that's
> > how it old 2.4 used to work. Before netif_rx, the
> > skb->nh pointer is for
> > sure not initialized,
> 
>      No doubt, as not knowing about this, my code used
> to read the src/dest IPs from skb->nh in the
> eth->rx_hook and get the kernel into panic. I finally
> solved the problem by taking the iphdr from the
> skb->data. Keep in mind that I am talking about 2.4.
> 
>    BTW, should'nt we initialize the non-itialized
> poiters to NULL? hmm.. but maybe it's a bad suggestion
> in the context of the kernel alteast.
> 
> =====
> ---------------------------------------------------------
> "To teach how to live without certainty, and yet without 
> being paralysed by hesitation, is perhaps the chief thing 
> that philosophy, in our age, can still do for those who study 
> it." --Bertrand Russell
> 
> "According to all the rules (of Software Engineering) I knew, 
> Linux should have been a disaster, but it was'nt. Instead it 
> was something wonderfull" -- Eric Raymond
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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