Difference between skbuff frags and frag_list

The sk_buff has two places where it can store the next fragmentation data:

skb_shinfo(head)->frag_list 
skb_shinfo(head)->frags[]

May someone please explain the differences between these two ways to handle fragmentation.

Thanks and Best Regards!

Answers


Both are used for different cases.

frags[]

When your device supports scatter-gather I/O, and you want it to do the combining of data etc.. you can populate frags[] structure starting with the 2nd fragment till nth fragment. The first fragment is always specified by the data and tail pointers. Rest of the fragments are filled in the frags[] structure. If you don't use scatter gather, this variable is empty.

frag_list

This is the list of IP fragments. This will be filled during ip_push_pending_frames. Say your sk_buffs are in this arrangment

sk_buff0->next = sk_buff1
sk_buff1->next = sk_buff2
...
sk_buffn-1->next = sk_buffn

After ip_push_pending_frames is called

sk_buff0->frag_list = sk_buff1
sk_buff1->next = sk_buff2
...
sk_buffn-1->next = sk_buffn

Simply put

  • frags[] are for scatter-gather i/o buffers
  • frag_list is for ip fragments

Need Your Help

How to force httpd to use rh-php56 from red hat software collections

apache rhel7 software-collections

Anyone have any luck with making httpd use rh-php56 from the Red Hat Software Collections?

MVC model binding issue

jquery ajax asp.net-mvc

I have a problem that I cannot seem to resolve