Re: Mixed questions

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

 



On Friday 16 April 2004 05.52, Kiran Kumar wrote:
> > 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.
Actually I have read a lot of kernel code to understand it
(mainly __pskb_pull_tail and such) but those comments
in skbuff.h are pretty meaningless (not understandable) to me.

Now I have these assumptions, is it correct? :
   "end"	is the real    end of the buffer.
   "tail"	is the current end of the buffer.
   "head"	is the real    head/start of the buffer.
   "data"	is the current head/start of the buffer.
   "len"	is the currently used data in the buffer.
   "data_len"	is the amount of data in the fragments
   len == tail - data

>   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.
So, in those fragments is the header of a packet repeated or those
are just pure payload? That is, where the nh.raw, h.raw pointers point for
fragment skbuffs?
I mean:
     skb          frag 1       frag 2
 (hdr,payload)  (hdr,frag1) (hdr,frag2) ...
or
 (hdr,payload)  (frag1)     (frag2) ...
?

Thanks a lot,
Gabor

--
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