
1)Both Non-Napi and Napi driver will call the netif_receive_skb() function, Non-Napi driver will through the function of prcess_blocklog(), Napi driver will through the function of polling function in device driver.
2)The netif_receive_skb() does the below tasks.
#skb_bond():
horace papa 發表在 痞客邦 留言(0) 人氣(79)

Two ways to receiving rx packets.
1) Non-Napi aware driver:
The device driver interrupt handler calls netif_rx to put the skb received from netdevice into input_pkt_queue per CPU and then call netif_rx_schedule() to add blacklog dev(virtul device) into CPU poll_list and raises softirq.
2) Napi aware driver:
horace papa 發表在 痞客邦 留言(0) 人氣(45)
horace papa 發表在 痞客邦 留言(0) 人氣(183)
Layer 2 Tunneling Protocol (L2TP) is a tunneling protocol that extends Point-to-Point Protocol (PPP) to support a link layer tunnel between a requesting L2TP client (L2TP Access Concentrator or LAC) and a target L2TP server endpoint (L2TP Network Server or LNS).
http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/rzaiy/rzaiyl2tpsupport.htm
horace papa 發表在 痞客邦 留言(0) 人氣(12)

This first diagram illustrates the layout of the SKB data area and where in that area the various pointers in 'struct sk_buff' point.
The rest of this page will walk through what the SKB data area looks like in a newly allocated SKB. How to modify those pointers to add headers, add user data, and pop headers.
Also, we will discuss how page non-linear data areas are implemented. We will also discuss how to work with them.
horace papa 發表在 痞客邦 留言(0) 人氣(141)

TCP connections
In this section and the upcoming ones, we will take a closer look at the states and how they are handled for each of the three basic protocols TCP, UDP and ICMP. Also, we will take a closer look at how connections are handled per default, if they can not be classified as either of these three protocols. We have chosen to start out with the TCP protocol since it is a stateful protocol in itself, and has a lot of interesting details with regard to the state machine in iptables.
A TCP connection is always initiated with the 3-way handshake, which establishes and negotiates the actual connection over which data will be sent. The whole session is begun with a SYN packet, then a SYN/ACK packet and finally an ACK packet to acknowledge the whole session establishment. At this point the connection is established and able to start sending data. The big problem is, how does connection tracking hook up into this? Quite simply really.
horace papa 發表在 痞客邦 留言(0) 人氣(69)