User Tools

Site Tools


mywiki:linux:checksum

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mywiki:linux:checksum [2016/04/06 17:48] – [Linux Checksum] shaoguohmywiki:linux:checksum [2019/09/15 18:55] (current) – external edit 127.0.0.1
Line 5: Line 5:
 | ip_fast_csum | | | ip_fast_csum | |
 | csum_fold | | | csum_fold | |
-+skb_checksum | | 
 +| csum_tcpudp_magic | | 
 +| nf_ip_checksum | 
 +| csum_tcpudp_nofold | 
 +| csum_replace4 | 
 +| csum_replace2 | 
 +| nf_nat_ipv4_csum_recalc | 
 +| csum_tcpudp_magic | 
 + 
 + 
 +skb->csum_start = skb_transport_header(skb) - skb->head; 
 + 
 +skb->csum_offset = offsetof(struct tcphdr, check); 
 + 
 +**TSO** is a hardware feature whereas **GSO** is a software feature. 
 + 
 +In the sense, TSO needs "the device" to break the frame into MTU sized segments. 
 +BUT, GSO is a strategy followed by kernel to avoid processing smaller packets throughout the stack to improve the porformance 
 + 
 +====== Linux Checksum offloading ====== 
 +  
 +  - For bridging and non-udp/tcp packet, no so called offloading support in tx path 
 +  - For Fragmented packets, no checksum offloading support in tx path 
 +  - For UDP/TCP routing packet (incremental), no checksum offloading support in tx path. at the same time, no ip_summed flag change 
 +  - Only Linux local output UDP/TCP’s checksum can be offloaded in tx path  
 +  - For L2TP related tunnels, only inner UDP/TCP can be offloaded, outer UDP/TCP is done by linux itself in tx path. 
 + 
 +Below variables in skb is very important for checksum offloading: 
 +  - ip_summed (CHECKSUM_PARTIAL) 
 +  - encapsulation 
 +  - inner_network_header/network_header 
 +  - inner_transport_header/transport_header 
  
 ====== Linux Checksum ====== ====== Linux Checksum ======
mywiki/linux/checksum.1459936133.txt.gz · Last modified: (external edit)