Upload
robyn-bridges
View
276
Download
7
Embed Size (px)
Citation preview
Linux Networking
2012 年 5 月
主讲:孟宁电话: 0512-68839302E-mail : [email protected]主页: http://staff.ustc.edu.cn/~mengning地址:苏州工业园区独墅湖高等教育区仁爱路 166 号明德楼 A302室
Structure of the Linux kernel
IEEE 802 in the Linux network architecture
Packet queues in the Linux kernel
the packet buffers across the protocol hierarchy
The structure of a network device interface
A network adapter uses an interrupt to send messages
Linking net_device structures
Activity forms in the Linux network architecture
recvfrom
♦ recvfrom 、 sock_recvmsg... sock->ops->recvmsg/socket.c
♦ inet_recvmsg 、 sk->sk_prot->recvmsg/af_inet.c(struct proto_ops inet_dgram_ops)
♦ udp_recvmsg/udp.c(struct proto udp_prot)
♦ __skb_recv_datagram 、 wait_for_packet/datagram.c
interrupt rx
♦ el3_interrupt 、 el3_rx 、 dev_alloc_skb+insl(ioaddr+RX_FIFO, skb_put(skb, pkt_len)...);+netif_rx(enqueue_to_backlog)/3c589_cs.c
softirq rx
♦ net_rx_action♦ napi_complete 、 napi_gro_flush 、 napi_
gro_complete 、 netif_receive_skb 、 pt_prev->func/dev.c
♦ ip_rcv 、 ip_rcv_finish 、 ipprot->handler(skb)/ip_input.c
♦ udp_rcv 、 __udp_queue_rcv_skb/udp.c 、 ip_queue_rcv_skb/ip_sockglue.c 、 sock_queue_rcv_skb 、 sk->sk_data_ready(sk, skb_len);/sock.c
谢谢大家!