Skb Documentation?

Jeff Haran Jeff.Haran at citrix.com
Thu Aug 14 14:07:58 EDT 2014


> -----Original Message-----
> From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Jerry
> Snitselaar
> Sent: Thursday, August 14, 2014 10:42 AM
> To: leo kirotawa
> Cc: kernelnewbies
> Subject: Re: Skb Documentation?
> 
> On Thu Aug 14 14, leo kirotawa wrote:
> >    git grep is your friend. :)
> >    [1]http://www.linuxjournal.com/article/1312
> 
> That and learn to use cscope and/or ctags
> 
> Jerry

I've found that the best browser for trying to understand kernel code comes from a commercial source, but you should be able to use it for free. You just need to sign up to create an account and when I did it, it was free. Check out https://scan.coverity.com/. The Coverity browser is C language knowledgeable and the Coverity people regularly do analyses of several open source projects, including Linux.

Where it really shines over tools like cscope or ctags is when you are trying to understand how a given field of a structure is used, or any other case where the same function or variable name is used in several different contexts. For example, let's say you are interested in how the kernel uses the struct sk_buff cb field. If you do a search for "cb" in the kernel sources using cscope, you get hits for a myriad of instances of variables and structure fields named "cb" that have nothing to do with the sk_buff cb field. Weeding out all the false positives is quite tedious and time consuming. But the Coverity browser knows the difference between (struct sk_buff *)->cb and all the cbs that represent callback functions in unrelated code. Big time saver.

Jeff Haran




More information about the Kernelnewbies mailing list