Networking Forums

Networking Forums > Computer Networking > Linux Networking > some skbuff questions

Reply
Thread Tools Display Modes

some skbuff questions

 
 
cranium
Guest
Posts: n/a

 
      05-28-2004, 03:18 PM
hello,
1) Is there only one alloc_skb for each type of packet(like
TCP,ICMP,UDP) to be built?
2) Is that function is used for allocating a total space for packet so
that it will contain all layer headers as well as application data?
3) what is the significance of 15 value in alloc_skb functions in many
source files?
actually i want to know explaination about following two lines about
value 15 and 16.
tcp_output.c:1219: buff = alloc_skb(MAX_TCP_HEADER + 15,
sk->allocation);
linux/skbuff.h:1042: skb = alloc_skb(length+16, gfp_mask);
i am using kernel 2.4.24.
regards,
cranium
 
Reply With Quote
 
 
 
 
Doug Gale
Guest
Posts: n/a

 
      06-19-2004, 04:01 AM

"cranium" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> hello,
> 1) Is there only one alloc_skb for each type of packet(like
> TCP,ICMP,UDP) to be built?
> 2) Is that function is used for allocating a total space for packet so
> that it will contain all layer headers as well as application data?
> 3) what is the significance of 15 value in alloc_skb functions in many
> source files?
> actually i want to know explaination about following two lines about
> value 15 and 16.
> tcp_output.c:1219: buff = alloc_skb(MAX_TCP_HEADER + 15,
> sk->allocation);
> linux/skbuff.h:1042: skb = alloc_skb(length+16, gfp_mask);
> i am using kernel 2.4.24.
> regards,
> cranium


This is a 100% guess, but the +15 and +16 might be to round up to a 16-byte
boundary because of some loop unrolling optimizations that make it process
data 16-bytes-per-loop.


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
using struct igmphdr with skbuff fafarun Linux Networking 0 05-21-2009 06:15 PM
skbuff size Ggds Linux Networking 0 04-07-2008 11:58 AM
skbuff size Ggds Linux Networking 0 04-07-2008 11:56 AM
DSL questions snow Wireless Internet 8 08-19-2004 06:08 PM
skbuff question Parag Linux Networking 0 05-29-2004 03:27 PM



1 2 3 4 5 6 7 8 9 10 11