Linux 内核#
- Interrupt Context and Process Context
- Namespace
- Kernel Network
- Kernel Network Data Struct
- kernel network stack
- Network Receive Path
- 内核网络包接收流程
- Illustrated Guide to Monitoring and Tuning the Linux Networking Stack: Receiving Data
- Monitoring and Tuning the Linux Networking Stack: Receiving Data
- Overview
- Detailed Look
- Network Device Driver
- SoftIRQs
- Linux network device subsystem
- Initialization of network device subsystem
- Data arrives
- Network data processing begins
- Generic Receive Offloading (GRO)
napi_gro_receive
napi_skb_finish
- Receive Packet Steering (RPS)
- Receive Flow Steering (RFS)
- Hardware accelerated Receive Flow Steering (aRFS)
- Moving up the network stack with
netif_receive_skb
netif_receive_skb
- Protocol layer registration
- Extras
- Conclusion
- The Performance Analysis of Linux Networking – Packet Receiving
- The Linux networking stack - Testing Cassandra Throughput Performance Part 3
- Debugging network stalls on Kubernetes
- Linux 网络栈接收数据(RX):原理及内核实现(2022)
- 0 收包过程(RX)俯瞰
- 1 网卡驱动初始化
- 2 网卡收包
- 3 DMA 将包复制到 RX 队列 (ring buffer)
- 4 触发硬件中断(IRQ)
- 5 内核调度到
ksoftirqd
线程 - 6 软中断处理:从 ringbuffer 取数据送到协议栈
- 7 进入内核协议栈:L2 处理
- 8 L3 协议层处理(IPv4)
- 9 L4 协议层处理(UDP)
- 9.0 UDP 协议初始化
- 9.1 L4 handler 注册:
udp_v4_early_demux()/udp_v4_rcv()
- 9.2
udp_rcv() -> __udp4_lib_rcv()
- 9.3
__udp4_lib_rcv() -> udp_unicast_rcv_skb()
- 9.4
udp_unicast_rcv_skb() -> udp_queue_rcv_skb()
- 9.5
udp_queue_rcv_skb() -> udp_queue_rcv_one_skb() -> __udp_queue_rcv_skb()
- 9.6
__udp_queue_rcv_skb() -> __skb_queue_tail() -> socket's receive queue
- 9.7 小结
- 10 其他问题讨论
- 10 总结
- 参考资料
- bpf-trace-net-stack
- TCP IP Architecture Design - Sameer Seth
- KERNEL IMPLEMENTATION OF SOCKETS
- KERNEL IMPLEMENTATION OF TCP CONNECTION SETUP
- MOVEMENT OF sk_buff ACROSS PROTOCOL LAYERS
- TCP SEND
- TCP RECEIVE
- TCP MEMORY MANAGEMENT
- TCP TIMERS
- TCP CORE PROCESSING
- TCP STATE PROCESSING
- NET SOFT IRQ
- Good Article
- Linux Network Stack Instrumentation Points
- Understanding TCP/IP Network Stack & Writing Network Apps
- Network Receive Path
- Kernel TCP
- tcp implementation
- Implementation of Transmission Control Protocol in Linux
- TCP Implementation in Linux: A Brief Tutorial
- TCP Socket 缓存、接收窗口参数
- tcp keepalive
- TCP Reset 的原因
- SYN Cookies
- TCP Inspect
- Get socket up time
- TCP Statistics
- TCP Statistics - nstat
- SNMP counter
- General IPv4 counters
- ICMP counters
- General TCP counters
- TCP Fast Open
- TCP Fast Path
- TCP abort
- TCP Hybrid Slow Start
- TCP retransmission and congestion control
- DSACK
- invalid SACK and DSACK
- SACK shift
- TCP out of order
- TCP PAWS
- TCP ACK skip
- TCP receive window
- Delayed ACK
- Tail Loss Probe (TLP)
- TCP Fast Open description
- SYN cookies
- Challenge ACK
- prune
- examples
- ping test
- tcp 3-way handshake
- TCP normal traffic
- TcpExtTCPAbortOnClose
- TcpExtTCPAbortOnMemory and TcpExtTCPAbortOnTimeout
- TcpExtTCPAbortOnLinger
- TcpExtTCPRcvCoalesce
- TcpExtListenOverflows and TcpExtListenDrops
- IpInAddrErrors, IpExtInNoRoutes and IpOutNoRoutes
- TcpExtTCPACKSkippedSynRecv
- TcpExtTCPACKSkippedPAWS
- TcpExtTCPACKSkippedSeq
- TCP 连接查看标工具 ss 的说明
- SO_LINGER socket opt
- TCP TIME-WAIT
- PMTU
- TCP MSS
- tcp retransmit
- tcp implementation
- Socket
- Kernel Routing
- Netfilter
- Nftables - Packet flow and Netfilter hooks in detail
- [译] 深入理解 iptables 和 netfilter 架构
- 1 ipTables 和 netfilter 是什么?
- 2. Netfilter Hooks
- 3 iptables 表和链(Tables and Chains)
- 4. table 种类
- 5 每种 table 实现的 chain
- 6 iptables 规则
- 7 跳转到用户自定义 chain
- 8 iptables 和 conntrack
- 9 总结
- Netfilter Mark Concept
- Netfilter Mark
- iptables commands
- netfilter.org
- iptables concept
- Ref.
- conntrack
- Concept
- Monitoring & Troubleshooting
- Tuning
- Ref.
- IPVS
- MTU
- /proc/sys/net settings
- ========= IP Sysctl
- /proc/sys/net/ipv4/* Variables
- INET peer storage
- TCP variables
- UDP variables
- RAW variables
- CIPSOv4 Variables
- IP Variables
- /proc/sys/net/ipv6/* Variables
icmp/*
:- /proc/sys/net/bridge/* Variables:
proc/sys/net/sctp/*
Variables:/proc/sys/net/core/*
/proc/sys/net/unix/*
- Documentation for /proc/sys/net/
- bpf_jit_enable
- bpf_jit_harden
- bpf_jit_kallsyms
- bpf_jit_limit
- dev_weight
- dev_weight_rx_bias
- dev_weight_tx_bias
- default_qdisc
- busy_read
- busy_poll
- rmem_default
- rmem_max
- tstamp_allow_data
- wmem_default
- wmem_max
- message_burst and message_cost
- warnings
- netdev_budget
- netdev_budget_usecs
- netdev_max_backlog
- netdev_rss_key
- netdev_tstamp_prequeue
- optmem_max
- fb_tunnels_only_for_init_net
- devconf_inherit_init_net
- aarp-expiry-time
- aarp-resolve-time
- aarp-retransmit-limit
- aarp-tick-time
- tipc_rmem
- named_timeout
- Scheduler(调度器)
- 调度点(Scheduler Point)
- Completely Fair Scheduler(CFS)
- CFS调度器(1)-基本原理
- CFS调度器(3)-组调度
- CFS调度器(5)-带宽控制
- Linux进程调度-组调度及带宽控制
- Linux进程调度-CFS调度器
- Linux CFS 调度器:原理、设计与内核实现(2023)
- 1 概念及关系
- 2 CFS 相关设计
- 3 内核实现
- 4 使用
- 参考资料
- Storage
- Syscall