0% found this document useful (0 votes)
22 views

Lecture - 08 - Introduction To Linux Kernel Tcpip Ptocotol Stack

The document summarizes key aspects of networking code in the Linux kernel source tree, including: 1. It describes the organization of the net-kernel source tree and covers layers like the link layer, network layer (IP), and transport layer (TCP). 2. For each layer, it outlines important functions and data structures used for input and output processing, like the protocol handler, defragmentation, routing tables, sockets, and TCP state transitions. 3. Common techniques used across layers are also mentioned, such as NAPI, soft interrupts, traffic control, scatter/gather DMA, and hash tables for lookup and storage.

Uploaded by

Tú Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture - 08 - Introduction To Linux Kernel Tcpip Ptocotol Stack

The document summarizes key aspects of networking code in the Linux kernel source tree, including: 1. It describes the organization of the net-kernel source tree and covers layers like the link layer, network layer (IP), and transport layer (TCP). 2. For each layer, it outlines important functions and data structures used for input and output processing, like the protocol handler, defragmentation, routing tables, sockets, and TCP state transitions. 3. Common techniques used across layers are also mentioned, such as NAPI, soft interrupts, traffic control, scatter/gather DMA, and hash tables for lookup and storage.

Uploaded by

Tú Phạm Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Networking code in the Linux kernel tree

Net-Kernel
source tree
Link layer
Frame type
802.3/802.2/802.2-SNAP/Ethernet
Input
Driver
NAPI
Poll + Interrupt
Soft interrupt
GRO
feed packet to network stack
RPS/RFS
make steer in SMP
Protocol handler
use
eth_type_trans
Packet_type list
Link layer
Output
Traffic Control
Soft interrupt
Transmit SKB
Scatter/Gather DMA
Free skb
XPS
multique
ue
avoid cache line bouncing
improve locality
Bridge
Virtual device, must bind one or more real device
Spanning Tree Protocol
Network Layer(IP)
Input
Protocol handler
net_protocol array
defragment
Hashtable
Each IP packet being defragmented save in a list
stored in kernel memory until they are totally processed
Output
fragment
MTU
Scatter/Gather
IO udp
neighboring
Network Layer(IP)
Forward
process ip option igonore
defragmentation
Router Alert option
Route
Forwarding Information Base(routing table)
cache
Netfilter
HOOK point
NF_IP_LOCAL_OUT/
NF_IP_LOCAL_IN etc..
Management
Long-living IP peer information
AVL tree
IP statistics
per cpu data ipstats_mib
Transport Layer (tcp)
Init
bind callback (sock_create)
Three handshrek
accept queue
syn table
create new socket fd and change state
Manage socket
inet_ehash_bucket
TCP_ESTABLISHED <= sk->sk_state <
TCP_CLOSE
inet_bind_hashbucket
local binding port info
listening_hash
socket in TCP_LISTEN
state
Transport Layer (tcp)
Output
Tcp push
Congestion control
state transition
congestion windows
packet count
Input
fast path and slow path
Interrupt context/ Process context
sk_backlog/receive_queue/prequeue
Tcp state transition
Kernel control
Timer
Retransmit/keep-
alive/time-wait
etc

You might also like