--- Gabor Fekete <feketga@kgb.hu> wrote: > 2. Why is the "{ }" needed? > #define __pgd(x) ((pgd_t) { (x) } ) This is called statement expressions. info gcc > c extensions will give you more info. > > 3. What are data_len and len in sk_buff, how are > they used? An skbuff structure has some storage in the main body of the structure, more can be added to the frag list. The amount of data in the main structure is called the headlen, the total length is len, data_len, is the total amount of data in the frags. Refer to skbuff.h in the linux kernel sources. > > 4. What is the difference between frag_list and > frags[]? > struct skb_shared_info { > atomic_t dataref; > unsigned int nr_frags; > unsigned short tso_size; > unsigned short tso_segs; > struct sk_buff *frag_list; > skb_frag_t frags[MAX_SKB_FRAGS]; > }; frag_list is the linked list of skbuffs corresponding to the continuation of the skbuff's data. frags is the array which holds pointers to the pages (which hold the actual data). That is frag_list is the list of skbuffs and frags is the associated data. HTH ===== Regards, Kiran Kumar Immidi __________________________________ 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/