diff options
author | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
commit | b74b953b998bcc2db91b694446f3a2619ec32de6 (patch) | |
tree | 6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /Documentation/networking | |
parent | abb438526201c6a79949ad45375c051b6681c253 (diff) | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) |
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c
(commit eda603f).
Diffstat (limited to 'Documentation/networking')
42 files changed, 2144 insertions, 483 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX index 50189bf07d53..fe5c099b8fc8 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -32,6 +32,8 @@ cs89x0.txt | |||
32 | - the Crystal LAN (CS8900/20-based) Ethernet ISA adapter driver | 32 | - the Crystal LAN (CS8900/20-based) Ethernet ISA adapter driver |
33 | cxacru.txt | 33 | cxacru.txt |
34 | - Conexant AccessRunner USB ADSL Modem | 34 | - Conexant AccessRunner USB ADSL Modem |
35 | cxacru-cf.py | ||
36 | - Conexant AccessRunner USB ADSL Modem configuration file parser | ||
35 | de4x5.txt | 37 | de4x5.txt |
36 | - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver | 38 | - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver |
37 | decnet.txt | 39 | decnet.txt |
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt index 3c45d5dcd63b..dcc9eaf59395 100644 --- a/Documentation/networking/3c509.txt +++ b/Documentation/networking/3c509.txt | |||
@@ -31,7 +31,7 @@ models: | |||
31 | Large portions of this documentation were heavily borrowed from the guide | 31 | Large portions of this documentation were heavily borrowed from the guide |
32 | written the original author of the 3c509 driver, Donald Becker. The master | 32 | written the original author of the 3c509 driver, Donald Becker. The master |
33 | copy of that document, which contains notes on older versions of the driver, | 33 | copy of that document, which contains notes on older versions of the driver, |
34 | currently resides on Scyld web server: http://www.scyld.com/network/3c509.html. | 34 | currently resides on Scyld web server: http://www.scyld.com/. |
35 | 35 | ||
36 | 36 | ||
37 | (1) Special Driver Features | 37 | (1) Special Driver Features |
diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile index 6d8af1ac56c4..5aba7a33aeeb 100644 --- a/Documentation/networking/Makefile +++ b/Documentation/networking/Makefile | |||
@@ -6,3 +6,5 @@ hostprogs-y := ifenslave | |||
6 | 6 | ||
7 | # Tell kbuild to always build the programs | 7 | # Tell kbuild to always build the programs |
8 | always := $(hostprogs-y) | 8 | always := $(hostprogs-y) |
9 | |||
10 | obj-m := timestamping/ | ||
diff --git a/Documentation/networking/README.ipw2100 b/Documentation/networking/README.ipw2100 index f3fcaa41f774..6f85e1d06031 100644 --- a/Documentation/networking/README.ipw2100 +++ b/Documentation/networking/README.ipw2100 | |||
@@ -72,8 +72,7 @@ such, if you are interested in deploying or shipping a driver as part of | |||
72 | solution intended to be used for purposes other than development, please | 72 | solution intended to be used for purposes other than development, please |
73 | obtain a tested driver from Intel Customer Support at: | 73 | obtain a tested driver from Intel Customer Support at: |
74 | 74 | ||
75 | http://support.intel.com/support/notebook/sb/CS-006408.htm | 75 | http://www.intel.com/support/wireless/sb/CS-006408.htm |
76 | |||
77 | 76 | ||
78 | 1. Introduction | 77 | 1. Introduction |
79 | ----------------------------------------------- | 78 | ----------------------------------------------- |
diff --git a/Documentation/networking/README.ipw2200 b/Documentation/networking/README.ipw2200 index 80c728522c4c..616a8e540b0b 100644 --- a/Documentation/networking/README.ipw2200 +++ b/Documentation/networking/README.ipw2200 | |||
@@ -85,7 +85,7 @@ such, if you are interested in deploying or shipping a driver as part of | |||
85 | solution intended to be used for purposes other than development, please | 85 | solution intended to be used for purposes other than development, please |
86 | obtain a tested driver from Intel Customer Support at: | 86 | obtain a tested driver from Intel Customer Support at: |
87 | 87 | ||
88 | http://support.intel.com/support/notebook/sb/CS-006408.htm | 88 | http://support.intel.com |
89 | 89 | ||
90 | 90 | ||
91 | 1. Introduction | 91 | 1. Introduction |
@@ -171,7 +171,7 @@ Where the supported parameter are: | |||
171 | 171 | ||
172 | led | 172 | led |
173 | Can be used to turn on experimental LED code. | 173 | Can be used to turn on experimental LED code. |
174 | 0 = Off, 1 = On. Default is 0. | 174 | 0 = Off, 1 = On. Default is 1. |
175 | 175 | ||
176 | mode | 176 | mode |
177 | Can be used to set the default mode of the adapter. | 177 | Can be used to set the default mode of the adapter. |
diff --git a/Documentation/networking/README.sb1000 b/Documentation/networking/README.sb1000 index f82d42584e98..f92c2aac56a9 100644 --- a/Documentation/networking/README.sb1000 +++ b/Documentation/networking/README.sb1000 | |||
@@ -27,8 +27,8 @@ cable modem easy. | |||
27 | in Franco's original source code distribution .tar.gz file. Support for | 27 | in Franco's original source code distribution .tar.gz file. Support for |
28 | the sb1000 driver can be found at: | 28 | the sb1000 driver can be found at: |
29 | 29 | ||
30 | http://home.adelphia.net/~siglercm/sb1000.html | 30 | http://web.archive.org/web/*/http://home.adelphia.net/~siglercm/sb1000.html |
31 | http://linuxpower.cx/~cable/ | 31 | http://web.archive.org/web/*/http://linuxpower.cx/~cable/ |
32 | 32 | ||
33 | along with these utilities. | 33 | along with these utilities. |
34 | 34 | ||
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 796012540386..9ff579502151 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt | |||
@@ -68,7 +68,7 @@ REAL NAME" to listserv@tichy.ch.uj.edu.pl. Then, to submit messages to the | |||
68 | list, mail to linux-arcnet@tichy.ch.uj.edu.pl. | 68 | list, mail to linux-arcnet@tichy.ch.uj.edu.pl. |
69 | 69 | ||
70 | There are archives of the mailing list at: | 70 | There are archives of the mailing list at: |
71 | http://tichy.ch.uj.edu.pl/lists/linux-arcnet | 71 | http://epistolary.org/mailman/listinfo.cgi/arcnet |
72 | 72 | ||
73 | The people on linux-net@vger.kernel.org have also been known to be very | 73 | The people on linux-net@vger.kernel.org have also been known to be very |
74 | helpful, especially when we're talking about ALPHA Linux kernels that may or | 74 | helpful, especially when we're talking about ALPHA Linux kernels that may or |
@@ -79,7 +79,7 @@ Other Drivers and Info | |||
79 | ---------------------- | 79 | ---------------------- |
80 | 80 | ||
81 | You can try my ARCNET page on the World Wide Web at: | 81 | You can try my ARCNET page on the World Wide Web at: |
82 | http://www.worldvisions.ca/~apenwarr/arcnet/ | 82 | http://www.qis.net/~jschmitz/arcnet/ |
83 | 83 | ||
84 | Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you | 84 | Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you |
85 | might be interested in, which includes several drivers for various cards | 85 | might be interested in, which includes several drivers for various cards |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 61f516b135b4..d2b62b71b617 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -49,6 +49,7 @@ Table of Contents | |||
49 | 3.3 Configuring Bonding Manually with Ifenslave | 49 | 3.3 Configuring Bonding Manually with Ifenslave |
50 | 3.3.1 Configuring Multiple Bonds Manually | 50 | 3.3.1 Configuring Multiple Bonds Manually |
51 | 3.4 Configuring Bonding Manually via Sysfs | 51 | 3.4 Configuring Bonding Manually via Sysfs |
52 | 3.5 Overriding Configuration for Special Cases | ||
52 | 53 | ||
53 | 4. Querying Bonding Configuration | 54 | 4. Querying Bonding Configuration |
54 | 4.1 Bonding Configuration | 55 | 4.1 Bonding Configuration |
@@ -1318,8 +1319,87 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval | |||
1318 | echo +eth2 > /sys/class/net/bond1/bonding/slaves | 1319 | echo +eth2 > /sys/class/net/bond1/bonding/slaves |
1319 | echo +eth3 > /sys/class/net/bond1/bonding/slaves | 1320 | echo +eth3 > /sys/class/net/bond1/bonding/slaves |
1320 | 1321 | ||
1321 | 1322 | 3.5 Overriding Configuration for Special Cases | |
1322 | 4. Querying Bonding Configuration | 1323 | ---------------------------------------------- |
1324 | When using the bonding driver, the physical port which transmits a frame is | ||
1325 | typically selected by the bonding driver, and is not relevant to the user or | ||
1326 | system administrator. The output port is simply selected using the policies of | ||
1327 | the selected bonding mode. On occasion however, it is helpful to direct certain | ||
1328 | classes of traffic to certain physical interfaces on output to implement | ||
1329 | slightly more complex policies. For example, to reach a web server over a | ||
1330 | bonded interface in which eth0 connects to a private network, while eth1 | ||
1331 | connects via a public network, it may be desirous to bias the bond to send said | ||
1332 | traffic over eth0 first, using eth1 only as a fall back, while all other traffic | ||
1333 | can safely be sent over either interface. Such configurations may be achieved | ||
1334 | using the traffic control utilities inherent in linux. | ||
1335 | |||
1336 | By default the bonding driver is multiqueue aware and 16 queues are created | ||
1337 | when the driver initializes (see Documentation/networking/multiqueue.txt | ||
1338 | for details). If more or less queues are desired the module parameter | ||
1339 | tx_queues can be used to change this value. There is no sysfs parameter | ||
1340 | available as the allocation is done at module init time. | ||
1341 | |||
1342 | The output of the file /proc/net/bonding/bondX has changed so the output Queue | ||
1343 | ID is now printed for each slave: | ||
1344 | |||
1345 | Bonding Mode: fault-tolerance (active-backup) | ||
1346 | Primary Slave: None | ||
1347 | Currently Active Slave: eth0 | ||
1348 | MII Status: up | ||
1349 | MII Polling Interval (ms): 0 | ||
1350 | Up Delay (ms): 0 | ||
1351 | Down Delay (ms): 0 | ||
1352 | |||
1353 | Slave Interface: eth0 | ||
1354 | MII Status: up | ||
1355 | Link Failure Count: 0 | ||
1356 | Permanent HW addr: 00:1a:a0:12:8f:cb | ||
1357 | Slave queue ID: 0 | ||
1358 | |||
1359 | Slave Interface: eth1 | ||
1360 | MII Status: up | ||
1361 | Link Failure Count: 0 | ||
1362 | Permanent HW addr: 00:1a:a0:12:8f:cc | ||
1363 | Slave queue ID: 2 | ||
1364 | |||
1365 | The queue_id for a slave can be set using the command: | ||
1366 | |||
1367 | # echo "eth1:2" > /sys/class/net/bond0/bonding/queue_id | ||
1368 | |||
1369 | Any interface that needs a queue_id set should set it with multiple calls | ||
1370 | like the one above until proper priorities are set for all interfaces. On | ||
1371 | distributions that allow configuration via initscripts, multiple 'queue_id' | ||
1372 | arguments can be added to BONDING_OPTS to set all needed slave queues. | ||
1373 | |||
1374 | These queue id's can be used in conjunction with the tc utility to configure | ||
1375 | a multiqueue qdisc and filters to bias certain traffic to transmit on certain | ||
1376 | slave devices. For instance, say we wanted, in the above configuration to | ||
1377 | force all traffic bound to 192.168.1.100 to use eth1 in the bond as its output | ||
1378 | device. The following commands would accomplish this: | ||
1379 | |||
1380 | # tc qdisc add dev bond0 handle 1 root multiq | ||
1381 | |||
1382 | # tc filter add dev bond0 protocol ip parent 1: prio 1 u32 match ip dst \ | ||
1383 | 192.168.1.100 action skbedit queue_mapping 2 | ||
1384 | |||
1385 | These commands tell the kernel to attach a multiqueue queue discipline to the | ||
1386 | bond0 interface and filter traffic enqueued to it, such that packets with a dst | ||
1387 | ip of 192.168.1.100 have their output queue mapping value overwritten to 2. | ||
1388 | This value is then passed into the driver, causing the normal output path | ||
1389 | selection policy to be overridden, selecting instead qid 2, which maps to eth1. | ||
1390 | |||
1391 | Note that qid values begin at 1. Qid 0 is reserved to initiate to the driver | ||
1392 | that normal output policy selection should take place. One benefit to simply | ||
1393 | leaving the qid for a slave to 0 is the multiqueue awareness in the bonding | ||
1394 | driver that is now present. This awareness allows tc filters to be placed on | ||
1395 | slave devices as well as bond devices and the bonding driver will simply act as | ||
1396 | a pass-through for selecting output queues on the slave device rather than | ||
1397 | output port selection. | ||
1398 | |||
1399 | This feature first appeared in bonding driver version 3.7.0 and support for | ||
1400 | output slave selection was limited to round-robin and active-backup modes. | ||
1401 | |||
1402 | 4 Querying Bonding Configuration | ||
1323 | ================================= | 1403 | ================================= |
1324 | 1404 | ||
1325 | 4.1 Bonding Configuration | 1405 | 4.1 Bonding Configuration |
@@ -2432,7 +2512,7 @@ be found at: | |||
2432 | https://lists.sourceforge.net/lists/listinfo/bonding-devel | 2512 | https://lists.sourceforge.net/lists/listinfo/bonding-devel |
2433 | 2513 | ||
2434 | Donald Becker's Ethernet Drivers and diag programs may be found at : | 2514 | Donald Becker's Ethernet Drivers and diag programs may be found at : |
2435 | - http://www.scyld.com/network/ | 2515 | - http://web.archive.org/web/*/http://www.scyld.com/network/ |
2436 | 2516 | ||
2437 | You will also find a lot of information regarding Ethernet, NWay, MII, | 2517 | You will also find a lot of information regarding Ethernet, NWay, MII, |
2438 | etc. at www.scyld.com. | 2518 | etc. at www.scyld.com. |
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt new file mode 100644 index 000000000000..7fe7a9a33a4f --- /dev/null +++ b/Documentation/networking/caif/Linux-CAIF.txt | |||
@@ -0,0 +1,212 @@ | |||
1 | Linux CAIF | ||
2 | =========== | ||
3 | copyright (C) ST-Ericsson AB 2010 | ||
4 | Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
5 | License terms: GNU General Public License (GPL) version 2 | ||
6 | |||
7 | |||
8 | Introduction | ||
9 | ------------ | ||
10 | CAIF is a MUX protocol used by ST-Ericsson cellular modems for | ||
11 | communication between Modem and host. The host processes can open virtual AT | ||
12 | channels, initiate GPRS Data connections, Video channels and Utility Channels. | ||
13 | The Utility Channels are general purpose pipes between modem and host. | ||
14 | |||
15 | ST-Ericsson modems support a number of transports between modem | ||
16 | and host. Currently, UART and Loopback are available for Linux. | ||
17 | |||
18 | |||
19 | Architecture: | ||
20 | ------------ | ||
21 | The implementation of CAIF is divided into: | ||
22 | * CAIF Socket Layer, Kernel API, and Net Device. | ||
23 | * CAIF Core Protocol Implementation | ||
24 | * CAIF Link Layer, implemented as NET devices. | ||
25 | |||
26 | |||
27 | RTNL | ||
28 | ! | ||
29 | ! +------+ +------+ +------+ | ||
30 | ! +------+! +------+! +------+! | ||
31 | ! ! Sock !! !Kernel!! ! Net !! | ||
32 | ! ! API !+ ! API !+ ! Dev !+ <- CAIF Client APIs | ||
33 | ! +------+ +------! +------+ | ||
34 | ! ! ! ! | ||
35 | ! +----------!----------+ | ||
36 | ! +------+ <- CAIF Protocol Implementation | ||
37 | +-------> ! CAIF ! | ||
38 | ! Core ! | ||
39 | +------+ | ||
40 | +--------!--------+ | ||
41 | ! ! | ||
42 | +------+ +-----+ | ||
43 | ! ! ! TTY ! <- Link Layer (Net Devices) | ||
44 | +------+ +-----+ | ||
45 | |||
46 | |||
47 | Using the Kernel API | ||
48 | ---------------------- | ||
49 | The Kernel API is used for accessing CAIF channels from the | ||
50 | kernel. | ||
51 | The user of the API has to implement two callbacks for receive | ||
52 | and control. | ||
53 | The receive callback gives a CAIF packet as a SKB. The control | ||
54 | callback will | ||
55 | notify of channel initialization complete, and flow-on/flow- | ||
56 | off. | ||
57 | |||
58 | |||
59 | struct caif_device caif_dev = { | ||
60 | .caif_config = { | ||
61 | .name = "MYDEV" | ||
62 | .type = CAIF_CHTY_AT | ||
63 | } | ||
64 | .receive_cb = my_receive, | ||
65 | .control_cb = my_control, | ||
66 | }; | ||
67 | caif_add_device(&caif_dev); | ||
68 | caif_transmit(&caif_dev, skb); | ||
69 | |||
70 | See the caif_kernel.h for details about the CAIF kernel API. | ||
71 | |||
72 | |||
73 | I M P L E M E N T A T I O N | ||
74 | =========================== | ||
75 | =========================== | ||
76 | |||
77 | CAIF Core Protocol Layer | ||
78 | ========================================= | ||
79 | |||
80 | CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson. | ||
81 | It implements the CAIF protocol stack in a layered approach, where | ||
82 | each layer described in the specification is implemented as a separate layer. | ||
83 | The architecture is inspired by the design patterns "Protocol Layer" and | ||
84 | "Protocol Packet". | ||
85 | |||
86 | == CAIF structure == | ||
87 | The Core CAIF implementation contains: | ||
88 | - Simple implementation of CAIF. | ||
89 | - Layered architecture (a la Streams), each layer in the CAIF | ||
90 | specification is implemented in a separate c-file. | ||
91 | - Clients must implement PHY layer to access physical HW | ||
92 | with receive and transmit functions. | ||
93 | - Clients must call configuration function to add PHY layer. | ||
94 | - Clients must implement CAIF layer to consume/produce | ||
95 | CAIF payload with receive and transmit functions. | ||
96 | - Clients must call configuration function to add and connect the | ||
97 | Client layer. | ||
98 | - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed | ||
99 | to the called function (except for framing layers' receive functions | ||
100 | or if a transmit function returns an error, in which case the caller | ||
101 | must free the packet). | ||
102 | |||
103 | Layered Architecture | ||
104 | -------------------- | ||
105 | The CAIF protocol can be divided into two parts: Support functions and Protocol | ||
106 | Implementation. The support functions include: | ||
107 | |||
108 | - CFPKT CAIF Packet. Implementation of CAIF Protocol Packet. The | ||
109 | CAIF Packet has functions for creating, destroying and adding content | ||
110 | and for adding/extracting header and trailers to protocol packets. | ||
111 | |||
112 | - CFLST CAIF list implementation. | ||
113 | |||
114 | - CFGLUE CAIF Glue. Contains OS Specifics, such as memory | ||
115 | allocation, endianness, etc. | ||
116 | |||
117 | The CAIF Protocol implementation contains: | ||
118 | |||
119 | - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol | ||
120 | Stack and provides a Client interface for adding Link-Layer and | ||
121 | Driver interfaces on top of the CAIF Stack. | ||
122 | |||
123 | - CFCTRL CAIF Control layer. Encodes and Decodes control messages | ||
124 | such as enumeration and channel setup. Also matches request and | ||
125 | response messages. | ||
126 | |||
127 | - CFSERVL General CAIF Service Layer functionality; handles flow | ||
128 | control and remote shutdown requests. | ||
129 | |||
130 | - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual | ||
131 | External Interface). This layer encodes/decodes VEI frames. | ||
132 | |||
133 | - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP | ||
134 | traffic), encodes/decodes Datagram frames. | ||
135 | |||
136 | - CFMUX CAIF Mux layer. Handles multiplexing between multiple | ||
137 | physical bearers and multiple channels such as VEI, Datagram, etc. | ||
138 | The MUX keeps track of the existing CAIF Channels and | ||
139 | Physical Instances and selects the apropriate instance based | ||
140 | on Channel-Id and Physical-ID. | ||
141 | |||
142 | - CFFRML CAIF Framing layer. Handles Framing i.e. Frame length | ||
143 | and frame checksum. | ||
144 | |||
145 | - CFSERL CAIF Serial layer. Handles concatenation/split of frames | ||
146 | into CAIF Frames with correct length. | ||
147 | |||
148 | |||
149 | |||
150 | +---------+ | ||
151 | | Config | | ||
152 | | CFCNFG | | ||
153 | +---------+ | ||
154 | ! | ||
155 | +---------+ +---------+ +---------+ | ||
156 | | AT | | Control | | Datagram| | ||
157 | | CFVEIL | | CFCTRL | | CFDGML | | ||
158 | +---------+ +---------+ +---------+ | ||
159 | \_____________!______________/ | ||
160 | ! | ||
161 | +---------+ | ||
162 | | MUX | | ||
163 | | | | ||
164 | +---------+ | ||
165 | _____!_____ | ||
166 | / \ | ||
167 | +---------+ +---------+ | ||
168 | | CFFRML | | CFFRML | | ||
169 | | Framing | | Framing | | ||
170 | +---------+ +---------+ | ||
171 | ! ! | ||
172 | +---------+ +---------+ | ||
173 | | | | Serial | | ||
174 | | | | CFSERL | | ||
175 | +---------+ +---------+ | ||
176 | |||
177 | |||
178 | In this layered approach the following "rules" apply. | ||
179 | - All layers embed the same structure "struct cflayer" | ||
180 | - A layer does not depend on any other layer's private data. | ||
181 | - Layers are stacked by setting the pointers | ||
182 | layer->up , layer->dn | ||
183 | - In order to send data upwards, each layer should do | ||
184 | layer->up->receive(layer->up, packet); | ||
185 | - In order to send data downwards, each layer should do | ||
186 | layer->dn->transmit(layer->dn, packet); | ||
187 | |||
188 | |||
189 | Linux Driver Implementation | ||
190 | =========================== | ||
191 | |||
192 | Linux GPRS Net Device and CAIF socket are implemented on top of the | ||
193 | CAIF Core protocol. The Net device and CAIF socket have an instance of | ||
194 | 'struct cflayer', just like the CAIF Core protocol stack. | ||
195 | Net device and Socket implement the 'receive()' function defined by | ||
196 | 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and | ||
197 | receive of packets is handled as by the rest of the layers: the 'dn->transmit()' | ||
198 | function is called in order to transmit data. | ||
199 | |||
200 | The layer on top of the CAIF Core implementation is | ||
201 | sometimes referred to as the "Client layer". | ||
202 | |||
203 | |||
204 | Configuration of Link Layer | ||
205 | --------------------------- | ||
206 | The Link Layer is implemented as Linux net devices (struct net_device). | ||
207 | Payload handling and registration is done using standard Linux mechanisms. | ||
208 | |||
209 | The CAIF Protocol relies on a loss-less link layer without implementing | ||
210 | retransmission. This implies that packet drops must not happen. | ||
211 | Therefore a flow-control mechanism is implemented where the physical | ||
212 | interface can initiate flow stop for all CAIF Channels. | ||
diff --git a/Documentation/networking/caif/README b/Documentation/networking/caif/README new file mode 100644 index 000000000000..757ccfaa1385 --- /dev/null +++ b/Documentation/networking/caif/README | |||
@@ -0,0 +1,109 @@ | |||
1 | Copyright (C) ST-Ericsson AB 2010 | ||
2 | Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
3 | License terms: GNU General Public License (GPL) version 2 | ||
4 | --------------------------------------------------------- | ||
5 | |||
6 | === Start === | ||
7 | If you have compiled CAIF for modules do: | ||
8 | |||
9 | $modprobe crc_ccitt | ||
10 | $modprobe caif | ||
11 | $modprobe caif_socket | ||
12 | $modprobe chnl_net | ||
13 | |||
14 | |||
15 | === Preparing the setup with a STE modem === | ||
16 | |||
17 | If you are working on integration of CAIF you should make sure | ||
18 | that the kernel is built with module support. | ||
19 | |||
20 | There are some things that need to be tweaked to get the host TTY correctly | ||
21 | set up to talk to the modem. | ||
22 | Since the CAIF stack is running in the kernel and we want to use the existing | ||
23 | TTY, we are installing our physical serial driver as a line discipline above | ||
24 | the TTY device. | ||
25 | |||
26 | To achieve this we need to install the N_CAIF ldisc from user space. | ||
27 | The benefit is that we can hook up to any TTY. | ||
28 | |||
29 | The use of Start-of-frame-extension (STX) must also be set as | ||
30 | module parameter "ser_use_stx". | ||
31 | |||
32 | Normally Frame Checksum is always used on UART, but this is also provided as a | ||
33 | module parameter "ser_use_fcs". | ||
34 | |||
35 | $ modprobe caif_serial ser_ttyname=/dev/ttyS0 ser_use_stx=yes | ||
36 | $ ifconfig caif_ttyS0 up | ||
37 | |||
38 | PLEASE NOTE: There is a limitation in Android shell. | ||
39 | It only accepts one argument to insmod/modprobe! | ||
40 | |||
41 | === Trouble shooting === | ||
42 | |||
43 | There are debugfs parameters provided for serial communication. | ||
44 | /sys/kernel/debug/caif_serial/<tty-name>/ | ||
45 | |||
46 | * ser_state: Prints the bit-mask status where | ||
47 | - 0x02 means SENDING, this is a transient state. | ||
48 | - 0x10 means FLOW_OFF_SENT, i.e. the previous frame has not been sent | ||
49 | and is blocking further send operation. Flow OFF has been propagated | ||
50 | to all CAIF Channels using this TTY. | ||
51 | |||
52 | * tty_status: Prints the bit-mask tty status information | ||
53 | - 0x01 - tty->warned is on. | ||
54 | - 0x02 - tty->low_latency is on. | ||
55 | - 0x04 - tty->packed is on. | ||
56 | - 0x08 - tty->flow_stopped is on. | ||
57 | - 0x10 - tty->hw_stopped is on. | ||
58 | - 0x20 - tty->stopped is on. | ||
59 | |||
60 | * last_tx_msg: Binary blob Prints the last transmitted frame. | ||
61 | This can be printed with | ||
62 | $od --format=x1 /sys/kernel/debug/caif_serial/<tty>/last_rx_msg. | ||
63 | The first two tx messages sent look like this. Note: The initial | ||
64 | byte 02 is start of frame extension (STX) used for re-syncing | ||
65 | upon errors. | ||
66 | |||
67 | - Enumeration: | ||
68 | 0000000 02 05 00 00 03 01 d2 02 | ||
69 | | | | | | | | ||
70 | STX(1) | | | | | ||
71 | Length(2)| | | | ||
72 | Control Channel(1) | ||
73 | Command:Enumeration(1) | ||
74 | Link-ID(1) | ||
75 | Checksum(2) | ||
76 | - Channel Setup: | ||
77 | 0000000 02 07 00 00 00 21 a1 00 48 df | ||
78 | | | | | | | | | | ||
79 | STX(1) | | | | | | | ||
80 | Length(2)| | | | | | ||
81 | Control Channel(1) | ||
82 | Command:Channel Setup(1) | ||
83 | Channel Type(1) | ||
84 | Priority and Link-ID(1) | ||
85 | Endpoint(1) | ||
86 | Checksum(2) | ||
87 | |||
88 | * last_rx_msg: Prints the last transmitted frame. | ||
89 | The RX messages for LinkSetup look almost identical but they have the | ||
90 | bit 0x20 set in the command bit, and Channel Setup has added one byte | ||
91 | before Checksum containing Channel ID. | ||
92 | NOTE: Several CAIF Messages might be concatenated. The maximum debug | ||
93 | buffer size is 128 bytes. | ||
94 | |||
95 | == Error Scenarios: | ||
96 | - last_tx_msg contains channel setup message and last_rx_msg is empty -> | ||
97 | The host seems to be able to send over the UART, at least the CAIF ldisc get | ||
98 | notified that sending is completed. | ||
99 | |||
100 | - last_tx_msg contains enumeration message and last_rx_msg is empty -> | ||
101 | The host is not able to send the message from UART, the tty has not been | ||
102 | able to complete the transmit operation. | ||
103 | |||
104 | - if /sys/kernel/debug/caif_serial/<tty>/tty_status is non-zero there | ||
105 | might be problems transmitting over UART. | ||
106 | E.g. host and modem wiring is not correct you will typically see | ||
107 | tty_status = 0x10 (hw_stopped) and ser_state = 0x10 (FLOW_OFF_SENT). | ||
108 | You will probably see the enumeration message in last_tx_message | ||
109 | and empty last_rx_message. | ||
diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt new file mode 100644 index 000000000000..61d7c9247453 --- /dev/null +++ b/Documentation/networking/caif/spi_porting.txt | |||
@@ -0,0 +1,208 @@ | |||
1 | - CAIF SPI porting - | ||
2 | |||
3 | - CAIF SPI basics: | ||
4 | |||
5 | Running CAIF over SPI needs some extra setup, owing to the nature of SPI. | ||
6 | Two extra GPIOs have been added in order to negotiate the transfers | ||
7 | between the master and the slave. The minimum requirement for running | ||
8 | CAIF over SPI is a SPI slave chip and two GPIOs (more details below). | ||
9 | Please note that running as a slave implies that you need to keep up | ||
10 | with the master clock. An overrun or underrun event is fatal. | ||
11 | |||
12 | - CAIF SPI framework: | ||
13 | |||
14 | To make porting as easy as possible, the CAIF SPI has been divided in | ||
15 | two parts. The first part (called the interface part) deals with all | ||
16 | generic functionality such as length framing, SPI frame negotiation | ||
17 | and SPI frame delivery and transmission. The other part is the CAIF | ||
18 | SPI slave device part, which is the module that you have to write if | ||
19 | you want to run SPI CAIF on a new hardware. This part takes care of | ||
20 | the physical hardware, both with regard to SPI and to GPIOs. | ||
21 | |||
22 | - Implementing a CAIF SPI device: | ||
23 | |||
24 | - Functionality provided by the CAIF SPI slave device: | ||
25 | |||
26 | In order to implement a SPI device you will, as a minimum, | ||
27 | need to implement the following | ||
28 | functions: | ||
29 | |||
30 | int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev): | ||
31 | |||
32 | This function is called by the CAIF SPI interface to give | ||
33 | you a chance to set up your hardware to be ready to receive | ||
34 | a stream of data from the master. The xfer structure contains | ||
35 | both physical and logical adresses, as well as the total length | ||
36 | of the transfer in both directions.The dev parameter can be used | ||
37 | to map to different CAIF SPI slave devices. | ||
38 | |||
39 | void (*sig_xfer) (bool xfer, struct cfspi_dev *dev): | ||
40 | |||
41 | This function is called by the CAIF SPI interface when the output | ||
42 | (SPI_INT) GPIO needs to change state. The boolean value of the xfer | ||
43 | variable indicates whether the GPIO should be asserted (HIGH) or | ||
44 | deasserted (LOW). The dev parameter can be used to map to different CAIF | ||
45 | SPI slave devices. | ||
46 | |||
47 | - Functionality provided by the CAIF SPI interface: | ||
48 | |||
49 | void (*ss_cb) (bool assert, struct cfspi_ifc *ifc); | ||
50 | |||
51 | This function is called by the CAIF SPI slave device in order to | ||
52 | signal a change of state of the input GPIO (SS) to the interface. | ||
53 | Only active edges are mandatory to be reported. | ||
54 | This function can be called from IRQ context (recommended in order | ||
55 | not to introduce latency). The ifc parameter should be the pointer | ||
56 | returned from the platform probe function in the SPI device structure. | ||
57 | |||
58 | void (*xfer_done_cb) (struct cfspi_ifc *ifc); | ||
59 | |||
60 | This function is called by the CAIF SPI slave device in order to | ||
61 | report that a transfer is completed. This function should only be | ||
62 | called once both the transmission and the reception are completed. | ||
63 | This function can be called from IRQ context (recommended in order | ||
64 | not to introduce latency). The ifc parameter should be the pointer | ||
65 | returned from the platform probe function in the SPI device structure. | ||
66 | |||
67 | - Connecting the bits and pieces: | ||
68 | |||
69 | - Filling in the SPI slave device structure: | ||
70 | |||
71 | Connect the necessary callback functions. | ||
72 | Indicate clock speed (used to calculate toggle delays). | ||
73 | Chose a suitable name (helps debugging if you use several CAIF | ||
74 | SPI slave devices). | ||
75 | Assign your private data (can be used to map to your structure). | ||
76 | |||
77 | - Filling in the SPI slave platform device structure: | ||
78 | Add name of driver to connect to ("cfspi_sspi"). | ||
79 | Assign the SPI slave device structure as platform data. | ||
80 | |||
81 | - Padding: | ||
82 | |||
83 | In order to optimize throughput, a number of SPI padding options are provided. | ||
84 | Padding can be enabled independently for uplink and downlink transfers. | ||
85 | Padding can be enabled for the head, the tail and for the total frame size. | ||
86 | The padding needs to be correctly configured on both sides of the link. | ||
87 | The padding can be changed via module parameters in cfspi_sspi.c or via | ||
88 | the sysfs directory of the cfspi_sspi driver (before device registration). | ||
89 | |||
90 | - CAIF SPI device template: | ||
91 | |||
92 | /* | ||
93 | * Copyright (C) ST-Ericsson AB 2010 | ||
94 | * Author: Daniel Martensson / Daniel.Martensson@stericsson.com | ||
95 | * License terms: GNU General Public License (GPL), version 2. | ||
96 | * | ||
97 | */ | ||
98 | |||
99 | #include <linux/init.h> | ||
100 | #include <linux/module.h> | ||
101 | #include <linux/device.h> | ||
102 | #include <linux/wait.h> | ||
103 | #include <linux/interrupt.h> | ||
104 | #include <linux/dma-mapping.h> | ||
105 | #include <net/caif/caif_spi.h> | ||
106 | |||
107 | MODULE_LICENSE("GPL"); | ||
108 | |||
109 | struct sspi_struct { | ||
110 | struct cfspi_dev sdev; | ||
111 | struct cfspi_xfer *xfer; | ||
112 | }; | ||
113 | |||
114 | static struct sspi_struct slave; | ||
115 | static struct platform_device slave_device; | ||
116 | |||
117 | static irqreturn_t sspi_irq(int irq, void *arg) | ||
118 | { | ||
119 | /* You only need to trigger on an edge to the active state of the | ||
120 | * SS signal. Once a edge is detected, the ss_cb() function should be | ||
121 | * called with the parameter assert set to true. It is OK | ||
122 | * (and even advised) to call the ss_cb() function in IRQ context in | ||
123 | * order not to add any delay. */ | ||
124 | |||
125 | return IRQ_HANDLED; | ||
126 | } | ||
127 | |||
128 | static void sspi_complete(void *context) | ||
129 | { | ||
130 | /* Normally the DMA or the SPI framework will call you back | ||
131 | * in something similar to this. The only thing you need to | ||
132 | * do is to call the xfer_done_cb() function, providing the pointer | ||
133 | * to the CAIF SPI interface. It is OK to call this function | ||
134 | * from IRQ context. */ | ||
135 | } | ||
136 | |||
137 | static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev) | ||
138 | { | ||
139 | /* Store transfer info. For a normal implementation you should | ||
140 | * set up your DMA here and make sure that you are ready to | ||
141 | * receive the data from the master SPI. */ | ||
142 | |||
143 | struct sspi_struct *sspi = (struct sspi_struct *)dev->priv; | ||
144 | |||
145 | sspi->xfer = xfer; | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) | ||
151 | { | ||
152 | /* If xfer is true then you should assert the SPI_INT to indicate to | ||
153 | * the master that you are ready to recieve the data from the master | ||
154 | * SPI. If xfer is false then you should de-assert SPI_INT to indicate | ||
155 | * that the transfer is done. | ||
156 | */ | ||
157 | |||
158 | struct sspi_struct *sspi = (struct sspi_struct *)dev->priv; | ||
159 | } | ||
160 | |||
161 | static void sspi_release(struct device *dev) | ||
162 | { | ||
163 | /* | ||
164 | * Here you should release your SPI device resources. | ||
165 | */ | ||
166 | } | ||
167 | |||
168 | static int __init sspi_init(void) | ||
169 | { | ||
170 | /* Here you should initialize your SPI device by providing the | ||
171 | * necessary functions, clock speed, name and private data. Once | ||
172 | * done, you can register your device with the | ||
173 | * platform_device_register() function. This function will return | ||
174 | * with the CAIF SPI interface initialized. This is probably also | ||
175 | * the place where you should set up your GPIOs, interrupts and SPI | ||
176 | * resources. */ | ||
177 | |||
178 | int res = 0; | ||
179 | |||
180 | /* Initialize slave device. */ | ||
181 | slave.sdev.init_xfer = sspi_init_xfer; | ||
182 | slave.sdev.sig_xfer = sspi_sig_xfer; | ||
183 | slave.sdev.clk_mhz = 13; | ||
184 | slave.sdev.priv = &slave; | ||
185 | slave.sdev.name = "spi_sspi"; | ||
186 | slave_device.dev.release = sspi_release; | ||
187 | |||
188 | /* Initialize platform device. */ | ||
189 | slave_device.name = "cfspi_sspi"; | ||
190 | slave_device.dev.platform_data = &slave.sdev; | ||
191 | |||
192 | /* Register platform device. */ | ||
193 | res = platform_device_register(&slave_device); | ||
194 | if (res) { | ||
195 | printk(KERN_WARNING "sspi_init: failed to register dev.\n"); | ||
196 | return -ENODEV; | ||
197 | } | ||
198 | |||
199 | return res; | ||
200 | } | ||
201 | |||
202 | static void __exit sspi_exit(void) | ||
203 | { | ||
204 | platform_device_del(&slave_device); | ||
205 | } | ||
206 | |||
207 | module_init(sspi_init); | ||
208 | module_exit(sspi_exit); | ||
diff --git a/Documentation/networking/cxacru-cf.py b/Documentation/networking/cxacru-cf.py new file mode 100644 index 000000000000..b41d298398c8 --- /dev/null +++ b/Documentation/networking/cxacru-cf.py | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/usr/bin/env python | ||
2 | # Copyright 2009 Simon Arlott | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify it | ||
5 | # under the terms of the GNU General Public License as published by the Free | ||
6 | # Software Foundation; either version 2 of the License, or (at your option) | ||
7 | # any later version. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, but WITHOUT | ||
10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | # more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along with | ||
15 | # this program; if not, write to the Free Software Foundation, Inc., 59 | ||
16 | # Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | # | ||
18 | # Usage: cxacru-cf.py < cxacru-cf.bin | ||
19 | # Output: values string suitable for the sysfs adsl_config attribute | ||
20 | # | ||
21 | # Warning: cxacru-cf.bin with MD5 hash cdbac2689969d5ed5d4850f117702110 | ||
22 | # contains mis-aligned values which will stop the modem from being able | ||
23 | # to make a connection. If the first and last two bytes are removed then | ||
24 | # the values become valid, but the modulation will be forced to ANSI | ||
25 | # T1.413 only which may not be appropriate. | ||
26 | # | ||
27 | # The original binary format is a packed list of le32 values. | ||
28 | |||
29 | import sys | ||
30 | import struct | ||
31 | |||
32 | i = 0 | ||
33 | while True: | ||
34 | buf = sys.stdin.read(4) | ||
35 | |||
36 | if len(buf) == 0: | ||
37 | break | ||
38 | elif len(buf) != 4: | ||
39 | sys.stdout.write("\n") | ||
40 | sys.stderr.write("Error: read {0} not 4 bytes\n".format(len(buf))) | ||
41 | sys.exit(1) | ||
42 | |||
43 | if i > 0: | ||
44 | sys.stdout.write(" ") | ||
45 | sys.stdout.write("{0:x}={1}".format(i, struct.unpack("<I", buf)[0])) | ||
46 | i += 1 | ||
47 | |||
48 | sys.stdout.write("\n") | ||
diff --git a/Documentation/networking/cxacru.txt b/Documentation/networking/cxacru.txt index b074681a963e..2cce04457b4d 100644 --- a/Documentation/networking/cxacru.txt +++ b/Documentation/networking/cxacru.txt | |||
@@ -4,6 +4,12 @@ While it is capable of managing/maintaining the ADSL connection without the | |||
4 | module loaded, the device will sometimes stop responding after unloading the | 4 | module loaded, the device will sometimes stop responding after unloading the |
5 | driver and it is necessary to unplug/remove power to the device to fix this. | 5 | driver and it is necessary to unplug/remove power to the device to fix this. |
6 | 6 | ||
7 | Note: support for cxacru-cf.bin has been removed. It was not loaded correctly | ||
8 | so it had no effect on the device configuration. Fixing it could have stopped | ||
9 | existing devices working when an invalid configuration is supplied. | ||
10 | |||
11 | There is a script cxacru-cf.py to convert an existing file to the sysfs form. | ||
12 | |||
7 | Detected devices will appear as ATM devices named "cxacru". In /sys/class/atm/ | 13 | Detected devices will appear as ATM devices named "cxacru". In /sys/class/atm/ |
8 | these are directories named cxacruN where N is the device number. A symlink | 14 | these are directories named cxacruN where N is the device number. A symlink |
9 | named device points to the USB interface device's directory which contains | 15 | named device points to the USB interface device's directory which contains |
@@ -15,6 +21,15 @@ several sysfs attribute files for retrieving device statistics: | |||
15 | * adsl_headend_environment | 21 | * adsl_headend_environment |
16 | Information about the remote headend. | 22 | Information about the remote headend. |
17 | 23 | ||
24 | * adsl_config | ||
25 | Configuration writing interface. | ||
26 | Write parameters in hexadecimal format <index>=<value>, | ||
27 | separated by whitespace, e.g.: | ||
28 | "1=0 a=5" | ||
29 | Up to 7 parameters at a time will be sent and the modem will restart | ||
30 | the ADSL connection when any value is set. These are logged for future | ||
31 | reference. | ||
32 | |||
18 | * downstream_attenuation (dB) | 33 | * downstream_attenuation (dB) |
19 | * downstream_bits_per_frame | 34 | * downstream_bits_per_frame |
20 | * downstream_rate (kbps) | 35 | * downstream_rate (kbps) |
@@ -61,6 +76,7 @@ several sysfs attribute files for retrieving device statistics: | |||
61 | * mac_address | 76 | * mac_address |
62 | 77 | ||
63 | * modulation | 78 | * modulation |
79 | "" (when not connected) | ||
64 | "ANSI T1.413" | 80 | "ANSI T1.413" |
65 | "ITU-T G.992.1 (G.DMT)" | 81 | "ITU-T G.992.1 (G.DMT)" |
66 | "ITU-T G.992.2 (G.LITE)" | 82 | "ITU-T G.992.2 (G.LITE)" |
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index b132e4a3cf0f..a62fdf7a6bff 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -58,8 +58,10 @@ DCCP_SOCKOPT_GET_CUR_MPS is read-only and retrieves the current maximum packet | |||
58 | size (application payload size) in bytes, see RFC 4340, section 14. | 58 | size (application payload size) in bytes, see RFC 4340, section 14. |
59 | 59 | ||
60 | DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs | 60 | DCCP_SOCKOPT_AVAILABLE_CCIDS is also read-only and returns the list of CCIDs |
61 | supported by the endpoint (see include/linux/dccp.h for symbolic constants). | 61 | supported by the endpoint. The option value is an array of type uint8_t whose |
62 | The caller needs to provide a sufficiently large (> 2) array of type uint8_t. | 62 | size is passed as option length. The minimum array size is 4 elements, the |
63 | value returned in the optlen argument always reflects the true number of | ||
64 | built-in CCIDs. | ||
63 | 65 | ||
64 | DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same | 66 | DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same |
65 | time, combining the operation of the next two socket options. This option is | 67 | time, combining the operation of the next two socket options. This option is |
diff --git a/Documentation/networking/decnet.txt b/Documentation/networking/decnet.txt index d8968958d839..e12a4900cf72 100644 --- a/Documentation/networking/decnet.txt +++ b/Documentation/networking/decnet.txt | |||
@@ -4,7 +4,7 @@ | |||
4 | 1) Other documentation.... | 4 | 1) Other documentation.... |
5 | 5 | ||
6 | o Project Home Pages | 6 | o Project Home Pages |
7 | http://www.chygwyn.com/DECnet/ - Kernel info | 7 | http://www.chygwyn.com/ - Kernel info |
8 | http://linux-decnet.sourceforge.net/ - Userland tools | 8 | http://linux-decnet.sourceforge.net/ - Userland tools |
9 | http://www.sourceforge.net/projects/linux-decnet/ - Status page | 9 | http://www.sourceforge.net/projects/linux-decnet/ - Status page |
10 | 10 | ||
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt new file mode 100644 index 000000000000..aefd1e681804 --- /dev/null +++ b/Documentation/networking/dns_resolver.txt | |||
@@ -0,0 +1,146 @@ | |||
1 | =================== | ||
2 | DNS Resolver Module | ||
3 | =================== | ||
4 | |||
5 | Contents: | ||
6 | |||
7 | - Overview. | ||
8 | - Compilation. | ||
9 | - Setting up. | ||
10 | - Usage. | ||
11 | - Mechanism. | ||
12 | - Debugging. | ||
13 | |||
14 | |||
15 | ======== | ||
16 | OVERVIEW | ||
17 | ======== | ||
18 | |||
19 | The DNS resolver module provides a way for kernel services to make DNS queries | ||
20 | by way of requesting a key of key type dns_resolver. These queries are | ||
21 | upcalled to userspace through /sbin/request-key. | ||
22 | |||
23 | These routines must be supported by userspace tools dns.upcall, cifs.upcall and | ||
24 | request-key. It is under development and does not yet provide the full feature | ||
25 | set. The features it does support include: | ||
26 | |||
27 | (*) Implements the dns_resolver key_type to contact userspace. | ||
28 | |||
29 | It does not yet support the following AFS features: | ||
30 | |||
31 | (*) Dns query support for AFSDB resource record. | ||
32 | |||
33 | This code is extracted from the CIFS filesystem. | ||
34 | |||
35 | |||
36 | =========== | ||
37 | COMPILATION | ||
38 | =========== | ||
39 | |||
40 | The module should be enabled by turning on the kernel configuration options: | ||
41 | |||
42 | CONFIG_DNS_RESOLVER - tristate "DNS Resolver support" | ||
43 | |||
44 | |||
45 | ========== | ||
46 | SETTING UP | ||
47 | ========== | ||
48 | |||
49 | To set up this facility, the /etc/request-key.conf file must be altered so that | ||
50 | /sbin/request-key can appropriately direct the upcalls. For example, to handle | ||
51 | basic dname to IPv4/IPv6 address resolution, the following line should be | ||
52 | added: | ||
53 | |||
54 | #OP TYPE DESC CO-INFO PROGRAM ARG1 ARG2 ARG3 ... | ||
55 | #====== ============ ======= ======= ========================== | ||
56 | create dns_resolver * * /usr/sbin/cifs.upcall %k | ||
57 | |||
58 | To direct a query for query type 'foo', a line of the following should be added | ||
59 | before the more general line given above as the first match is the one taken. | ||
60 | |||
61 | create dns_resolver foo:* * /usr/sbin/dns.foo %k | ||
62 | |||
63 | |||
64 | |||
65 | ===== | ||
66 | USAGE | ||
67 | ===== | ||
68 | |||
69 | To make use of this facility, one of the following functions that are | ||
70 | implemented in the module can be called after doing: | ||
71 | |||
72 | #include <linux/dns_resolver.h> | ||
73 | |||
74 | (1) int dns_query(const char *type, const char *name, size_t namelen, | ||
75 | const char *options, char **_result, time_t *_expiry); | ||
76 | |||
77 | This is the basic access function. It looks for a cached DNS query and if | ||
78 | it doesn't find it, it upcalls to userspace to make a new DNS query, which | ||
79 | may then be cached. The key description is constructed as a string of the | ||
80 | form: | ||
81 | |||
82 | [<type>:]<name> | ||
83 | |||
84 | where <type> optionally specifies the particular upcall program to invoke, | ||
85 | and thus the type of query to do, and <name> specifies the string to be | ||
86 | looked up. The default query type is a straight hostname to IP address | ||
87 | set lookup. | ||
88 | |||
89 | The name parameter is not required to be a NUL-terminated string, and its | ||
90 | length should be given by the namelen argument. | ||
91 | |||
92 | The options parameter may be NULL or it may be a set of options | ||
93 | appropriate to the query type. | ||
94 | |||
95 | The return value is a string appropriate to the query type. For instance, | ||
96 | for the default query type it is just a list of comma-separated IPv4 and | ||
97 | IPv6 addresses. The caller must free the result. | ||
98 | |||
99 | The length of the result string is returned on success, and a negative | ||
100 | error code is returned otherwise. -EKEYREJECTED will be returned if the | ||
101 | DNS lookup failed. | ||
102 | |||
103 | If _expiry is non-NULL, the expiry time (TTL) of the result will be | ||
104 | returned also. | ||
105 | |||
106 | |||
107 | ========= | ||
108 | MECHANISM | ||
109 | ========= | ||
110 | |||
111 | The dnsresolver module registers a key type called "dns_resolver". Keys of | ||
112 | this type are used to transport and cache DNS lookup results from userspace. | ||
113 | |||
114 | When dns_query() is invoked, it calls request_key() to search the local | ||
115 | keyrings for a cached DNS result. If that fails to find one, it upcalls to | ||
116 | userspace to get a new result. | ||
117 | |||
118 | Upcalls to userspace are made through the request_key() upcall vector, and are | ||
119 | directed by means of configuration lines in /etc/request-key.conf that tell | ||
120 | /sbin/request-key what program to run to instantiate the key. | ||
121 | |||
122 | The upcall handler program is responsible for querying the DNS, processing the | ||
123 | result into a form suitable for passing to the keyctl_instantiate_key() | ||
124 | routine. This then passes the data to dns_resolver_instantiate() which strips | ||
125 | off and processes any options included in the data, and then attaches the | ||
126 | remainder of the string to the key as its payload. | ||
127 | |||
128 | The upcall handler program should set the expiry time on the key to that of the | ||
129 | lowest TTL of all the records it has extracted a result from. This means that | ||
130 | the key will be discarded and recreated when the data it holds has expired. | ||
131 | |||
132 | dns_query() returns a copy of the value attached to the key, or an error if | ||
133 | that is indicated instead. | ||
134 | |||
135 | See <file:Documentation/keys-request-key.txt> for further information about | ||
136 | request-key function. | ||
137 | |||
138 | |||
139 | ========= | ||
140 | DEBUGGING | ||
141 | ========= | ||
142 | |||
143 | Debugging messages can be turned on dynamically by writing a 1 into the | ||
144 | following file: | ||
145 | |||
146 | /sys/module/dnsresolver/parameters/debug | ||
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt index 2df71861e578..d9271e74e488 100644 --- a/Documentation/networking/e1000.txt +++ b/Documentation/networking/e1000.txt | |||
@@ -1,82 +1,35 @@ | |||
1 | Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters | 1 | Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters |
2 | =============================================================== | 2 | =============================================================== |
3 | 3 | ||
4 | September 26, 2006 | 4 | Intel Gigabit Linux driver. |
5 | 5 | Copyright(c) 1999 - 2010 Intel Corporation. | |
6 | 6 | ||
7 | Contents | 7 | Contents |
8 | ======== | 8 | ======== |
9 | 9 | ||
10 | - In This Release | ||
11 | - Identifying Your Adapter | 10 | - Identifying Your Adapter |
12 | - Building and Installation | ||
13 | - Command Line Parameters | 11 | - Command Line Parameters |
14 | - Speed and Duplex Configuration | 12 | - Speed and Duplex Configuration |
15 | - Additional Configurations | 13 | - Additional Configurations |
16 | - Known Issues | ||
17 | - Support | 14 | - Support |
18 | 15 | ||
19 | |||
20 | In This Release | ||
21 | =============== | ||
22 | |||
23 | This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family | ||
24 | of Adapters. This driver includes support for Itanium(R)2-based systems. | ||
25 | |||
26 | For questions related to hardware requirements, refer to the documentation | ||
27 | supplied with your Intel PRO/1000 adapter. All hardware requirements listed | ||
28 | apply to use with Linux. | ||
29 | |||
30 | The following features are now available in supported kernels: | ||
31 | - Native VLANs | ||
32 | - Channel Bonding (teaming) | ||
33 | - SNMP | ||
34 | |||
35 | Channel Bonding documentation can be found in the Linux kernel source: | ||
36 | /Documentation/networking/bonding.txt | ||
37 | |||
38 | The driver information previously displayed in the /proc filesystem is not | ||
39 | supported in this release. Alternatively, you can use ethtool (version 1.6 | ||
40 | or later), lspci, and ifconfig to obtain the same information. | ||
41 | |||
42 | Instructions on updating ethtool can be found in the section "Additional | ||
43 | Configurations" later in this document. | ||
44 | |||
45 | NOTE: The Intel(R) 82562v 10/100 Network Connection only provides 10/100 | ||
46 | support. | ||
47 | |||
48 | |||
49 | Identifying Your Adapter | 16 | Identifying Your Adapter |
50 | ======================== | 17 | ======================== |
51 | 18 | ||
52 | For more information on how to identify your adapter, go to the Adapter & | 19 | For more information on how to identify your adapter, go to the Adapter & |
53 | Driver ID Guide at: | 20 | Driver ID Guide at: |
54 | 21 | ||
55 | http://support.intel.com/support/network/adapter/pro100/21397.htm | 22 | http://support.intel.com/support/go/network/adapter/idguide.htm |
56 | 23 | ||
57 | For the latest Intel network drivers for Linux, refer to the following | 24 | For the latest Intel network drivers for Linux, refer to the following |
58 | website. In the search field, enter your adapter name or type, or use the | 25 | website. In the search field, enter your adapter name or type, or use the |
59 | networking link on the left to search for your adapter: | 26 | networking link on the left to search for your adapter: |
60 | 27 | ||
61 | http://downloadfinder.intel.com/scripts-df/support_intel.asp | 28 | http://support.intel.com/support/go/network/adapter/home.htm |
62 | |||
63 | 29 | ||
64 | Command Line Parameters | 30 | Command Line Parameters |
65 | ======================= | 31 | ======================= |
66 | 32 | ||
67 | If the driver is built as a module, the following optional parameters | ||
68 | are used by entering them on the command line with the modprobe command | ||
69 | using this syntax: | ||
70 | |||
71 | modprobe e1000 [<option>=<VAL1>,<VAL2>,...] | ||
72 | |||
73 | For example, with two PRO/1000 PCI adapters, entering: | ||
74 | |||
75 | modprobe e1000 TxDescriptors=80,128 | ||
76 | |||
77 | loads the e1000 driver with 80 TX descriptors for the first adapter and | ||
78 | 128 TX descriptors for the second adapter. | ||
79 | |||
80 | The default value for each parameter is generally the recommended setting, | 33 | The default value for each parameter is generally the recommended setting, |
81 | unless otherwise noted. | 34 | unless otherwise noted. |
82 | 35 | ||
@@ -89,10 +42,6 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed | |||
89 | parameters, see the application note at: | 42 | parameters, see the application note at: |
90 | http://www.intel.com/design/network/applnots/ap450.htm | 43 | http://www.intel.com/design/network/applnots/ap450.htm |
91 | 44 | ||
92 | A descriptor describes a data buffer and attributes related to | ||
93 | the data buffer. This information is accessed by the hardware. | ||
94 | |||
95 | |||
96 | AutoNeg | 45 | AutoNeg |
97 | ------- | 46 | ------- |
98 | (Supported only on adapters with copper connections) | 47 | (Supported only on adapters with copper connections) |
@@ -106,7 +55,6 @@ Duplex parameters must not be specified. | |||
106 | NOTE: Refer to the Speed and Duplex section of this readme for more | 55 | NOTE: Refer to the Speed and Duplex section of this readme for more |
107 | information on the AutoNeg parameter. | 56 | information on the AutoNeg parameter. |
108 | 57 | ||
109 | |||
110 | Duplex | 58 | Duplex |
111 | ------ | 59 | ------ |
112 | (Supported only on adapters with copper connections) | 60 | (Supported only on adapters with copper connections) |
@@ -119,7 +67,6 @@ set to auto-negotiate, the board auto-detects the correct duplex. If the | |||
119 | link partner is forced (either full or half), Duplex defaults to half- | 67 | link partner is forced (either full or half), Duplex defaults to half- |
120 | duplex. | 68 | duplex. |
121 | 69 | ||
122 | |||
123 | FlowControl | 70 | FlowControl |
124 | ----------- | 71 | ----------- |
125 | Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) | 72 | Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) |
@@ -128,16 +75,16 @@ Default Value: Reads flow control settings from the EEPROM | |||
128 | This parameter controls the automatic generation(Tx) and response(Rx) | 75 | This parameter controls the automatic generation(Tx) and response(Rx) |
129 | to Ethernet PAUSE frames. | 76 | to Ethernet PAUSE frames. |
130 | 77 | ||
131 | |||
132 | InterruptThrottleRate | 78 | InterruptThrottleRate |
133 | --------------------- | 79 | --------------------- |
134 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) | 80 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) |
135 | Valid Range: 0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative) | 81 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, |
82 | 4=simplified balancing) | ||
136 | Default Value: 3 | 83 | Default Value: 3 |
137 | 84 | ||
138 | The driver can limit the amount of interrupts per second that the adapter | 85 | The driver can limit the amount of interrupts per second that the adapter |
139 | will generate for incoming packets. It does this by writing a value to the | 86 | will generate for incoming packets. It does this by writing a value to the |
140 | adapter that is based on the maximum amount of interrupts that the adapter | 87 | adapter that is based on the maximum amount of interrupts that the adapter |
141 | will generate per second. | 88 | will generate per second. |
142 | 89 | ||
143 | Setting InterruptThrottleRate to a value greater or equal to 100 | 90 | Setting InterruptThrottleRate to a value greater or equal to 100 |
@@ -146,37 +93,43 @@ per second, even if more packets have come in. This reduces interrupt | |||
146 | load on the system and can lower CPU utilization under heavy load, | 93 | load on the system and can lower CPU utilization under heavy load, |
147 | but will increase latency as packets are not processed as quickly. | 94 | but will increase latency as packets are not processed as quickly. |
148 | 95 | ||
149 | The default behaviour of the driver previously assumed a static | 96 | The default behaviour of the driver previously assumed a static |
150 | InterruptThrottleRate value of 8000, providing a good fallback value for | 97 | InterruptThrottleRate value of 8000, providing a good fallback value for |
151 | all traffic types,but lacking in small packet performance and latency. | 98 | all traffic types,but lacking in small packet performance and latency. |
152 | The hardware can handle many more small packets per second however, and | 99 | The hardware can handle many more small packets per second however, and |
153 | for this reason an adaptive interrupt moderation algorithm was implemented. | 100 | for this reason an adaptive interrupt moderation algorithm was implemented. |
154 | 101 | ||
155 | Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which | 102 | Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which |
156 | it dynamically adjusts the InterruptThrottleRate value based on the traffic | 103 | it dynamically adjusts the InterruptThrottleRate value based on the traffic |
157 | that it receives. After determining the type of incoming traffic in the last | 104 | that it receives. After determining the type of incoming traffic in the last |
158 | timeframe, it will adjust the InterruptThrottleRate to an appropriate value | 105 | timeframe, it will adjust the InterruptThrottleRate to an appropriate value |
159 | for that traffic. | 106 | for that traffic. |
160 | 107 | ||
161 | The algorithm classifies the incoming traffic every interval into | 108 | The algorithm classifies the incoming traffic every interval into |
162 | classes. Once the class is determined, the InterruptThrottleRate value is | 109 | classes. Once the class is determined, the InterruptThrottleRate value is |
163 | adjusted to suit that traffic type the best. There are three classes defined: | 110 | adjusted to suit that traffic type the best. There are three classes defined: |
164 | "Bulk traffic", for large amounts of packets of normal size; "Low latency", | 111 | "Bulk traffic", for large amounts of packets of normal size; "Low latency", |
165 | for small amounts of traffic and/or a significant percentage of small | 112 | for small amounts of traffic and/or a significant percentage of small |
166 | packets; and "Lowest latency", for almost completely small packets or | 113 | packets; and "Lowest latency", for almost completely small packets or |
167 | minimal traffic. | 114 | minimal traffic. |
168 | 115 | ||
169 | In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 | 116 | In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 |
170 | for traffic that falls in class "Bulk traffic". If traffic falls in the "Low | 117 | for traffic that falls in class "Bulk traffic". If traffic falls in the "Low |
171 | latency" or "Lowest latency" class, the InterruptThrottleRate is increased | 118 | latency" or "Lowest latency" class, the InterruptThrottleRate is increased |
172 | stepwise to 20000. This default mode is suitable for most applications. | 119 | stepwise to 20000. This default mode is suitable for most applications. |
173 | 120 | ||
174 | For situations where low latency is vital such as cluster or | 121 | For situations where low latency is vital such as cluster or |
175 | grid computing, the algorithm can reduce latency even more when | 122 | grid computing, the algorithm can reduce latency even more when |
176 | InterruptThrottleRate is set to mode 1. In this mode, which operates | 123 | InterruptThrottleRate is set to mode 1. In this mode, which operates |
177 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | 124 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to |
178 | 70000 for traffic in class "Lowest latency". | 125 | 70000 for traffic in class "Lowest latency". |
179 | 126 | ||
127 | In simplified mode the interrupt rate is based on the ratio of Tx and | ||
128 | Rx traffic. If the bytes per second rate is approximately equal, the | ||
129 | interrupt rate will drop as low as 2000 interrupts per second. If the | ||
130 | traffic is mostly transmit or mostly receive, the interrupt rate could | ||
131 | be as high as 8000. | ||
132 | |||
180 | Setting InterruptThrottleRate to 0 turns off any interrupt moderation | 133 | Setting InterruptThrottleRate to 0 turns off any interrupt moderation |
181 | and may improve small packet latency, but is generally not suitable | 134 | and may improve small packet latency, but is generally not suitable |
182 | for bulk throughput traffic. | 135 | for bulk throughput traffic. |
@@ -212,8 +165,6 @@ NOTE: When e1000 is loaded with default settings and multiple adapters | |||
212 | be platform-specific. If CPU utilization is not a concern, use | 165 | be platform-specific. If CPU utilization is not a concern, use |
213 | RX_POLLING (NAPI) and default driver settings. | 166 | RX_POLLING (NAPI) and default driver settings. |
214 | 167 | ||
215 | |||
216 | |||
217 | RxDescriptors | 168 | RxDescriptors |
218 | ------------- | 169 | ------------- |
219 | Valid Range: 80-256 for 82542 and 82543-based adapters | 170 | Valid Range: 80-256 for 82542 and 82543-based adapters |
@@ -225,15 +176,14 @@ by the driver. Increasing this value allows the driver to buffer more | |||
225 | incoming packets, at the expense of increased system memory utilization. | 176 | incoming packets, at the expense of increased system memory utilization. |
226 | 177 | ||
227 | Each descriptor is 16 bytes. A receive buffer is also allocated for each | 178 | Each descriptor is 16 bytes. A receive buffer is also allocated for each |
228 | descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending | 179 | descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending |
229 | on the MTU setting. The maximum MTU size is 16110. | 180 | on the MTU setting. The maximum MTU size is 16110. |
230 | 181 | ||
231 | NOTE: MTU designates the frame size. It only needs to be set for Jumbo | 182 | NOTE: MTU designates the frame size. It only needs to be set for Jumbo |
232 | Frames. Depending on the available system resources, the request | 183 | Frames. Depending on the available system resources, the request |
233 | for a higher number of receive descriptors may be denied. In this | 184 | for a higher number of receive descriptors may be denied. In this |
234 | case, use a lower number. | 185 | case, use a lower number. |
235 | 186 | ||
236 | |||
237 | RxIntDelay | 187 | RxIntDelay |
238 | ---------- | 188 | ---------- |
239 | Valid Range: 0-65535 (0=off) | 189 | Valid Range: 0-65535 (0=off) |
@@ -254,7 +204,6 @@ CAUTION: When setting RxIntDelay to a value other than 0, adapters may | |||
254 | restoring the network connection. To eliminate the potential | 204 | restoring the network connection. To eliminate the potential |
255 | for the hang ensure that RxIntDelay is set to 0. | 205 | for the hang ensure that RxIntDelay is set to 0. |
256 | 206 | ||
257 | |||
258 | RxAbsIntDelay | 207 | RxAbsIntDelay |
259 | ------------- | 208 | ------------- |
260 | (This parameter is supported only on 82540, 82545 and later adapters.) | 209 | (This parameter is supported only on 82540, 82545 and later adapters.) |
@@ -268,7 +217,6 @@ packet is received within the set amount of time. Proper tuning, | |||
268 | along with RxIntDelay, may improve traffic throughput in specific network | 217 | along with RxIntDelay, may improve traffic throughput in specific network |
269 | conditions. | 218 | conditions. |
270 | 219 | ||
271 | |||
272 | Speed | 220 | Speed |
273 | ----- | 221 | ----- |
274 | (This parameter is supported only on adapters with copper connections.) | 222 | (This parameter is supported only on adapters with copper connections.) |
@@ -280,7 +228,6 @@ Speed forces the line speed to the specified value in megabits per second | |||
280 | partner is set to auto-negotiate, the board will auto-detect the correct | 228 | partner is set to auto-negotiate, the board will auto-detect the correct |
281 | speed. Duplex should also be set when Speed is set to either 10 or 100. | 229 | speed. Duplex should also be set when Speed is set to either 10 or 100. |
282 | 230 | ||
283 | |||
284 | TxDescriptors | 231 | TxDescriptors |
285 | ------------- | 232 | ------------- |
286 | Valid Range: 80-256 for 82542 and 82543-based adapters | 233 | Valid Range: 80-256 for 82542 and 82543-based adapters |
@@ -295,6 +242,36 @@ NOTE: Depending on the available system resources, the request for a | |||
295 | higher number of transmit descriptors may be denied. In this case, | 242 | higher number of transmit descriptors may be denied. In this case, |
296 | use a lower number. | 243 | use a lower number. |
297 | 244 | ||
245 | TxDescriptorStep | ||
246 | ---------------- | ||
247 | Valid Range: 1 (use every Tx Descriptor) | ||
248 | 4 (use every 4th Tx Descriptor) | ||
249 | |||
250 | Default Value: 1 (use every Tx Descriptor) | ||
251 | |||
252 | On certain non-Intel architectures, it has been observed that intense TX | ||
253 | traffic bursts of short packets may result in an improper descriptor | ||
254 | writeback. If this occurs, the driver will report a "TX Timeout" and reset | ||
255 | the adapter, after which the transmit flow will restart, though data may | ||
256 | have stalled for as much as 10 seconds before it resumes. | ||
257 | |||
258 | The improper writeback does not occur on the first descriptor in a system | ||
259 | memory cache-line, which is typically 32 bytes, or 4 descriptors long. | ||
260 | |||
261 | Setting TxDescriptorStep to a value of 4 will ensure that all TX descriptors | ||
262 | are aligned to the start of a system memory cache line, and so this problem | ||
263 | will not occur. | ||
264 | |||
265 | NOTES: Setting TxDescriptorStep to 4 effectively reduces the number of | ||
266 | TxDescriptors available for transmits to 1/4 of the normal allocation. | ||
267 | This has a possible negative performance impact, which may be | ||
268 | compensated for by allocating more descriptors using the TxDescriptors | ||
269 | module parameter. | ||
270 | |||
271 | There are other conditions which may result in "TX Timeout", which will | ||
272 | not be resolved by the use of the TxDescriptorStep parameter. As the | ||
273 | issue addressed by this parameter has never been observed on Intel | ||
274 | Architecture platforms, it should not be used on Intel platforms. | ||
298 | 275 | ||
299 | TxIntDelay | 276 | TxIntDelay |
300 | ---------- | 277 | ---------- |
@@ -307,7 +284,6 @@ efficiency if properly tuned for specific network traffic. If the | |||
307 | system is reporting dropped transmits, this value may be set too high | 284 | system is reporting dropped transmits, this value may be set too high |
308 | causing the driver to run out of available transmit descriptors. | 285 | causing the driver to run out of available transmit descriptors. |
309 | 286 | ||
310 | |||
311 | TxAbsIntDelay | 287 | TxAbsIntDelay |
312 | ------------- | 288 | ------------- |
313 | (This parameter is supported only on 82540, 82545 and later adapters.) | 289 | (This parameter is supported only on 82540, 82545 and later adapters.) |
@@ -330,6 +306,35 @@ Default Value: 1 | |||
330 | A value of '1' indicates that the driver should enable IP checksum | 306 | A value of '1' indicates that the driver should enable IP checksum |
331 | offload for received packets (both UDP and TCP) to the adapter hardware. | 307 | offload for received packets (both UDP and TCP) to the adapter hardware. |
332 | 308 | ||
309 | Copybreak | ||
310 | --------- | ||
311 | Valid Range: 0-xxxxxxx (0=off) | ||
312 | Default Value: 256 | ||
313 | Usage: insmod e1000.ko copybreak=128 | ||
314 | |||
315 | Driver copies all packets below or equaling this size to a fresh Rx | ||
316 | buffer before handing it up the stack. | ||
317 | |||
318 | This parameter is different than other parameters, in that it is a | ||
319 | single (not 1,1,1 etc.) parameter applied to all driver instances and | ||
320 | it is also available during runtime at | ||
321 | /sys/module/e1000/parameters/copybreak | ||
322 | |||
323 | SmartPowerDownEnable | ||
324 | -------------------- | ||
325 | Valid Range: 0-1 | ||
326 | Default Value: 0 (disabled) | ||
327 | |||
328 | Allows PHY to turn off in lower power states. The user can turn off | ||
329 | this parameter in supported chipsets. | ||
330 | |||
331 | KumeranLockLoss | ||
332 | --------------- | ||
333 | Valid Range: 0-1 | ||
334 | Default Value: 1 (enabled) | ||
335 | |||
336 | This workaround skips resetting the PHY at shutdown for the initial | ||
337 | silicon releases of ICH8 systems. | ||
333 | 338 | ||
334 | Speed and Duplex Configuration | 339 | Speed and Duplex Configuration |
335 | ============================== | 340 | ============================== |
@@ -385,40 +390,9 @@ If the link partner is forced to a specific speed and duplex, then this | |||
385 | parameter should not be used. Instead, use the Speed and Duplex parameters | 390 | parameter should not be used. Instead, use the Speed and Duplex parameters |
386 | previously mentioned to force the adapter to the same speed and duplex. | 391 | previously mentioned to force the adapter to the same speed and duplex. |
387 | 392 | ||
388 | |||
389 | Additional Configurations | 393 | Additional Configurations |
390 | ========================= | 394 | ========================= |
391 | 395 | ||
392 | Configuring the Driver on Different Distributions | ||
393 | ------------------------------------------------- | ||
394 | Configuring a network driver to load properly when the system is started | ||
395 | is distribution dependent. Typically, the configuration process involves | ||
396 | adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well | ||
397 | as editing other system startup scripts and/or configuration files. Many | ||
398 | popular Linux distributions ship with tools to make these changes for you. | ||
399 | To learn the proper way to configure a network device for your system, | ||
400 | refer to your distribution documentation. If during this process you are | ||
401 | asked for the driver or module name, the name for the Linux Base Driver | ||
402 | for the Intel(R) PRO/1000 Family of Adapters is e1000. | ||
403 | |||
404 | As an example, if you install the e1000 driver for two PRO/1000 adapters | ||
405 | (eth0 and eth1) and set the speed and duplex to 10full and 100half, add | ||
406 | the following to modules.conf or or modprobe.conf: | ||
407 | |||
408 | alias eth0 e1000 | ||
409 | alias eth1 e1000 | ||
410 | options e1000 Speed=10,100 Duplex=2,1 | ||
411 | |||
412 | Viewing Link Messages | ||
413 | --------------------- | ||
414 | Link messages will not be displayed to the console if the distribution is | ||
415 | restricting system messages. In order to see network driver link messages | ||
416 | on your console, set dmesg to eight by entering the following: | ||
417 | |||
418 | dmesg -n 8 | ||
419 | |||
420 | NOTE: This setting is not saved across reboots. | ||
421 | |||
422 | Jumbo Frames | 396 | Jumbo Frames |
423 | ------------ | 397 | ------------ |
424 | Jumbo Frames support is enabled by changing the MTU to a value larger than | 398 | Jumbo Frames support is enabled by changing the MTU to a value larger than |
@@ -437,9 +411,11 @@ Additional Configurations | |||
437 | setting in a different location. | 411 | setting in a different location. |
438 | 412 | ||
439 | Notes: | 413 | Notes: |
440 | 414 | Degradation in throughput performance may be observed in some Jumbo frames | |
441 | - To enable Jumbo Frames, increase the MTU size on the interface beyond | 415 | environments. If this is observed, increasing the application's socket buffer |
442 | 1500. | 416 | size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values may help. |
417 | See the specific application manual and /usr/src/linux*/Documentation/ | ||
418 | networking/ip-sysctl.txt for more details. | ||
443 | 419 | ||
444 | - The maximum MTU setting for Jumbo Frames is 16110. This value coincides | 420 | - The maximum MTU setting for Jumbo Frames is 16110. This value coincides |
445 | with the maximum Jumbo Frames size of 16128. | 421 | with the maximum Jumbo Frames size of 16128. |
@@ -447,40 +423,11 @@ Additional Configurations | |||
447 | - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or | 423 | - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or |
448 | loss of link. | 424 | loss of link. |
449 | 425 | ||
450 | - Some Intel gigabit adapters that support Jumbo Frames have a frame size | ||
451 | limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes. | ||
452 | The adapters with this limitation are based on the Intel(R) 82571EB, | ||
453 | 82572EI, 82573L and 80003ES2LAN controller. These correspond to the | ||
454 | following product names: | ||
455 | Intel(R) PRO/1000 PT Server Adapter | ||
456 | Intel(R) PRO/1000 PT Desktop Adapter | ||
457 | Intel(R) PRO/1000 PT Network Connection | ||
458 | Intel(R) PRO/1000 PT Dual Port Server Adapter | ||
459 | Intel(R) PRO/1000 PT Dual Port Network Connection | ||
460 | Intel(R) PRO/1000 PF Server Adapter | ||
461 | Intel(R) PRO/1000 PF Network Connection | ||
462 | Intel(R) PRO/1000 PF Dual Port Server Adapter | ||
463 | Intel(R) PRO/1000 PB Server Connection | ||
464 | Intel(R) PRO/1000 PL Network Connection | ||
465 | Intel(R) PRO/1000 EB Network Connection with I/O Acceleration | ||
466 | Intel(R) PRO/1000 EB Backplane Connection with I/O Acceleration | ||
467 | Intel(R) PRO/1000 PT Quad Port Server Adapter | ||
468 | |||
469 | - Adapters based on the Intel(R) 82542 and 82573V/E controller do not | 426 | - Adapters based on the Intel(R) 82542 and 82573V/E controller do not |
470 | support Jumbo Frames. These correspond to the following product names: | 427 | support Jumbo Frames. These correspond to the following product names: |
471 | Intel(R) PRO/1000 Gigabit Server Adapter | 428 | Intel(R) PRO/1000 Gigabit Server Adapter |
472 | Intel(R) PRO/1000 PM Network Connection | 429 | Intel(R) PRO/1000 PM Network Connection |
473 | 430 | ||
474 | - The following adapters do not support Jumbo Frames: | ||
475 | Intel(R) 82562V 10/100 Network Connection | ||
476 | Intel(R) 82566DM Gigabit Network Connection | ||
477 | Intel(R) 82566DC Gigabit Network Connection | ||
478 | Intel(R) 82566MM Gigabit Network Connection | ||
479 | Intel(R) 82566MC Gigabit Network Connection | ||
480 | Intel(R) 82562GT 10/100 Network Connection | ||
481 | Intel(R) 82562G 10/100 Network Connection | ||
482 | |||
483 | |||
484 | Ethtool | 431 | Ethtool |
485 | ------- | 432 | ------- |
486 | The driver utilizes the ethtool interface for driver configuration and | 433 | The driver utilizes the ethtool interface for driver configuration and |
@@ -490,142 +437,14 @@ Additional Configurations | |||
490 | The latest release of ethtool can be found from | 437 | The latest release of ethtool can be found from |
491 | http://sourceforge.net/projects/gkernel. | 438 | http://sourceforge.net/projects/gkernel. |
492 | 439 | ||
493 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | ||
494 | for a more complete ethtool feature set can be enabled by upgrading | ||
495 | ethtool to ethtool-1.8.1. | ||
496 | |||
497 | Enabling Wake on LAN* (WoL) | 440 | Enabling Wake on LAN* (WoL) |
498 | --------------------------- | 441 | --------------------------- |
499 | WoL is configured through the Ethtool* utility. Ethtool is included with | 442 | WoL is configured through the Ethtool* utility. |
500 | all versions of Red Hat after Red Hat 7.2. For other Linux distributions, | ||
501 | download and install Ethtool from the following website: | ||
502 | http://sourceforge.net/projects/gkernel. | ||
503 | |||
504 | For instructions on enabling WoL with Ethtool, refer to the website listed | ||
505 | above. | ||
506 | 443 | ||
507 | WoL will be enabled on the system during the next shut down or reboot. | 444 | WoL will be enabled on the system during the next shut down or reboot. |
508 | For this driver version, in order to enable WoL, the e1000 driver must be | 445 | For this driver version, in order to enable WoL, the e1000 driver must be |
509 | loaded when shutting down or rebooting the system. | 446 | loaded when shutting down or rebooting the system. |
510 | 447 | ||
511 | Wake On LAN is only supported on port A for the following devices: | ||
512 | Intel(R) PRO/1000 PT Dual Port Network Connection | ||
513 | Intel(R) PRO/1000 PT Dual Port Server Connection | ||
514 | Intel(R) PRO/1000 PT Dual Port Server Adapter | ||
515 | Intel(R) PRO/1000 PF Dual Port Server Adapter | ||
516 | Intel(R) PRO/1000 PT Quad Port Server Adapter | ||
517 | |||
518 | NAPI | ||
519 | ---- | ||
520 | NAPI (Rx polling mode) is enabled in the e1000 driver. | ||
521 | |||
522 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | ||
523 | |||
524 | |||
525 | Known Issues | ||
526 | ============ | ||
527 | |||
528 | Dropped Receive Packets on Half-duplex 10/100 Networks | ||
529 | ------------------------------------------------------ | ||
530 | If you have an Intel PCI Express adapter running at 10mbps or 100mbps, half- | ||
531 | duplex, you may observe occasional dropped receive packets. There are no | ||
532 | workarounds for this problem in this network configuration. The network must | ||
533 | be updated to operate in full-duplex, and/or 1000mbps only. | ||
534 | |||
535 | Jumbo Frames System Requirement | ||
536 | ------------------------------- | ||
537 | Memory allocation failures have been observed on Linux systems with 64 MB | ||
538 | of RAM or less that are running Jumbo Frames. If you are using Jumbo | ||
539 | Frames, your system may require more than the advertised minimum | ||
540 | requirement of 64 MB of system memory. | ||
541 | |||
542 | Performance Degradation with Jumbo Frames | ||
543 | ----------------------------------------- | ||
544 | Degradation in throughput performance may be observed in some Jumbo frames | ||
545 | environments. If this is observed, increasing the application's socket | ||
546 | buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values | ||
547 | may help. See the specific application manual and | ||
548 | /usr/src/linux*/Documentation/ | ||
549 | networking/ip-sysctl.txt for more details. | ||
550 | |||
551 | Jumbo Frames on Foundry BigIron 8000 switch | ||
552 | ------------------------------------------- | ||
553 | There is a known issue using Jumbo frames when connected to a Foundry | ||
554 | BigIron 8000 switch. This is a 3rd party limitation. If you experience | ||
555 | loss of packets, lower the MTU size. | ||
556 | |||
557 | Allocating Rx Buffers when Using Jumbo Frames | ||
558 | --------------------------------------------- | ||
559 | Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if | ||
560 | the available memory is heavily fragmented. This issue may be seen with PCI-X | ||
561 | adapters or with packet split disabled. This can be reduced or eliminated | ||
562 | by changing the amount of available memory for receive buffer allocation, by | ||
563 | increasing /proc/sys/vm/min_free_kbytes. | ||
564 | |||
565 | Multiple Interfaces on Same Ethernet Broadcast Network | ||
566 | ------------------------------------------------------ | ||
567 | Due to the default ARP behavior on Linux, it is not possible to have | ||
568 | one system on two IP networks in the same Ethernet broadcast domain | ||
569 | (non-partitioned switch) behave as expected. All Ethernet interfaces | ||
570 | will respond to IP traffic for any IP address assigned to the system. | ||
571 | This results in unbalanced receive traffic. | ||
572 | |||
573 | If you have multiple interfaces in a server, either turn on ARP | ||
574 | filtering by entering: | ||
575 | |||
576 | echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter | ||
577 | (this only works if your kernel's version is higher than 2.4.5), | ||
578 | |||
579 | NOTE: This setting is not saved across reboots. The configuration | ||
580 | change can be made permanent by adding the line: | ||
581 | net.ipv4.conf.all.arp_filter = 1 | ||
582 | to the file /etc/sysctl.conf | ||
583 | |||
584 | or, | ||
585 | |||
586 | install the interfaces in separate broadcast domains (either in | ||
587 | different switches or in a switch partitioned to VLANs). | ||
588 | |||
589 | 82541/82547 can't link or are slow to link with some link partners | ||
590 | ----------------------------------------------------------------- | ||
591 | There is a known compatibility issue with 82541/82547 and some | ||
592 | low-end switches where the link will not be established, or will | ||
593 | be slow to establish. In particular, these switches are known to | ||
594 | be incompatible with 82541/82547: | ||
595 | |||
596 | Planex FXG-08TE | ||
597 | I-O Data ETG-SH8 | ||
598 | |||
599 | To workaround this issue, the driver can be compiled with an override | ||
600 | of the PHY's master/slave setting. Forcing master or forcing slave | ||
601 | mode will improve time-to-link. | ||
602 | |||
603 | # make CFLAGS_EXTRA=-DE1000_MASTER_SLAVE=<n> | ||
604 | |||
605 | Where <n> is: | ||
606 | |||
607 | 0 = Hardware default | ||
608 | 1 = Master mode | ||
609 | 2 = Slave mode | ||
610 | 3 = Auto master/slave | ||
611 | |||
612 | Disable rx flow control with ethtool | ||
613 | ------------------------------------ | ||
614 | In order to disable receive flow control using ethtool, you must turn | ||
615 | off auto-negotiation on the same command line. | ||
616 | |||
617 | For example: | ||
618 | |||
619 | ethtool -A eth? autoneg off rx off | ||
620 | |||
621 | Unplugging network cable while ethtool -p is running | ||
622 | ---------------------------------------------------- | ||
623 | In kernel versions 2.5.50 and later (including 2.6 kernel), unplugging | ||
624 | the network cable while ethtool -p is running will cause the system to | ||
625 | become unresponsive to keyboard commands, except for control-alt-delete. | ||
626 | Restarting the system appears to be the only remedy. | ||
627 | |||
628 | |||
629 | Support | 448 | Support |
630 | ======= | 449 | ======= |
631 | 450 | ||
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt new file mode 100644 index 000000000000..6aa048badf32 --- /dev/null +++ b/Documentation/networking/e1000e.txt | |||
@@ -0,0 +1,302 @@ | |||
1 | Linux* Driver for Intel(R) Network Connection | ||
2 | =============================================================== | ||
3 | |||
4 | Intel Gigabit Linux driver. | ||
5 | Copyright(c) 1999 - 2010 Intel Corporation. | ||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - Identifying Your Adapter | ||
11 | - Command Line Parameters | ||
12 | - Additional Configurations | ||
13 | - Support | ||
14 | |||
15 | Identifying Your Adapter | ||
16 | ======================== | ||
17 | |||
18 | The e1000e driver supports all PCI Express Intel(R) Gigabit Network | ||
19 | Connections, except those that are 82575, 82576 and 82580-based*. | ||
20 | |||
21 | * NOTE: The Intel(R) PRO/1000 P Dual Port Server Adapter is supported by | ||
22 | the e1000 driver, not the e1000e driver due to the 82546 part being used | ||
23 | behind a PCI Express bridge. | ||
24 | |||
25 | For more information on how to identify your adapter, go to the Adapter & | ||
26 | Driver ID Guide at: | ||
27 | |||
28 | http://support.intel.com/support/go/network/adapter/idguide.htm | ||
29 | |||
30 | For the latest Intel network drivers for Linux, refer to the following | ||
31 | website. In the search field, enter your adapter name or type, or use the | ||
32 | networking link on the left to search for your adapter: | ||
33 | |||
34 | http://support.intel.com/support/go/network/adapter/home.htm | ||
35 | |||
36 | Command Line Parameters | ||
37 | ======================= | ||
38 | |||
39 | The default value for each parameter is generally the recommended setting, | ||
40 | unless otherwise noted. | ||
41 | |||
42 | NOTES: For more information about the InterruptThrottleRate, | ||
43 | RxIntDelay, TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay | ||
44 | parameters, see the application note at: | ||
45 | http://www.intel.com/design/network/applnots/ap450.htm | ||
46 | |||
47 | InterruptThrottleRate | ||
48 | --------------------- | ||
49 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, | ||
50 | 4=simplified balancing) | ||
51 | Default Value: 3 | ||
52 | |||
53 | The driver can limit the amount of interrupts per second that the adapter | ||
54 | will generate for incoming packets. It does this by writing a value to the | ||
55 | adapter that is based on the maximum amount of interrupts that the adapter | ||
56 | will generate per second. | ||
57 | |||
58 | Setting InterruptThrottleRate to a value greater or equal to 100 | ||
59 | will program the adapter to send out a maximum of that many interrupts | ||
60 | per second, even if more packets have come in. This reduces interrupt | ||
61 | load on the system and can lower CPU utilization under heavy load, | ||
62 | but will increase latency as packets are not processed as quickly. | ||
63 | |||
64 | The driver has two adaptive modes (setting 1 or 3) in which | ||
65 | it dynamically adjusts the InterruptThrottleRate value based on the traffic | ||
66 | that it receives. After determining the type of incoming traffic in the last | ||
67 | timeframe, it will adjust the InterruptThrottleRate to an appropriate value | ||
68 | for that traffic. | ||
69 | |||
70 | The algorithm classifies the incoming traffic every interval into | ||
71 | classes. Once the class is determined, the InterruptThrottleRate value is | ||
72 | adjusted to suit that traffic type the best. There are three classes defined: | ||
73 | "Bulk traffic", for large amounts of packets of normal size; "Low latency", | ||
74 | for small amounts of traffic and/or a significant percentage of small | ||
75 | packets; and "Lowest latency", for almost completely small packets or | ||
76 | minimal traffic. | ||
77 | |||
78 | In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 | ||
79 | for traffic that falls in class "Bulk traffic". If traffic falls in the "Low | ||
80 | latency" or "Lowest latency" class, the InterruptThrottleRate is increased | ||
81 | stepwise to 20000. This default mode is suitable for most applications. | ||
82 | |||
83 | For situations where low latency is vital such as cluster or | ||
84 | grid computing, the algorithm can reduce latency even more when | ||
85 | InterruptThrottleRate is set to mode 1. In this mode, which operates | ||
86 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | ||
87 | 70000 for traffic in class "Lowest latency". | ||
88 | |||
89 | In simplified mode the interrupt rate is based on the ratio of Tx and | ||
90 | Rx traffic. If the bytes per second rate is approximately equal the | ||
91 | interrupt rate will drop as low as 2000 interrupts per second. If the | ||
92 | traffic is mostly transmit or mostly receive, the interrupt rate could | ||
93 | be as high as 8000. | ||
94 | |||
95 | Setting InterruptThrottleRate to 0 turns off any interrupt moderation | ||
96 | and may improve small packet latency, but is generally not suitable | ||
97 | for bulk throughput traffic. | ||
98 | |||
99 | NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and | ||
100 | RxAbsIntDelay parameters. In other words, minimizing the receive | ||
101 | and/or transmit absolute delays does not force the controller to | ||
102 | generate more interrupts than what the Interrupt Throttle Rate | ||
103 | allows. | ||
104 | |||
105 | NOTE: When e1000e is loaded with default settings and multiple adapters | ||
106 | are in use simultaneously, the CPU utilization may increase non- | ||
107 | linearly. In order to limit the CPU utilization without impacting | ||
108 | the overall throughput, we recommend that you load the driver as | ||
109 | follows: | ||
110 | |||
111 | modprobe e1000e InterruptThrottleRate=3000,3000,3000 | ||
112 | |||
113 | This sets the InterruptThrottleRate to 3000 interrupts/sec for | ||
114 | the first, second, and third instances of the driver. The range | ||
115 | of 2000 to 3000 interrupts per second works on a majority of | ||
116 | systems and is a good starting point, but the optimal value will | ||
117 | be platform-specific. If CPU utilization is not a concern, use | ||
118 | RX_POLLING (NAPI) and default driver settings. | ||
119 | |||
120 | RxIntDelay | ||
121 | ---------- | ||
122 | Valid Range: 0-65535 (0=off) | ||
123 | Default Value: 0 | ||
124 | |||
125 | This value delays the generation of receive interrupts in units of 1.024 | ||
126 | microseconds. Receive interrupt reduction can improve CPU efficiency if | ||
127 | properly tuned for specific network traffic. Increasing this value adds | ||
128 | extra latency to frame reception and can end up decreasing the throughput | ||
129 | of TCP traffic. If the system is reporting dropped receives, this value | ||
130 | may be set too high, causing the driver to run out of available receive | ||
131 | descriptors. | ||
132 | |||
133 | CAUTION: When setting RxIntDelay to a value other than 0, adapters may | ||
134 | hang (stop transmitting) under certain network conditions. If | ||
135 | this occurs a NETDEV WATCHDOG message is logged in the system | ||
136 | event log. In addition, the controller is automatically reset, | ||
137 | restoring the network connection. To eliminate the potential | ||
138 | for the hang ensure that RxIntDelay is set to 0. | ||
139 | |||
140 | RxAbsIntDelay | ||
141 | ------------- | ||
142 | Valid Range: 0-65535 (0=off) | ||
143 | Default Value: 8 | ||
144 | |||
145 | This value, in units of 1.024 microseconds, limits the delay in which a | ||
146 | receive interrupt is generated. Useful only if RxIntDelay is non-zero, | ||
147 | this value ensures that an interrupt is generated after the initial | ||
148 | packet is received within the set amount of time. Proper tuning, | ||
149 | along with RxIntDelay, may improve traffic throughput in specific network | ||
150 | conditions. | ||
151 | |||
152 | TxIntDelay | ||
153 | ---------- | ||
154 | Valid Range: 0-65535 (0=off) | ||
155 | Default Value: 8 | ||
156 | |||
157 | This value delays the generation of transmit interrupts in units of | ||
158 | 1.024 microseconds. Transmit interrupt reduction can improve CPU | ||
159 | efficiency if properly tuned for specific network traffic. If the | ||
160 | system is reporting dropped transmits, this value may be set too high | ||
161 | causing the driver to run out of available transmit descriptors. | ||
162 | |||
163 | TxAbsIntDelay | ||
164 | ------------- | ||
165 | Valid Range: 0-65535 (0=off) | ||
166 | Default Value: 32 | ||
167 | |||
168 | This value, in units of 1.024 microseconds, limits the delay in which a | ||
169 | transmit interrupt is generated. Useful only if TxIntDelay is non-zero, | ||
170 | this value ensures that an interrupt is generated after the initial | ||
171 | packet is sent on the wire within the set amount of time. Proper tuning, | ||
172 | along with TxIntDelay, may improve traffic throughput in specific | ||
173 | network conditions. | ||
174 | |||
175 | Copybreak | ||
176 | --------- | ||
177 | Valid Range: 0-xxxxxxx (0=off) | ||
178 | Default Value: 256 | ||
179 | |||
180 | Driver copies all packets below or equaling this size to a fresh Rx | ||
181 | buffer before handing it up the stack. | ||
182 | |||
183 | This parameter is different than other parameters, in that it is a | ||
184 | single (not 1,1,1 etc.) parameter applied to all driver instances and | ||
185 | it is also available during runtime at | ||
186 | /sys/module/e1000e/parameters/copybreak | ||
187 | |||
188 | SmartPowerDownEnable | ||
189 | -------------------- | ||
190 | Valid Range: 0-1 | ||
191 | Default Value: 0 (disabled) | ||
192 | |||
193 | Allows PHY to turn off in lower power states. The user can set this parameter | ||
194 | in supported chipsets. | ||
195 | |||
196 | KumeranLockLoss | ||
197 | --------------- | ||
198 | Valid Range: 0-1 | ||
199 | Default Value: 1 (enabled) | ||
200 | |||
201 | This workaround skips resetting the PHY at shutdown for the initial | ||
202 | silicon releases of ICH8 systems. | ||
203 | |||
204 | IntMode | ||
205 | ------- | ||
206 | Valid Range: 0-2 (0=legacy, 1=MSI, 2=MSI-X) | ||
207 | Default Value: 2 | ||
208 | |||
209 | Allows changing the interrupt mode at module load time, without requiring a | ||
210 | recompile. If the driver load fails to enable a specific interrupt mode, the | ||
211 | driver will try other interrupt modes, from least to most compatible. The | ||
212 | interrupt order is MSI-X, MSI, Legacy. If specifying MSI (IntMode=1) | ||
213 | interrupts, only MSI and Legacy will be attempted. | ||
214 | |||
215 | CrcStripping | ||
216 | ------------ | ||
217 | Valid Range: 0-1 | ||
218 | Default Value: 1 (enabled) | ||
219 | |||
220 | Strip the CRC from received packets before sending up the network stack. If | ||
221 | you have a machine with a BMC enabled but cannot receive IPMI traffic after | ||
222 | loading or enabling the driver, try disabling this feature. | ||
223 | |||
224 | WriteProtectNVM | ||
225 | --------------- | ||
226 | Valid Range: 0-1 | ||
227 | Default Value: 1 (enabled) | ||
228 | |||
229 | Set the hardware to ignore all write/erase cycles to the GbE region in the | ||
230 | ICHx NVM (non-volatile memory). This feature can be disabled by the | ||
231 | WriteProtectNVM module parameter (enabled by default) only after a hardware | ||
232 | reset, but the machine must be power cycled before trying to enable writes. | ||
233 | |||
234 | Note: the kernel boot option iomem=relaxed may need to be set if the kernel | ||
235 | config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the | ||
236 | NVM from user space via ethtool. | ||
237 | |||
238 | Additional Configurations | ||
239 | ========================= | ||
240 | |||
241 | Jumbo Frames | ||
242 | ------------ | ||
243 | Jumbo Frames support is enabled by changing the MTU to a value larger than | ||
244 | the default of 1500. Use the ifconfig command to increase the MTU size. | ||
245 | For example: | ||
246 | |||
247 | ifconfig eth<x> mtu 9000 up | ||
248 | |||
249 | This setting is not saved across reboots. | ||
250 | |||
251 | Notes: | ||
252 | |||
253 | - The maximum MTU setting for Jumbo Frames is 9216. This value coincides | ||
254 | with the maximum Jumbo Frames size of 9234 bytes. | ||
255 | |||
256 | - Using Jumbo Frames at 10 or 100 Mbps is not supported and may result in | ||
257 | poor performance or loss of link. | ||
258 | |||
259 | - Some adapters limit Jumbo Frames sized packets to a maximum of | ||
260 | 4096 bytes and some adapters do not support Jumbo Frames. | ||
261 | |||
262 | |||
263 | Ethtool | ||
264 | ------- | ||
265 | The driver utilizes the ethtool interface for driver configuration and | ||
266 | diagnostics, as well as displaying statistical information. We | ||
267 | strongly recommend downloading the latest version of Ethtool at: | ||
268 | |||
269 | http://sourceforge.net/projects/gkernel. | ||
270 | |||
271 | Speed and Duplex | ||
272 | ---------------- | ||
273 | Speed and Duplex are configured through the Ethtool* utility. For | ||
274 | instructions, refer to the Ethtool man page. | ||
275 | |||
276 | Enabling Wake on LAN* (WoL) | ||
277 | --------------------------- | ||
278 | WoL is configured through the Ethtool* utility. For instructions on | ||
279 | enabling WoL with Ethtool, refer to the Ethtool man page. | ||
280 | |||
281 | WoL will be enabled on the system during the next shut down or reboot. | ||
282 | For this driver version, in order to enable WoL, the e1000e driver must be | ||
283 | loaded when shutting down or rebooting the system. | ||
284 | |||
285 | In most cases Wake On LAN is only supported on port A for multiple port | ||
286 | adapters. To verify if a port supports Wake on LAN run ethtool eth<X>. | ||
287 | |||
288 | |||
289 | Support | ||
290 | ======= | ||
291 | |||
292 | For general information, go to the Intel support website at: | ||
293 | |||
294 | www.intel.com/support/ | ||
295 | |||
296 | or the Intel Wired Networking project hosted by Sourceforge at: | ||
297 | |||
298 | http://sourceforge.net/projects/e1000 | ||
299 | |||
300 | If an issue is identified with the released source code on the supported | ||
301 | kernel with a supported adapter, email the specific information related | ||
302 | to the issue to e1000-devel@lists.sf.net | ||
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt index b1f337f0f4ca..6e0d2a9613ec 100644 --- a/Documentation/networking/fore200e.txt +++ b/Documentation/networking/fore200e.txt | |||
@@ -39,7 +39,7 @@ version. Alternative binary firmware images can be found somewhere on the | |||
39 | ForeThought CD-ROM supplied with your adapter by FORE Systems. | 39 | ForeThought CD-ROM supplied with your adapter by FORE Systems. |
40 | 40 | ||
41 | You can also get the latest firmware images from FORE Systems at | 41 | You can also get the latest firmware images from FORE Systems at |
42 | http://www.fore.com. Register TACTics Online and go to | 42 | http://en.wikipedia.org/wiki/FORE_Systems. Register TACTics Online and go to |
43 | the 'software updates' pages. The firmware binaries are part of | 43 | the 'software updates' pages. The firmware binaries are part of |
44 | the various ForeThought software distributions. | 44 | the various ForeThought software distributions. |
45 | 45 | ||
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c index 1b96ccda3836..2bac9618c345 100644 --- a/Documentation/networking/ifenslave.c +++ b/Documentation/networking/ifenslave.c | |||
@@ -756,7 +756,7 @@ static int enslave(char *master_ifname, char *slave_ifname) | |||
756 | */ | 756 | */ |
757 | if (abi_ver < 1) { | 757 | if (abi_ver < 1) { |
758 | /* For old ABI, the master needs to be | 758 | /* For old ABI, the master needs to be |
759 | * down before setting it's hwaddr | 759 | * down before setting its hwaddr |
760 | */ | 760 | */ |
761 | res = set_if_down(master_ifname, master_flags.ifr_flags); | 761 | res = set_if_down(master_ifname, master_flags.ifr_flags); |
762 | if (res) { | 762 | if (res) { |
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt new file mode 100644 index 000000000000..ab2d71831892 --- /dev/null +++ b/Documentation/networking/igb.txt | |||
@@ -0,0 +1,132 @@ | |||
1 | Linux* Base Driver for Intel(R) Network Connection | ||
2 | ================================================== | ||
3 | |||
4 | Intel Gigabit Linux driver. | ||
5 | Copyright(c) 1999 - 2010 Intel Corporation. | ||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - Identifying Your Adapter | ||
11 | - Additional Configurations | ||
12 | - Support | ||
13 | |||
14 | Identifying Your Adapter | ||
15 | ======================== | ||
16 | |||
17 | This driver supports all 82575, 82576 and 82580-based Intel (R) gigabit network | ||
18 | connections. | ||
19 | |||
20 | For specific information on how to identify your adapter, go to the Adapter & | ||
21 | Driver ID Guide at: | ||
22 | |||
23 | http://support.intel.com/support/go/network/adapter/idguide.htm | ||
24 | |||
25 | Command Line Parameters | ||
26 | ======================= | ||
27 | |||
28 | The default value for each parameter is generally the recommended setting, | ||
29 | unless otherwise noted. | ||
30 | |||
31 | max_vfs | ||
32 | ------- | ||
33 | Valid Range: 0-7 | ||
34 | Default Value: 0 | ||
35 | |||
36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to | ||
37 | max_vfs worth of virtual function. | ||
38 | |||
39 | Additional Configurations | ||
40 | ========================= | ||
41 | |||
42 | Jumbo Frames | ||
43 | ------------ | ||
44 | Jumbo Frames support is enabled by changing the MTU to a value larger than | ||
45 | the default of 1500. Use the ifconfig command to increase the MTU size. | ||
46 | For example: | ||
47 | |||
48 | ifconfig eth<x> mtu 9000 up | ||
49 | |||
50 | This setting is not saved across reboots. | ||
51 | |||
52 | Notes: | ||
53 | |||
54 | - The maximum MTU setting for Jumbo Frames is 9216. This value coincides | ||
55 | with the maximum Jumbo Frames size of 9234 bytes. | ||
56 | |||
57 | - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or | ||
58 | loss of link. | ||
59 | |||
60 | Ethtool | ||
61 | ------- | ||
62 | The driver utilizes the ethtool interface for driver configuration and | ||
63 | diagnostics, as well as displaying statistical information. | ||
64 | |||
65 | http://sourceforge.net/projects/gkernel. | ||
66 | |||
67 | Enabling Wake on LAN* (WoL) | ||
68 | --------------------------- | ||
69 | WoL is configured through the Ethtool* utility. | ||
70 | |||
71 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. | ||
72 | |||
73 | WoL will be enabled on the system during the next shut down or reboot. | ||
74 | For this driver version, in order to enable WoL, the igb driver must be | ||
75 | loaded when shutting down or rebooting the system. | ||
76 | |||
77 | Wake On LAN is only supported on port A of multi-port adapters. | ||
78 | |||
79 | Wake On LAN is not supported for the Intel(R) Gigabit VT Quad Port Server | ||
80 | Adapter. | ||
81 | |||
82 | Multiqueue | ||
83 | ---------- | ||
84 | In this mode, a separate MSI-X vector is allocated for each queue and one | ||
85 | for "other" interrupts such as link status change and errors. All | ||
86 | interrupts are throttled via interrupt moderation. Interrupt moderation | ||
87 | must be used to avoid interrupt storms while the driver is processing one | ||
88 | interrupt. The moderation value should be at least as large as the expected | ||
89 | time for the driver to process an interrupt. Multiqueue is off by default. | ||
90 | |||
91 | REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not | ||
92 | found, the system will fallback to MSI or to Legacy interrupts. | ||
93 | |||
94 | LRO | ||
95 | --- | ||
96 | Large Receive Offload (LRO) is a technique for increasing inbound throughput | ||
97 | of high-bandwidth network connections by reducing CPU overhead. It works by | ||
98 | aggregating multiple incoming packets from a single stream into a larger | ||
99 | buffer before they are passed higher up the networking stack, thus reducing | ||
100 | the number of packets that have to be processed. LRO combines multiple | ||
101 | Ethernet frames into a single receive in the stack, thereby potentially | ||
102 | decreasing CPU utilization for receives. | ||
103 | |||
104 | NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or | ||
105 | CONFIG_INET_LRO_MODULE kernel config option. Additionally, if | ||
106 | CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded | ||
107 | before the igb driver. | ||
108 | |||
109 | You can verify that the driver is using LRO by looking at these counters in | ||
110 | Ethtool: | ||
111 | |||
112 | lro_aggregated - count of total packets that were combined | ||
113 | lro_flushed - counts the number of packets flushed out of LRO | ||
114 | lro_no_desc - counts the number of times an LRO descriptor was not available | ||
115 | for the LRO packet | ||
116 | |||
117 | NOTE: IPv6 and UDP are not supported by LRO. | ||
118 | |||
119 | Support | ||
120 | ======= | ||
121 | |||
122 | For general information, go to the Intel support website at: | ||
123 | |||
124 | www.intel.com/support/ | ||
125 | |||
126 | or the Intel Wired Networking project hosted by Sourceforge at: | ||
127 | |||
128 | http://sourceforge.net/projects/e1000 | ||
129 | |||
130 | If an issue is identified with the released source code on the supported | ||
131 | kernel with a supported adapter, email the specific information related | ||
132 | to the issue to e1000-devel@lists.sf.net | ||
diff --git a/Documentation/networking/igbvf.txt b/Documentation/networking/igbvf.txt new file mode 100644 index 000000000000..056028138d9c --- /dev/null +++ b/Documentation/networking/igbvf.txt | |||
@@ -0,0 +1,78 @@ | |||
1 | Linux* Base Driver for Intel(R) Network Connection | ||
2 | ================================================== | ||
3 | |||
4 | Intel Gigabit Linux driver. | ||
5 | Copyright(c) 1999 - 2010 Intel Corporation. | ||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - Identifying Your Adapter | ||
11 | - Additional Configurations | ||
12 | - Support | ||
13 | |||
14 | This file describes the igbvf Linux* Base Driver for Intel Network Connection. | ||
15 | |||
16 | The igbvf driver supports 82576-based virtual function devices that can only | ||
17 | be activated on kernels that support SR-IOV. SR-IOV requires the correct | ||
18 | platform and OS support. | ||
19 | |||
20 | The igbvf driver requires the igb driver, version 2.0 or later. The igbvf | ||
21 | driver supports virtual functions generated by the igb driver with a max_vfs | ||
22 | value of 1 or greater. For more information on the max_vfs parameter refer | ||
23 | to the README included with the igb driver. | ||
24 | |||
25 | The guest OS loading the igbvf driver must support MSI-X interrupts. | ||
26 | |||
27 | This driver is only supported as a loadable module at this time. Intel is | ||
28 | not supplying patches against the kernel source to allow for static linking | ||
29 | of the driver. For questions related to hardware requirements, refer to the | ||
30 | documentation supplied with your Intel Gigabit adapter. All hardware | ||
31 | requirements listed apply to use with Linux. | ||
32 | |||
33 | Instructions on updating ethtool can be found in the section "Additional | ||
34 | Configurations" later in this document. | ||
35 | |||
36 | VLANs: There is a limit of a total of 32 shared VLANs to 1 or more VFs. | ||
37 | |||
38 | Identifying Your Adapter | ||
39 | ======================== | ||
40 | |||
41 | The igbvf driver supports 82576-based virtual function devices that can only | ||
42 | be activated on kernels that support SR-IOV. | ||
43 | |||
44 | For more information on how to identify your adapter, go to the Adapter & | ||
45 | Driver ID Guide at: | ||
46 | |||
47 | http://support.intel.com/support/go/network/adapter/idguide.htm | ||
48 | |||
49 | For the latest Intel network drivers for Linux, refer to the following | ||
50 | website. In the search field, enter your adapter name or type, or use the | ||
51 | networking link on the left to search for your adapter: | ||
52 | |||
53 | http://downloadcenter.intel.com/scripts-df-external/Support_Intel.aspx | ||
54 | |||
55 | Additional Configurations | ||
56 | ========================= | ||
57 | |||
58 | Ethtool | ||
59 | ------- | ||
60 | The driver utilizes the ethtool interface for driver configuration and | ||
61 | diagnostics, as well as displaying statistical information. | ||
62 | |||
63 | http://sourceforge.net/projects/gkernel. | ||
64 | |||
65 | Support | ||
66 | ======= | ||
67 | |||
68 | For general information, go to the Intel support website at: | ||
69 | |||
70 | http://support.intel.com | ||
71 | |||
72 | or the Intel Wired Networking project hosted by Sourceforge at: | ||
73 | |||
74 | http://sourceforge.net/projects/e1000 | ||
75 | |||
76 | If an issue is identified with the released source code on the supported | ||
77 | kernel with a supported adapter, email the specific information related | ||
78 | to the issue to e1000-devel@lists.sf.net | ||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 006b39dec87d..f350c69b2bb4 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -487,6 +487,30 @@ tcp_dma_copybreak - INTEGER | |||
487 | and CONFIG_NET_DMA is enabled. | 487 | and CONFIG_NET_DMA is enabled. |
488 | Default: 4096 | 488 | Default: 4096 |
489 | 489 | ||
490 | tcp_thin_linear_timeouts - BOOLEAN | ||
491 | Enable dynamic triggering of linear timeouts for thin streams. | ||
492 | If set, a check is performed upon retransmission by timeout to | ||
493 | determine if the stream is thin (less than 4 packets in flight). | ||
494 | As long as the stream is found to be thin, up to 6 linear | ||
495 | timeouts may be performed before exponential backoff mode is | ||
496 | initiated. This improves retransmission latency for | ||
497 | non-aggressive thin streams, often found to be time-dependent. | ||
498 | For more information on thin streams, see | ||
499 | Documentation/networking/tcp-thin.txt | ||
500 | Default: 0 | ||
501 | |||
502 | tcp_thin_dupack - BOOLEAN | ||
503 | Enable dynamic triggering of retransmissions after one dupACK | ||
504 | for thin streams. If set, a check is performed upon reception | ||
505 | of a dupACK to determine if the stream is thin (less than 4 | ||
506 | packets in flight). As long as the stream is found to be thin, | ||
507 | data is retransmitted on the first received dupACK. This | ||
508 | improves retransmission latency for non-aggressive thin | ||
509 | streams, often found to be time-dependent. | ||
510 | For more information on thin streams, see | ||
511 | Documentation/networking/tcp-thin.txt | ||
512 | Default: 0 | ||
513 | |||
490 | UDP variables: | 514 | UDP variables: |
491 | 515 | ||
492 | udp_mem - vector of 3 INTEGERs: min, pressure, max | 516 | udp_mem - vector of 3 INTEGERs: min, pressure, max |
@@ -564,6 +588,37 @@ ip_local_port_range - 2 INTEGERS | |||
564 | (i.e. by default) range 1024-4999 is enough to issue up to | 588 | (i.e. by default) range 1024-4999 is enough to issue up to |
565 | 2000 connections per second to systems supporting timestamps. | 589 | 2000 connections per second to systems supporting timestamps. |
566 | 590 | ||
591 | ip_local_reserved_ports - list of comma separated ranges | ||
592 | Specify the ports which are reserved for known third-party | ||
593 | applications. These ports will not be used by automatic port | ||
594 | assignments (e.g. when calling connect() or bind() with port | ||
595 | number 0). Explicit port allocation behavior is unchanged. | ||
596 | |||
597 | The format used for both input and output is a comma separated | ||
598 | list of ranges (e.g. "1,2-4,10-10" for ports 1, 2, 3, 4 and | ||
599 | 10). Writing to the file will clear all previously reserved | ||
600 | ports and update the current list with the one given in the | ||
601 | input. | ||
602 | |||
603 | Note that ip_local_port_range and ip_local_reserved_ports | ||
604 | settings are independent and both are considered by the kernel | ||
605 | when determining which ports are available for automatic port | ||
606 | assignments. | ||
607 | |||
608 | You can reserve ports which are not in the current | ||
609 | ip_local_port_range, e.g.: | ||
610 | |||
611 | $ cat /proc/sys/net/ipv4/ip_local_port_range | ||
612 | 32000 61000 | ||
613 | $ cat /proc/sys/net/ipv4/ip_local_reserved_ports | ||
614 | 8080,9148 | ||
615 | |||
616 | although this is redundant. However such a setting is useful | ||
617 | if later the port range is changed to a value that will | ||
618 | include the reserved ports. | ||
619 | |||
620 | Default: Empty | ||
621 | |||
567 | ip_nonlocal_bind - BOOLEAN | 622 | ip_nonlocal_bind - BOOLEAN |
568 | If set, allows processes to bind() to non-local IP addresses, | 623 | If set, allows processes to bind() to non-local IP addresses, |
569 | which can be quite useful - but may break some applications. | 624 | which can be quite useful - but may break some applications. |
@@ -692,6 +747,25 @@ proxy_arp - BOOLEAN | |||
692 | conf/{all,interface}/proxy_arp is set to TRUE, | 747 | conf/{all,interface}/proxy_arp is set to TRUE, |
693 | it will be disabled otherwise | 748 | it will be disabled otherwise |
694 | 749 | ||
750 | proxy_arp_pvlan - BOOLEAN | ||
751 | Private VLAN proxy arp. | ||
752 | Basically allow proxy arp replies back to the same interface | ||
753 | (from which the ARP request/solicitation was received). | ||
754 | |||
755 | This is done to support (ethernet) switch features, like RFC | ||
756 | 3069, where the individual ports are NOT allowed to | ||
757 | communicate with each other, but they are allowed to talk to | ||
758 | the upstream router. As described in RFC 3069, it is possible | ||
759 | to allow these hosts to communicate through the upstream | ||
760 | router by proxy_arp'ing. Don't need to be used together with | ||
761 | proxy_arp. | ||
762 | |||
763 | This technology is known by different names: | ||
764 | In RFC 3069 it is called VLAN Aggregation. | ||
765 | Cisco and Allied Telesyn call it Private VLAN. | ||
766 | Hewlett-Packard call it Source-Port filtering or port-isolation. | ||
767 | Ericsson call it MAC-Forced Forwarding (RFC Draft). | ||
768 | |||
695 | shared_media - BOOLEAN | 769 | shared_media - BOOLEAN |
696 | Send(router) or accept(host) RFC1620 shared media redirects. | 770 | Send(router) or accept(host) RFC1620 shared media redirects. |
697 | Overrides ip_secure_redirects. | 771 | Overrides ip_secure_redirects. |
@@ -829,13 +903,22 @@ arp_ignore - INTEGER | |||
829 | arp_notify - BOOLEAN | 903 | arp_notify - BOOLEAN |
830 | Define mode for notification of address and device changes. | 904 | Define mode for notification of address and device changes. |
831 | 0 - (default): do nothing | 905 | 0 - (default): do nothing |
832 | 1 - Generate gratuitous arp replies when device is brought up | 906 | 1 - Generate gratuitous arp requests when device is brought up |
833 | or hardware address changes. | 907 | or hardware address changes. |
834 | 908 | ||
835 | arp_accept - BOOLEAN | 909 | arp_accept - BOOLEAN |
836 | Define behavior when gratuitous arp replies are received: | 910 | Define behavior for gratuitous ARP frames who's IP is not |
837 | 0 - drop gratuitous arp frames | 911 | already present in the ARP table: |
838 | 1 - accept gratuitous arp frames | 912 | 0 - don't create new entries in the ARP table |
913 | 1 - create new entries in the ARP table | ||
914 | |||
915 | Both replies and requests type gratuitous arp will trigger the | ||
916 | ARP table to be updated, if this setting is on. | ||
917 | |||
918 | If the ARP table already contains the IP address of the | ||
919 | gratuitous arp frame, the arp table will be updated regardless | ||
920 | if this setting is on or off. | ||
921 | |||
839 | 922 | ||
840 | app_solicit - INTEGER | 923 | app_solicit - INTEGER |
841 | The maximum number of probes to send to the user space ARP daemon | 924 | The maximum number of probes to send to the user space ARP daemon |
@@ -1074,10 +1157,10 @@ regen_max_retry - INTEGER | |||
1074 | Default: 5 | 1157 | Default: 5 |
1075 | 1158 | ||
1076 | max_addresses - INTEGER | 1159 | max_addresses - INTEGER |
1077 | Number of maximum addresses per interface. 0 disables limitation. | 1160 | Maximum number of autoconfigured addresses per interface. Setting |
1078 | It is recommended not set too large value (or 0) because it would | 1161 | to zero disables the limitation. It is not recommended to set this |
1079 | be too easy way to crash kernel to allow to create too much of | 1162 | value too large (or to zero) because it would be an easy way to |
1080 | autoconfigured addresses. | 1163 | crash the kernel by allowing too many addresses to be created. |
1081 | Default: 16 | 1164 | Default: 16 |
1082 | 1165 | ||
1083 | disable_ipv6 - BOOLEAN | 1166 | disable_ipv6 - BOOLEAN |
diff --git a/Documentation/networking/ipddp.txt b/Documentation/networking/ipddp.txt index 661a5558dd8e..ba5c217fffe0 100644 --- a/Documentation/networking/ipddp.txt +++ b/Documentation/networking/ipddp.txt | |||
@@ -36,11 +36,6 @@ AppleTalk-IP to IP decapsulation. | |||
36 | Basic instructions for user space tools | 36 | Basic instructions for user space tools |
37 | ======================================= | 37 | ======================================= |
38 | 38 | ||
39 | To enable AppleTalk-IP decapsulation/encapsulation you will need the | ||
40 | proper tools. You can get the tools for decapsulation from | ||
41 | http://spacs1.spacs.k12.wi.us/~jschlst/index.html and for encapsulation | ||
42 | from http://www.maths.unm.edu/~bradford/ltpc.html | ||
43 | |||
44 | I will briefly describe the operation of the tools, but you will | 39 | I will briefly describe the operation of the tools, but you will |
45 | need to consult the supporting documentation for each set of tools. | 40 | need to consult the supporting documentation for each set of tools. |
46 | 41 | ||
diff --git a/Documentation/networking/iphase.txt b/Documentation/networking/iphase.txt index 55eac4a784e2..670b72f16585 100644 --- a/Documentation/networking/iphase.txt +++ b/Documentation/networking/iphase.txt | |||
@@ -22,7 +22,7 @@ The features and limitations of this driver are as follows: | |||
22 | - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, | 22 | - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, |
23 | including x575 (OC3, control memory 128K , 512K and packet memory 128K, | 23 | including x575 (OC3, control memory 128K , 512K and packet memory 128K, |
24 | 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See | 24 | 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See |
25 | http://www.iphase.com/site/iphase-web/?epi_menuItemID=e196f04b4b3b40502f150882e21046a0 | 25 | http://www.iphase.com/ |
26 | for details. | 26 | for details. |
27 | - Only x86 platforms are supported. | 27 | - Only x86 platforms are supported. |
28 | - SMP is supported. | 28 | - SMP is supported. |
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt new file mode 100644 index 000000000000..21dd5d15b6b4 --- /dev/null +++ b/Documentation/networking/ixgbevf.txt | |||
@@ -0,0 +1,56 @@ | |||
1 | Linux* Base Driver for Intel(R) Network Connection | ||
2 | ================================================== | ||
3 | |||
4 | Intel Gigabit Linux driver. | ||
5 | Copyright(c) 1999 - 2010 Intel Corporation. | ||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - Identifying Your Adapter | ||
11 | - Known Issues/Troubleshooting | ||
12 | - Support | ||
13 | |||
14 | This file describes the ixgbevf Linux* Base Driver for Intel Network | ||
15 | Connection. | ||
16 | |||
17 | The ixgbevf driver supports 82599-based virtual function devices that can only | ||
18 | be activated on kernels with CONFIG_PCI_IOV enabled. | ||
19 | |||
20 | The ixgbevf driver supports virtual functions generated by the ixgbe driver | ||
21 | with a max_vfs value of 1 or greater. | ||
22 | |||
23 | The guest OS loading the ixgbevf driver must support MSI-X interrupts. | ||
24 | |||
25 | VLANs: There is a limit of a total of 32 shared VLANs to 1 or more VFs. | ||
26 | |||
27 | Identifying Your Adapter | ||
28 | ======================== | ||
29 | |||
30 | For more information on how to identify your adapter, go to the Adapter & | ||
31 | Driver ID Guide at: | ||
32 | |||
33 | http://support.intel.com/support/go/network/adapter/idguide.htm | ||
34 | |||
35 | Known Issues/Troubleshooting | ||
36 | ============================ | ||
37 | |||
38 | Unloading Physical Function (PF) Driver Causes System Reboots When VM is | ||
39 | Running and VF is Loaded on the VM | ||
40 | ------------------------------------------------------------------------ | ||
41 | Do not unload the PF driver (ixgbe) while VFs are assigned to guests. | ||
42 | |||
43 | Support | ||
44 | ======= | ||
45 | |||
46 | For general information, go to the Intel support website at: | ||
47 | |||
48 | http://support.intel.com | ||
49 | |||
50 | or the Intel Wired Networking project hosted by Sourceforge at: | ||
51 | |||
52 | http://sourceforge.net/projects/e1000 | ||
53 | |||
54 | If an issue is identified with the released source code on the supported | ||
55 | kernel with a supported adapter, email the specific information related | ||
56 | to the issue to e1000-devel@lists.sf.net | ||
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt index 63214b280e00..e7bf3979facb 100644 --- a/Documentation/networking/l2tp.txt +++ b/Documentation/networking/l2tp.txt | |||
@@ -1,44 +1,95 @@ | |||
1 | This brief document describes how to use the kernel's PPPoL2TP driver | 1 | This document describes how to use the kernel's L2TP drivers to |
2 | to provide L2TP functionality. L2TP is a protocol that tunnels one or | 2 | provide L2TP functionality. L2TP is a protocol that tunnels one or |
3 | more PPP sessions over a UDP tunnel. It is commonly used for VPNs | 3 | more sessions over an IP tunnel. It is commonly used for VPNs |
4 | (L2TP/IPSec) and by ISPs to tunnel subscriber PPP sessions over an IP | 4 | (L2TP/IPSec) and by ISPs to tunnel subscriber PPP sessions over an IP |
5 | network infrastructure. | 5 | network infrastructure. With L2TPv3, it is also useful as a Layer-2 |
6 | tunneling infrastructure. | ||
7 | |||
8 | Features | ||
9 | ======== | ||
10 | |||
11 | L2TPv2 (PPP over L2TP (UDP tunnels)). | ||
12 | L2TPv3 ethernet pseudowires. | ||
13 | L2TPv3 PPP pseudowires. | ||
14 | L2TPv3 IP encapsulation. | ||
15 | Netlink sockets for L2TPv3 configuration management. | ||
16 | |||
17 | History | ||
18 | ======= | ||
19 | |||
20 | The original pppol2tp driver was introduced in 2.6.23 and provided | ||
21 | L2TPv2 functionality (rfc2661). L2TPv2 is used to tunnel one or more PPP | ||
22 | sessions over a UDP tunnel. | ||
23 | |||
24 | L2TPv3 (rfc3931) changes the protocol to allow different frame types | ||
25 | to be passed over an L2TP tunnel by moving the PPP-specific parts of | ||
26 | the protocol out of the core L2TP packet headers. Each frame type is | ||
27 | known as a pseudowire type. Ethernet, PPP, HDLC, Frame Relay and ATM | ||
28 | pseudowires for L2TP are defined in separate RFC standards. Another | ||
29 | change for L2TPv3 is that it can be carried directly over IP with no | ||
30 | UDP header (UDP is optional). It is also possible to create static | ||
31 | unmanaged L2TPv3 tunnels manually without a control protocol | ||
32 | (userspace daemon) to manage them. | ||
33 | |||
34 | To support L2TPv3, the original pppol2tp driver was split up to | ||
35 | separate the L2TP and PPP functionality. Existing L2TPv2 userspace | ||
36 | apps should be unaffected as the original pppol2tp sockets API is | ||
37 | retained. L2TPv3, however, uses netlink to manage L2TPv3 tunnels and | ||
38 | sessions. | ||
6 | 39 | ||
7 | Design | 40 | Design |
8 | ====== | 41 | ====== |
9 | 42 | ||
10 | The PPPoL2TP driver, drivers/net/pppol2tp.c, provides a mechanism by | 43 | The L2TP protocol separates control and data frames. The L2TP kernel |
11 | which PPP frames carried through an L2TP session are passed through | 44 | drivers handle only L2TP data frames; control frames are always |
12 | the kernel's PPP subsystem. The standard PPP daemon, pppd, handles all | 45 | handled by userspace. L2TP control frames carry messages between L2TP |
13 | PPP interaction with the peer. PPP network interfaces are created for | 46 | clients/servers and are used to setup / teardown tunnels and |
14 | each local PPP endpoint. | 47 | sessions. An L2TP client or server is implemented in userspace. |
15 | 48 | ||
16 | The L2TP protocol http://www.faqs.org/rfcs/rfc2661.html defines L2TP | 49 | Each L2TP tunnel is implemented using a UDP or L2TPIP socket; L2TPIP |
17 | control and data frames. L2TP control frames carry messages between | 50 | provides L2TPv3 IP encapsulation (no UDP) and is implemented using a |
18 | L2TP clients/servers and are used to setup / teardown tunnels and | 51 | new l2tpip socket family. The tunnel socket is typically created by |
19 | sessions. An L2TP client or server is implemented in userspace and | 52 | userspace, though for unmanaged L2TPv3 tunnels, the socket can also be |
20 | will use a regular UDP socket per tunnel. L2TP data frames carry PPP | 53 | created by the kernel. Each L2TP session (pseudowire) gets a network |
21 | frames, which may be PPP control or PPP data. The kernel's PPP | 54 | interface instance. In the case of PPP, these interfaces are created |
55 | indirectly by pppd using a pppol2tp socket. In the case of ethernet, | ||
56 | the netdevice is created upon a netlink request to create an L2TPv3 | ||
57 | ethernet pseudowire. | ||
58 | |||
59 | For PPP, the PPPoL2TP driver, net/l2tp/l2tp_ppp.c, provides a | ||
60 | mechanism by which PPP frames carried through an L2TP session are | ||
61 | passed through the kernel's PPP subsystem. The standard PPP daemon, | ||
62 | pppd, handles all PPP interaction with the peer. PPP network | ||
63 | interfaces are created for each local PPP endpoint. The kernel's PPP | ||
22 | subsystem arranges for PPP control frames to be delivered to pppd, | 64 | subsystem arranges for PPP control frames to be delivered to pppd, |
23 | while data frames are forwarded as usual. | 65 | while data frames are forwarded as usual. |
24 | 66 | ||
67 | For ethernet, the L2TPETH driver, net/l2tp/l2tp_eth.c, implements a | ||
68 | netdevice driver, managing virtual ethernet devices, one per | ||
69 | pseudowire. These interfaces can be managed using standard Linux tools | ||
70 | such as "ip" and "ifconfig". If only IP frames are passed over the | ||
71 | tunnel, the interface can be given an IP addresses of itself and its | ||
72 | peer. If non-IP frames are to be passed over the tunnel, the interface | ||
73 | can be added to a bridge using brctl. All L2TP datapath protocol | ||
74 | functions are handled by the L2TP core driver. | ||
75 | |||
25 | Each tunnel and session within a tunnel is assigned a unique tunnel_id | 76 | Each tunnel and session within a tunnel is assigned a unique tunnel_id |
26 | and session_id. These ids are carried in the L2TP header of every | 77 | and session_id. These ids are carried in the L2TP header of every |
27 | control and data packet. The pppol2tp driver uses them to lookup | 78 | control and data packet. (Actually, in L2TPv3, the tunnel_id isn't |
28 | internal tunnel and/or session contexts. Zero tunnel / session ids are | 79 | present in data frames - it is inferred from the IP connection on |
29 | treated specially - zero ids are never assigned to tunnels or sessions | 80 | which the packet was received.) The L2TP driver uses the ids to lookup |
30 | in the network. In the driver, the tunnel context keeps a pointer to | 81 | internal tunnel and/or session contexts to determine how to handle the |
31 | the tunnel UDP socket. The session context keeps a pointer to the | 82 | packet. Zero tunnel / session ids are treated specially - zero ids are |
32 | PPPoL2TP socket, as well as other data that lets the driver interface | 83 | never assigned to tunnels or sessions in the network. In the driver, |
33 | to the kernel PPP subsystem. | 84 | the tunnel context keeps a reference to the tunnel UDP or L2TPIP |
34 | 85 | socket. The session context holds data that lets the driver interface | |
35 | Note that the pppol2tp kernel driver handles only L2TP data frames; | 86 | to the kernel's network frame type subsystems, i.e. PPP, ethernet. |
36 | L2TP control frames are simply passed up to userspace in the UDP | 87 | |
37 | tunnel socket. The kernel handles all datapath aspects of the | 88 | Userspace Programming |
38 | protocol, including data packet resequencing (if enabled). | 89 | ===================== |
39 | 90 | ||
40 | There are a number of requirements on the userspace L2TP daemon in | 91 | For L2TPv2, there are a number of requirements on the userspace L2TP |
41 | order to use the pppol2tp driver. | 92 | daemon in order to use the pppol2tp driver. |
42 | 93 | ||
43 | 1. Use a UDP socket per tunnel. | 94 | 1. Use a UDP socket per tunnel. |
44 | 95 | ||
@@ -86,6 +137,35 @@ In addition to the standard PPP ioctls, a PPPIOCGL2TPSTATS is provided | |||
86 | to retrieve tunnel and session statistics from the kernel using the | 137 | to retrieve tunnel and session statistics from the kernel using the |
87 | PPPoX socket of the appropriate tunnel or session. | 138 | PPPoX socket of the appropriate tunnel or session. |
88 | 139 | ||
140 | For L2TPv3, userspace must use the netlink API defined in | ||
141 | include/linux/l2tp.h to manage tunnel and session contexts. The | ||
142 | general procedure to create a new L2TP tunnel with one session is:- | ||
143 | |||
144 | 1. Open a GENL socket using L2TP_GENL_NAME for configuring the kernel | ||
145 | using netlink. | ||
146 | |||
147 | 2. Create a UDP or L2TPIP socket for the tunnel. | ||
148 | |||
149 | 3. Create a new L2TP tunnel using a L2TP_CMD_TUNNEL_CREATE | ||
150 | request. Set attributes according to desired tunnel parameters, | ||
151 | referencing the UDP or L2TPIP socket created in the previous step. | ||
152 | |||
153 | 4. Create a new L2TP session in the tunnel using a | ||
154 | L2TP_CMD_SESSION_CREATE request. | ||
155 | |||
156 | The tunnel and all of its sessions are closed when the tunnel socket | ||
157 | is closed. The netlink API may also be used to delete sessions and | ||
158 | tunnels. Configuration and status info may be set or read using netlink. | ||
159 | |||
160 | The L2TP driver also supports static (unmanaged) L2TPv3 tunnels. These | ||
161 | are where there is no L2TP control message exchange with the peer to | ||
162 | setup the tunnel; the tunnel is configured manually at each end of the | ||
163 | tunnel. There is no need for an L2TP userspace application in this | ||
164 | case -- the tunnel socket is created by the kernel and configured | ||
165 | using parameters sent in the L2TP_CMD_TUNNEL_CREATE netlink | ||
166 | request. The "ip" utility of iproute2 has commands for managing static | ||
167 | L2TPv3 tunnels; do "ip l2tp help" for more information. | ||
168 | |||
89 | Debugging | 169 | Debugging |
90 | ========= | 170 | ========= |
91 | 171 | ||
@@ -102,6 +182,69 @@ PPPOL2TP_MSG_CONTROL userspace - kernel interface | |||
102 | PPPOL2TP_MSG_SEQ sequence numbers handling | 182 | PPPOL2TP_MSG_SEQ sequence numbers handling |
103 | PPPOL2TP_MSG_DATA data packets | 183 | PPPOL2TP_MSG_DATA data packets |
104 | 184 | ||
185 | If enabled, files under a l2tp debugfs directory can be used to dump | ||
186 | kernel state about L2TP tunnels and sessions. To access it, the | ||
187 | debugfs filesystem must first be mounted. | ||
188 | |||
189 | # mount -t debugfs debugfs /debug | ||
190 | |||
191 | Files under the l2tp directory can then be accessed. | ||
192 | |||
193 | # cat /debug/l2tp/tunnels | ||
194 | |||
195 | The debugfs files should not be used by applications to obtain L2TP | ||
196 | state information because the file format is subject to change. It is | ||
197 | implemented to provide extra debug information to help diagnose | ||
198 | problems.) Users should use the netlink API. | ||
199 | |||
200 | /proc/net/pppol2tp is also provided for backwards compaibility with | ||
201 | the original pppol2tp driver. It lists information about L2TPv2 | ||
202 | tunnels and sessions only. Its use is discouraged. | ||
203 | |||
204 | Unmanaged L2TPv3 Tunnels | ||
205 | ======================== | ||
206 | |||
207 | Some commercial L2TP products support unmanaged L2TPv3 ethernet | ||
208 | tunnels, where there is no L2TP control protocol; tunnels are | ||
209 | configured at each side manually. New commands are available in | ||
210 | iproute2's ip utility to support this. | ||
211 | |||
212 | To create an L2TPv3 ethernet pseudowire between local host 192.168.1.1 | ||
213 | and peer 192.168.1.2, using IP addresses 10.5.1.1 and 10.5.1.2 for the | ||
214 | tunnel endpoints:- | ||
215 | |||
216 | # modprobe l2tp_eth | ||
217 | # modprobe l2tp_netlink | ||
218 | |||
219 | # ip l2tp add tunnel tunnel_id 1 peer_tunnel_id 1 udp_sport 5000 \ | ||
220 | udp_dport 5000 encap udp local 192.168.1.1 remote 192.168.1.2 | ||
221 | # ip l2tp add session tunnel_id 1 session_id 1 peer_session_id 1 | ||
222 | # ifconfig -a | ||
223 | # ip addr add 10.5.1.2/32 peer 10.5.1.1/32 dev l2tpeth0 | ||
224 | # ifconfig l2tpeth0 up | ||
225 | |||
226 | Choose IP addresses to be the address of a local IP interface and that | ||
227 | of the remote system. The IP addresses of the l2tpeth0 interface can be | ||
228 | anything suitable. | ||
229 | |||
230 | Repeat the above at the peer, with ports, tunnel/session ids and IP | ||
231 | addresses reversed. The tunnel and session IDs can be any non-zero | ||
232 | 32-bit number, but the values must be reversed at the peer. | ||
233 | |||
234 | Host 1 Host2 | ||
235 | udp_sport=5000 udp_sport=5001 | ||
236 | udp_dport=5001 udp_dport=5000 | ||
237 | tunnel_id=42 tunnel_id=45 | ||
238 | peer_tunnel_id=45 peer_tunnel_id=42 | ||
239 | session_id=128 session_id=5196755 | ||
240 | peer_session_id=5196755 peer_session_id=128 | ||
241 | |||
242 | When done at both ends of the tunnel, it should be possible to send | ||
243 | data over the network. e.g. | ||
244 | |||
245 | # ping 10.5.1.1 | ||
246 | |||
247 | |||
105 | Sample Userspace Code | 248 | Sample Userspace Code |
106 | ===================== | 249 | ===================== |
107 | 250 | ||
@@ -158,12 +301,48 @@ Sample Userspace Code | |||
158 | } | 301 | } |
159 | return 0; | 302 | return 0; |
160 | 303 | ||
304 | Internal Implementation | ||
305 | ======================= | ||
306 | |||
307 | The driver keeps a struct l2tp_tunnel context per L2TP tunnel and a | ||
308 | struct l2tp_session context for each session. The l2tp_tunnel is | ||
309 | always associated with a UDP or L2TP/IP socket and keeps a list of | ||
310 | sessions in the tunnel. The l2tp_session context keeps kernel state | ||
311 | about the session. It has private data which is used for data specific | ||
312 | to the session type. With L2TPv2, the session always carried PPP | ||
313 | traffic. With L2TPv3, the session can also carry ethernet frames | ||
314 | (ethernet pseudowire) or other data types such as ATM, HDLC or Frame | ||
315 | Relay. | ||
316 | |||
317 | When a tunnel is first opened, the reference count on the socket is | ||
318 | increased using sock_hold(). This ensures that the kernel socket | ||
319 | cannot be removed while L2TP's data structures reference it. | ||
320 | |||
321 | Some L2TP sessions also have a socket (PPP pseudowires) while others | ||
322 | do not (ethernet pseudowires). We can't use the socket reference count | ||
323 | as the reference count for session contexts. The L2TP implementation | ||
324 | therefore has its own internal reference counts on the session | ||
325 | contexts. | ||
326 | |||
327 | To Do | ||
328 | ===== | ||
329 | |||
330 | Add L2TP tunnel switching support. This would route tunneled traffic | ||
331 | from one L2TP tunnel into another. Specified in | ||
332 | http://tools.ietf.org/html/draft-ietf-l2tpext-tunnel-switching-08 | ||
333 | |||
334 | Add L2TPv3 VLAN pseudowire support. | ||
335 | |||
336 | Add L2TPv3 IP pseudowire support. | ||
337 | |||
338 | Add L2TPv3 ATM pseudowire support. | ||
339 | |||
161 | Miscellaneous | 340 | Miscellaneous |
162 | ============ | 341 | ============= |
163 | 342 | ||
164 | The PPPoL2TP driver was developed as part of the OpenL2TP project by | 343 | The L2TP drivers were developed as part of the OpenL2TP project by |
165 | Katalix Systems Ltd. OpenL2TP is a full-featured L2TP client / server, | 344 | Katalix Systems Ltd. OpenL2TP is a full-featured L2TP client / server, |
166 | designed from the ground up to have the L2TP datapath in the | 345 | designed from the ground up to have the L2TP datapath in the |
167 | kernel. The project also implemented the pppol2tp plugin for pppd | 346 | kernel. The project also implemented the pppol2tp plugin for pppd |
168 | which allows pppd to use the kernel driver. Details can be found at | 347 | which allows pppd to use the kernel driver. Details can be found at |
169 | http://openl2tp.sourceforge.net. | 348 | http://www.openl2tp.org. |
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index a22fd85e3796..073894d1c093 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -2,13 +2,13 @@ | |||
2 | + ABSTRACT | 2 | + ABSTRACT |
3 | -------------------------------------------------------------------------------- | 3 | -------------------------------------------------------------------------------- |
4 | 4 | ||
5 | This file documents the CONFIG_PACKET_MMAP option available with the PACKET | 5 | This file documents the mmap() facility available with the PACKET |
6 | socket interface on 2.4 and 2.6 kernels. This type of sockets is used for | 6 | socket interface on 2.4 and 2.6 kernels. This type of sockets is used for |
7 | capture network traffic with utilities like tcpdump or any other that needs | 7 | capture network traffic with utilities like tcpdump or any other that needs |
8 | raw access to network interface. | 8 | raw access to network interface. |
9 | 9 | ||
10 | You can find the latest version of this document at: | 10 | You can find the latest version of this document at: |
11 | http://pusa.uv.es/~ulisses/packet_mmap/ | 11 | http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap |
12 | 12 | ||
13 | Howto can be found at: | 13 | Howto can be found at: |
14 | http://wiki.gnu-log.net (packet_mmap) | 14 | http://wiki.gnu-log.net (packet_mmap) |
@@ -44,7 +44,7 @@ enabled. For transmission, check the MTU (Maximum Transmission Unit) used and | |||
44 | supported by devices of your network. | 44 | supported by devices of your network. |
45 | 45 | ||
46 | -------------------------------------------------------------------------------- | 46 | -------------------------------------------------------------------------------- |
47 | + How to use CONFIG_PACKET_MMAP to improve capture process | 47 | + How to use mmap() to improve capture process |
48 | -------------------------------------------------------------------------------- | 48 | -------------------------------------------------------------------------------- |
49 | 49 | ||
50 | From the user standpoint, you should use the higher level libpcap library, which | 50 | From the user standpoint, you should use the higher level libpcap library, which |
@@ -56,7 +56,7 @@ support for PACKET_MMAP, and also probably the libpcap included in your distribu | |||
56 | 56 | ||
57 | I'm aware of two implementations of PACKET_MMAP in libpcap: | 57 | I'm aware of two implementations of PACKET_MMAP in libpcap: |
58 | 58 | ||
59 | http://pusa.uv.es/~ulisses/packet_mmap/ (by Simon Patarin, based on libpcap 0.6.2) | 59 | http://wiki.ipxwarzone.com/ (by Simon Patarin, based on libpcap 0.6.2) |
60 | http://public.lanl.gov/cpw/ (by Phil Wood, based on lastest libpcap) | 60 | http://public.lanl.gov/cpw/ (by Phil Wood, based on lastest libpcap) |
61 | 61 | ||
62 | The rest of this document is intended for people who want to understand | 62 | The rest of this document is intended for people who want to understand |
@@ -64,7 +64,7 @@ the low level details or want to improve libpcap by including PACKET_MMAP | |||
64 | support. | 64 | support. |
65 | 65 | ||
66 | -------------------------------------------------------------------------------- | 66 | -------------------------------------------------------------------------------- |
67 | + How to use CONFIG_PACKET_MMAP directly to improve capture process | 67 | + How to use mmap() directly to improve capture process |
68 | -------------------------------------------------------------------------------- | 68 | -------------------------------------------------------------------------------- |
69 | 69 | ||
70 | From the system calls stand point, the use of PACKET_MMAP involves | 70 | From the system calls stand point, the use of PACKET_MMAP involves |
@@ -100,12 +100,12 @@ by the kernel. | |||
100 | The destruction of the socket and all associated resources | 100 | The destruction of the socket and all associated resources |
101 | is done by a simple call to close(fd). | 101 | is done by a simple call to close(fd). |
102 | 102 | ||
103 | Next I will describe PACKET_MMAP settings and it's constraints, | 103 | Next I will describe PACKET_MMAP settings and its constraints, |
104 | also the mapping of the circular buffer in the user process and | 104 | also the mapping of the circular buffer in the user process and |
105 | the use of this buffer. | 105 | the use of this buffer. |
106 | 106 | ||
107 | -------------------------------------------------------------------------------- | 107 | -------------------------------------------------------------------------------- |
108 | + How to use CONFIG_PACKET_MMAP directly to improve transmission process | 108 | + How to use mmap() directly to improve transmission process |
109 | -------------------------------------------------------------------------------- | 109 | -------------------------------------------------------------------------------- |
110 | Transmission process is similar to capture as shown below. | 110 | Transmission process is similar to capture as shown below. |
111 | 111 | ||
@@ -432,7 +432,7 @@ TP_STATUS_LOSING : indicates there were packet drops from last time | |||
432 | the PACKET_STATISTICS option. | 432 | the PACKET_STATISTICS option. |
433 | 433 | ||
434 | TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets which | 434 | TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets which |
435 | it's checksum will be done in hardware. So while | 435 | its checksum will be done in hardware. So while |
436 | reading the packet we should not try to check the | 436 | reading the packet we should not try to check the |
437 | checksum. | 437 | checksum. |
438 | 438 | ||
@@ -493,6 +493,32 @@ The user can also use poll() to check if a buffer is available: | |||
493 | pfd.events = POLLOUT; | 493 | pfd.events = POLLOUT; |
494 | retval = poll(&pfd, 1, timeout); | 494 | retval = poll(&pfd, 1, timeout); |
495 | 495 | ||
496 | ------------------------------------------------------------------------------- | ||
497 | + PACKET_TIMESTAMP | ||
498 | ------------------------------------------------------------------------------- | ||
499 | |||
500 | The PACKET_TIMESTAMP setting determines the source of the timestamp in | ||
501 | the packet meta information. If your NIC is capable of timestamping | ||
502 | packets in hardware, you can request those hardware timestamps to used. | ||
503 | Note: you may need to enable the generation of hardware timestamps with | ||
504 | SIOCSHWTSTAMP. | ||
505 | |||
506 | PACKET_TIMESTAMP accepts the same integer bit field as | ||
507 | SO_TIMESTAMPING. However, only the SOF_TIMESTAMPING_SYS_HARDWARE | ||
508 | and SOF_TIMESTAMPING_RAW_HARDWARE values are recognized by | ||
509 | PACKET_TIMESTAMP. SOF_TIMESTAMPING_SYS_HARDWARE takes precedence over | ||
510 | SOF_TIMESTAMPING_RAW_HARDWARE if both bits are set. | ||
511 | |||
512 | int req = 0; | ||
513 | req |= SOF_TIMESTAMPING_SYS_HARDWARE; | ||
514 | setsockopt(fd, SOL_PACKET, PACKET_TIMESTAMP, (void *) &req, sizeof(req)) | ||
515 | |||
516 | If PACKET_TIMESTAMP is not set, a software timestamp generated inside | ||
517 | the networking stack is used (the behavior before this setting was added). | ||
518 | |||
519 | See include/linux/net_tstamp.h and Documentation/networking/timestamping | ||
520 | for more information on hardware timestamps. | ||
521 | |||
496 | -------------------------------------------------------------------------------- | 522 | -------------------------------------------------------------------------------- |
497 | + THANKS | 523 | + THANKS |
498 | -------------------------------------------------------------------------------- | 524 | -------------------------------------------------------------------------------- |
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt index 61bb645d50e0..75e4fd708ccb 100644 --- a/Documentation/networking/pktgen.txt +++ b/Documentation/networking/pktgen.txt | |||
@@ -151,6 +151,8 @@ Examples: | |||
151 | 151 | ||
152 | pgset stop aborts injection. Also, ^C aborts generator. | 152 | pgset stop aborts injection. Also, ^C aborts generator. |
153 | 153 | ||
154 | pgset "rate 300M" set rate to 300 Mb/s | ||
155 | pgset "ratep 1000000" set rate to 1Mpps | ||
154 | 156 | ||
155 | Example scripts | 157 | Example scripts |
156 | =============== | 158 | =============== |
@@ -241,6 +243,9 @@ src6 | |||
241 | flows | 243 | flows |
242 | flowlen | 244 | flowlen |
243 | 245 | ||
246 | rate | ||
247 | ratep | ||
248 | |||
244 | References: | 249 | References: |
245 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ | 250 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ |
246 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ | 251 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ |
diff --git a/Documentation/networking/ray_cs.txt b/Documentation/networking/ray_cs.txt index 145d27a52395..c0c12307ed9d 100644 --- a/Documentation/networking/ray_cs.txt +++ b/Documentation/networking/ray_cs.txt | |||
@@ -13,8 +13,8 @@ wireless LAN cards. | |||
13 | 13 | ||
14 | As of kernel 2.3.18, the ray_cs driver is part of the Linux kernel | 14 | As of kernel 2.3.18, the ray_cs driver is part of the Linux kernel |
15 | source. My web page for the development of ray_cs is at | 15 | source. My web page for the development of ray_cs is at |
16 | http://world.std.com/~corey/raylink.html and I can be emailed at | 16 | http://web.ralinktech.com/ralink/Home/Support/Linux.html |
17 | corey@world.std.com | 17 | and I can be emailed at corey@world.std.com |
18 | 18 | ||
19 | The kernel driver is based on ray_cs-1.62.tgz | 19 | The kernel driver is based on ray_cs-1.62.tgz |
20 | 20 | ||
diff --git a/Documentation/networking/regulatory.txt b/Documentation/networking/regulatory.txt index ee31369e9e5b..9551622d0a7b 100644 --- a/Documentation/networking/regulatory.txt +++ b/Documentation/networking/regulatory.txt | |||
@@ -188,3 +188,27 @@ Then in some part of your code after your wiphy has been registered: | |||
188 | &mydriver_jp_regdom.reg_rules[i], | 188 | &mydriver_jp_regdom.reg_rules[i], |
189 | sizeof(struct ieee80211_reg_rule)); | 189 | sizeof(struct ieee80211_reg_rule)); |
190 | regulatory_struct_hint(rd); | 190 | regulatory_struct_hint(rd); |
191 | |||
192 | Statically compiled regulatory database | ||
193 | --------------------------------------- | ||
194 | |||
195 | In most situations the userland solution using CRDA as described | ||
196 | above is the preferred solution. However in some cases a set of | ||
197 | rules built into the kernel itself may be desirable. To account | ||
198 | for this situation, a configuration option has been provided | ||
199 | (i.e. CONFIG_CFG80211_INTERNAL_REGDB). With this option enabled, | ||
200 | the wireless database information contained in net/wireless/db.txt is | ||
201 | used to generate a data structure encoded in net/wireless/regdb.c. | ||
202 | That option also enables code in net/wireless/reg.c which queries | ||
203 | the data in regdb.c as an alternative to using CRDA. | ||
204 | |||
205 | The file net/wireless/db.txt should be kept up-to-date with the db.txt | ||
206 | file available in the git repository here: | ||
207 | |||
208 | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-regdb.git | ||
209 | |||
210 | Again, most users in most situations should be using the CRDA package | ||
211 | provided with their distribution, and in most other situations users | ||
212 | should be building and using CRDA on their own rather than using | ||
213 | this option. If you are not absolutely sure that you should be using | ||
214 | CONFIG_CFG80211_INTERNAL_REGDB then _DO_NOT_USE_IT_. | ||
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index c3d6b4d5d014..9d4e0f4df5a8 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
@@ -133,7 +133,8 @@ bring down CPU utilization. | |||
133 | ** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are | 133 | ** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are |
134 | recommended as safe parameters. | 134 | recommended as safe parameters. |
135 | For more information, please review the AMD8131 errata at | 135 | For more information, please review the AMD8131 errata at |
136 | http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/26310.pdf | 136 | http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/ |
137 | 26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf | ||
137 | 138 | ||
138 | 6. Available Downloads | 139 | 6. Available Downloads |
139 | Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up | 140 | Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up |
diff --git a/Documentation/networking/skfp.txt b/Documentation/networking/skfp.txt index abfddf81e34a..203ec66c9fb4 100644 --- a/Documentation/networking/skfp.txt +++ b/Documentation/networking/skfp.txt | |||
@@ -68,7 +68,7 @@ Compaq adapters (not tested): | |||
68 | ======================= | 68 | ======================= |
69 | 69 | ||
70 | From v2.01 on, the driver is integrated in the linux kernel sources. | 70 | From v2.01 on, the driver is integrated in the linux kernel sources. |
71 | Therefor, the installation is the same as for any other adapter | 71 | Therefore, the installation is the same as for any other adapter |
72 | supported by the kernel. | 72 | supported by the kernel. |
73 | Refer to the manual of your distribution about the installation | 73 | Refer to the manual of your distribution about the installation |
74 | of network adapters. | 74 | of network adapters. |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt new file mode 100644 index 000000000000..7ee770b5ef5f --- /dev/null +++ b/Documentation/networking/stmmac.txt | |||
@@ -0,0 +1,143 @@ | |||
1 | STMicroelectronics 10/100/1000 Synopsys Ethernet driver | ||
2 | |||
3 | Copyright (C) 2007-2010 STMicroelectronics Ltd | ||
4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
5 | |||
6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | ||
7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. | ||
8 | |||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | ||
10 | (7xxx SoCs). | ||
11 | |||
12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 | ||
13 | Universal version 4.0 have been used for developing the first code | ||
14 | implementation. | ||
15 | |||
16 | Please, for more information also visit: www.stlinux.com | ||
17 | |||
18 | 1) Kernel Configuration | ||
19 | The kernel configuration option is STMMAC_ETH: | ||
20 | Device Drivers ---> Network device support ---> Ethernet (1000 Mbit) ---> | ||
21 | STMicroelectronics 10/100/1000 Ethernet driver (STMMAC_ETH) | ||
22 | |||
23 | 2) Driver parameters list: | ||
24 | debug: message level (0: no output, 16: all); | ||
25 | phyaddr: to manually provide the physical address to the PHY device; | ||
26 | dma_rxsize: DMA rx ring size; | ||
27 | dma_txsize: DMA tx ring size; | ||
28 | buf_sz: DMA buffer size; | ||
29 | tc: control the HW FIFO threshold; | ||
30 | tx_coe: Enable/Disable Tx Checksum Offload engine; | ||
31 | watchdog: transmit timeout (in milliseconds); | ||
32 | flow_ctrl: Flow control ability [on/off]; | ||
33 | pause: Flow Control Pause Time; | ||
34 | tmrate: timer period (only if timer optimisation is configured). | ||
35 | |||
36 | 3) Command line options | ||
37 | Driver parameters can be also passed in command line by using: | ||
38 | stmmaceth=dma_rxsize:128,dma_txsize:512 | ||
39 | |||
40 | 4) Driver information and notes | ||
41 | |||
42 | 4.1) Transmit process | ||
43 | The xmit method is invoked when the kernel needs to transmit a packet; it sets | ||
44 | the descriptors in the ring and informs the DMA engine that there is a packet | ||
45 | ready to be transmitted. | ||
46 | Once the controller has finished transmitting the packet, an interrupt is | ||
47 | triggered; So the driver will be able to release the socket buffers. | ||
48 | By default, the driver sets the NETIF_F_SG bit in the features field of the | ||
49 | net_device structure enabling the scatter/gather feature. | ||
50 | |||
51 | 4.2) Receive process | ||
52 | When one or more packets are received, an interrupt happens. The interrupts | ||
53 | are not queued so the driver has to scan all the descriptors in the ring during | ||
54 | the receive process. | ||
55 | This is based on NAPI so the interrupt handler signals only if there is work to be | ||
56 | done, and it exits. | ||
57 | Then the poll method will be scheduled at some future point. | ||
58 | The incoming packets are stored, by the DMA, in a list of pre-allocated socket | ||
59 | buffers in order to avoid the memcpy (Zero-copy). | ||
60 | |||
61 | 4.3) Timer-Driver Interrupt | ||
62 | Instead of having the device that asynchronously notifies the frame receptions, the | ||
63 | driver configures a timer to generate an interrupt at regular intervals. | ||
64 | Based on the granularity of the timer, the frames that are received by the device | ||
65 | will experience different levels of latency. Some NICs have dedicated timer | ||
66 | device to perform this task. STMMAC can use either the RTC device or the TMU | ||
67 | channel 2 on STLinux platforms. | ||
68 | The timers frequency can be passed to the driver as parameter; when change it, | ||
69 | take care of both hardware capability and network stability/performance impact. | ||
70 | Several performance tests on STM platforms showed this optimisation allows to spare | ||
71 | the CPU while having the maximum throughput. | ||
72 | |||
73 | 4.4) WOL | ||
74 | Wake up on Lan feature through Magic Frame is only supported for the GMAC | ||
75 | core. | ||
76 | |||
77 | 4.5) DMA descriptors | ||
78 | Driver handles both normal and enhanced descriptors. The latter has been only | ||
79 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a. | ||
80 | |||
81 | 4.6) Ethtool support | ||
82 | Ethtool is supported. Driver statistics and internal errors can be taken using: | ||
83 | ethtool -S ethX command. It is possible to dump registers etc. | ||
84 | |||
85 | 4.7) Jumbo and Segmentation Offloading | ||
86 | Jumbo frames are supported and tested for the GMAC. | ||
87 | The GSO has been also added but it's performed in software. | ||
88 | LRO is not supported. | ||
89 | |||
90 | 4.8) Physical | ||
91 | The driver is compatible with PAL to work with PHY and GPHY devices. | ||
92 | |||
93 | 4.9) Platform information | ||
94 | Several information came from the platform; please refer to the | ||
95 | driver's Header file in include/linux directory. | ||
96 | |||
97 | struct plat_stmmacenet_data { | ||
98 | int bus_id; | ||
99 | int pbl; | ||
100 | int has_gmac; | ||
101 | void (*fix_mac_speed)(void *priv, unsigned int speed); | ||
102 | void (*bus_setup)(unsigned long ioaddr); | ||
103 | #ifdef CONFIG_STM_DRIVERS | ||
104 | struct stm_pad_config *pad_config; | ||
105 | #endif | ||
106 | void *bsp_priv; | ||
107 | }; | ||
108 | |||
109 | Where: | ||
110 | - pbl (Programmable Burst Length) is maximum number of | ||
111 | beats to be transferred in one DMA transaction. | ||
112 | GMAC also enables the 4xPBL by default. | ||
113 | - fix_mac_speed and bus_setup are used to configure internal target | ||
114 | registers (on STM platforms); | ||
115 | - has_gmac: GMAC core is on board (get it at run-time in the next step); | ||
116 | - bus_id: bus identifier. | ||
117 | |||
118 | struct plat_stmmacphy_data { | ||
119 | int bus_id; | ||
120 | int phy_addr; | ||
121 | unsigned int phy_mask; | ||
122 | int interface; | ||
123 | int (*phy_reset)(void *priv); | ||
124 | void *priv; | ||
125 | }; | ||
126 | |||
127 | Where: | ||
128 | - bus_id: bus identifier; | ||
129 | - phy_addr: physical address used for the attached phy device; | ||
130 | set it to -1 to get it at run-time; | ||
131 | - interface: physical MII interface mode; | ||
132 | - phy_reset: hook to reset HW function. | ||
133 | |||
134 | TODO: | ||
135 | - Continue to make the driver more generic and suitable for other Synopsys | ||
136 | Ethernet controllers used on other architectures (i.e. ARM). | ||
137 | - 10G controllers are not supported. | ||
138 | - MAC uses Normal descriptors and GMAC uses enhanced ones. | ||
139 | This is a limit that should be reviewed. MAC could want to | ||
140 | use the enhanced structure. | ||
141 | - Checksumming: Rx/Tx csum is done in HW in case of GMAC only. | ||
142 | - Review the timer optimisation code to use an embedded device that seems to be | ||
143 | available in new chip generations. | ||
diff --git a/Documentation/networking/tcp-thin.txt b/Documentation/networking/tcp-thin.txt new file mode 100644 index 000000000000..151e229980f1 --- /dev/null +++ b/Documentation/networking/tcp-thin.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | Thin-streams and TCP | ||
2 | ==================== | ||
3 | A wide range of Internet-based services that use reliable transport | ||
4 | protocols display what we call thin-stream properties. This means | ||
5 | that the application sends data with such a low rate that the | ||
6 | retransmission mechanisms of the transport protocol are not fully | ||
7 | effective. In time-dependent scenarios (like online games, control | ||
8 | systems, stock trading etc.) where the user experience depends | ||
9 | on the data delivery latency, packet loss can be devastating for | ||
10 | the service quality. Extreme latencies are caused by TCP's | ||
11 | dependency on the arrival of new data from the application to trigger | ||
12 | retransmissions effectively through fast retransmit instead of | ||
13 | waiting for long timeouts. | ||
14 | |||
15 | After analysing a large number of time-dependent interactive | ||
16 | applications, we have seen that they often produce thin streams | ||
17 | and also stay with this traffic pattern throughout its entire | ||
18 | lifespan. The combination of time-dependency and the fact that the | ||
19 | streams provoke high latencies when using TCP is unfortunate. | ||
20 | |||
21 | In order to reduce application-layer latency when packets are lost, | ||
22 | a set of mechanisms has been made, which address these latency issues | ||
23 | for thin streams. In short, if the kernel detects a thin stream, | ||
24 | the retransmission mechanisms are modified in the following manner: | ||
25 | |||
26 | 1) If the stream is thin, fast retransmit on the first dupACK. | ||
27 | 2) If the stream is thin, do not apply exponential backoff. | ||
28 | |||
29 | These enhancements are applied only if the stream is detected as | ||
30 | thin. This is accomplished by defining a threshold for the number | ||
31 | of packets in flight. If there are less than 4 packets in flight, | ||
32 | fast retransmissions can not be triggered, and the stream is prone | ||
33 | to experience high retransmission latencies. | ||
34 | |||
35 | Since these mechanisms are targeted at time-dependent applications, | ||
36 | they must be specifically activated by the application using the | ||
37 | TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the | ||
38 | tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both | ||
39 | modifications are turned off by default. | ||
40 | |||
41 | References | ||
42 | ========== | ||
43 | More information on the modifications, as well as a wide range of | ||
44 | experimental data can be found here: | ||
45 | "Improving latency for interactive, thin-stream applications over | ||
46 | reliable transport" | ||
47 | http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file | ||
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index 0e58b4539176..e8c8f4f06c67 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -41,11 +41,12 @@ SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in | |||
41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. | 41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. |
42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the | 42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the |
43 | following control message: | 43 | following control message: |
44 | struct scm_timestamping { | 44 | |
45 | struct timespec systime; | 45 | struct scm_timestamping { |
46 | struct timespec hwtimetrans; | 46 | struct timespec systime; |
47 | struct timespec hwtimeraw; | 47 | struct timespec hwtimetrans; |
48 | }; | 48 | struct timespec hwtimeraw; |
49 | }; | ||
49 | 50 | ||
50 | recvmsg() can be used to get this control message for regular incoming | 51 | recvmsg() can be used to get this control message for regular incoming |
51 | packets. For send time stamps the outgoing packet is looped back to | 52 | packets. For send time stamps the outgoing packet is looped back to |
@@ -87,12 +88,13 @@ by the network device and will be empty without that support. | |||
87 | SIOCSHWTSTAMP: | 88 | SIOCSHWTSTAMP: |
88 | 89 | ||
89 | Hardware time stamping must also be initialized for each device driver | 90 | Hardware time stamping must also be initialized for each device driver |
90 | that is expected to do hardware time stamping. The parameter is: | 91 | that is expected to do hardware time stamping. The parameter is defined in |
92 | /include/linux/net_tstamp.h as: | ||
91 | 93 | ||
92 | struct hwtstamp_config { | 94 | struct hwtstamp_config { |
93 | int flags; /* no flags defined right now, must be zero */ | 95 | int flags; /* no flags defined right now, must be zero */ |
94 | int tx_type; /* HWTSTAMP_TX_* */ | 96 | int tx_type; /* HWTSTAMP_TX_* */ |
95 | int rx_filter; /* HWTSTAMP_FILTER_* */ | 97 | int rx_filter; /* HWTSTAMP_FILTER_* */ |
96 | }; | 98 | }; |
97 | 99 | ||
98 | Desired behavior is passed into the kernel and to a specific device by | 100 | Desired behavior is passed into the kernel and to a specific device by |
@@ -139,42 +141,56 @@ enum { | |||
139 | /* time stamp any incoming packet */ | 141 | /* time stamp any incoming packet */ |
140 | HWTSTAMP_FILTER_ALL, | 142 | HWTSTAMP_FILTER_ALL, |
141 | 143 | ||
142 | /* return value: time stamp all packets requested plus some others */ | 144 | /* return value: time stamp all packets requested plus some others */ |
143 | HWTSTAMP_FILTER_SOME, | 145 | HWTSTAMP_FILTER_SOME, |
144 | 146 | ||
145 | /* PTP v1, UDP, any kind of event packet */ | 147 | /* PTP v1, UDP, any kind of event packet */ |
146 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, | 148 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, |
147 | 149 | ||
148 | ... | 150 | /* for the complete list of values, please check |
151 | * the include file /include/linux/net_tstamp.h | ||
152 | */ | ||
149 | }; | 153 | }; |
150 | 154 | ||
151 | 155 | ||
152 | DEVICE IMPLEMENTATION | 156 | DEVICE IMPLEMENTATION |
153 | 157 | ||
154 | A driver which supports hardware time stamping must support the | 158 | A driver which supports hardware time stamping must support the |
155 | SIOCSHWTSTAMP ioctl. Time stamps for received packets must be stored | 159 | SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with |
156 | in the skb with skb_hwtstamp_set(). | 160 | the actual values as described in the section on SIOCSHWTSTAMP. |
161 | |||
162 | Time stamps for received packets must be stored in the skb. To get a pointer | ||
163 | to the shared time stamp structure of the skb call skb_hwtstamps(). Then | ||
164 | set the time stamps in the structure: | ||
165 | |||
166 | struct skb_shared_hwtstamps { | ||
167 | /* hardware time stamp transformed into duration | ||
168 | * since arbitrary point in time | ||
169 | */ | ||
170 | ktime_t hwtstamp; | ||
171 | ktime_t syststamp; /* hwtstamp transformed to system time base */ | ||
172 | }; | ||
157 | 173 | ||
158 | Time stamps for outgoing packets are to be generated as follows: | 174 | Time stamps for outgoing packets are to be generated as follows: |
159 | - In hard_start_xmit(), check if skb_hwtstamp_check_tx_hardware() | 175 | - In hard_start_xmit(), check if skb_tx(skb)->hardware is set no-zero. |
160 | returns non-zero. If yes, then the driver is expected | 176 | If yes, then the driver is expected to do hardware time stamping. |
161 | to do hardware time stamping. | ||
162 | - If this is possible for the skb and requested, then declare | 177 | - If this is possible for the skb and requested, then declare |
163 | that the driver is doing the time stamping by calling | 178 | that the driver is doing the time stamping by setting the field |
164 | skb_hwtstamp_tx_in_progress(). A driver not supporting | 179 | skb_tx(skb)->in_progress non-zero. You might want to keep a pointer |
165 | hardware time stamping doesn't do that. A driver must never | 180 | to the associated skb for the next step and not free the skb. A driver |
166 | touch sk_buff::tstamp! It is used to store how time stamping | 181 | not supporting hardware time stamping doesn't do that. A driver must |
167 | for an outgoing packets is to be done. | 182 | never touch sk_buff::tstamp! It is used to store software generated |
183 | time stamps by the network subsystem. | ||
168 | - As soon as the driver has sent the packet and/or obtained a | 184 | - As soon as the driver has sent the packet and/or obtained a |
169 | hardware time stamp for it, it passes the time stamp back by | 185 | hardware time stamp for it, it passes the time stamp back by |
170 | calling skb_hwtstamp_tx() with the original skb, the raw | 186 | calling skb_hwtstamp_tx() with the original skb, the raw |
171 | hardware time stamp and a handle to the device (necessary | 187 | hardware time stamp. skb_hwtstamp_tx() clones the original skb and |
172 | to convert the hardware time stamp to system time). If obtaining | 188 | adds the timestamps, therefore the original skb has to be freed now. |
173 | the hardware time stamp somehow fails, then the driver should | 189 | If obtaining the hardware time stamp somehow fails, then the driver |
174 | not fall back to software time stamping. The rationale is that | 190 | should not fall back to software time stamping. The rationale is that |
175 | this would occur at a later time in the processing pipeline | 191 | this would occur at a later time in the processing pipeline than other |
176 | than other software time stamping and therefore could lead | 192 | software time stamping and therefore could lead to unexpected deltas |
177 | to unexpected deltas between time stamps. | 193 | between time stamps. |
178 | - If the driver did not call skb_hwtstamp_tx_in_progress(), then | 194 | - If the driver did not call set skb_tx(skb)->in_progress, then |
179 | dev_hard_start_xmit() checks whether software time stamping | 195 | dev_hard_start_xmit() checks whether software time stamping |
180 | is wanted as fallback and potentially generates the time stamp. | 196 | is wanted as fallback and potentially generates the time stamp. |
diff --git a/Documentation/networking/timestamping/Makefile b/Documentation/networking/timestamping/Makefile index 2a1489fdc036..e79973443e9f 100644 --- a/Documentation/networking/timestamping/Makefile +++ b/Documentation/networking/timestamping/Makefile | |||
@@ -1,6 +1,13 @@ | |||
1 | CPPFLAGS = -I../../../include | 1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. |
2 | obj- := dummy.o | ||
2 | 3 | ||
3 | timestamping: timestamping.c | 4 | # List of programs to build |
5 | hostprogs-y := timestamping | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
9 | |||
10 | HOSTCFLAGS_timestamping.o += -I$(objtree)/usr/include | ||
4 | 11 | ||
5 | clean: | 12 | clean: |
6 | rm -f timestamping | 13 | rm -f timestamping |
diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c index a7936fe8444a..8ba82bfe6a33 100644 --- a/Documentation/networking/timestamping/timestamping.c +++ b/Documentation/networking/timestamping/timestamping.c | |||
@@ -41,9 +41,9 @@ | |||
41 | #include <arpa/inet.h> | 41 | #include <arpa/inet.h> |
42 | #include <net/if.h> | 42 | #include <net/if.h> |
43 | 43 | ||
44 | #include "asm/types.h" | 44 | #include <asm/types.h> |
45 | #include "linux/net_tstamp.h" | 45 | #include <linux/net_tstamp.h> |
46 | #include "linux/errqueue.h" | 46 | #include <linux/errqueue.h> |
47 | 47 | ||
48 | #ifndef SO_TIMESTAMPING | 48 | #ifndef SO_TIMESTAMPING |
49 | # define SO_TIMESTAMPING 37 | 49 | # define SO_TIMESTAMPING 37 |
@@ -164,7 +164,7 @@ static void printpacket(struct msghdr *msg, int res, | |||
164 | 164 | ||
165 | gettimeofday(&now, 0); | 165 | gettimeofday(&now, 0); |
166 | 166 | ||
167 | printf("%ld.%06ld: received %s data, %d bytes from %s, %d bytes control messages\n", | 167 | printf("%ld.%06ld: received %s data, %d bytes from %s, %zu bytes control messages\n", |
168 | (long)now.tv_sec, (long)now.tv_usec, | 168 | (long)now.tv_sec, (long)now.tv_usec, |
169 | (recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular", | 169 | (recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular", |
170 | res, | 170 | res, |
@@ -173,7 +173,7 @@ static void printpacket(struct msghdr *msg, int res, | |||
173 | for (cmsg = CMSG_FIRSTHDR(msg); | 173 | for (cmsg = CMSG_FIRSTHDR(msg); |
174 | cmsg; | 174 | cmsg; |
175 | cmsg = CMSG_NXTHDR(msg, cmsg)) { | 175 | cmsg = CMSG_NXTHDR(msg, cmsg)) { |
176 | printf(" cmsg len %d: ", cmsg->cmsg_len); | 176 | printf(" cmsg len %zu: ", cmsg->cmsg_len); |
177 | switch (cmsg->cmsg_level) { | 177 | switch (cmsg->cmsg_level) { |
178 | case SOL_SOCKET: | 178 | case SOL_SOCKET: |
179 | printf("SOL_SOCKET "); | 179 | printf("SOL_SOCKET "); |
@@ -370,7 +370,7 @@ int main(int argc, char **argv) | |||
370 | } | 370 | } |
371 | 371 | ||
372 | sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); | 372 | sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); |
373 | if (socket < 0) | 373 | if (sock < 0) |
374 | bail("socket"); | 374 | bail("socket"); |
375 | 375 | ||
376 | memset(&device, 0, sizeof(device)); | 376 | memset(&device, 0, sizeof(device)); |
diff --git a/Documentation/networking/tlan.txt b/Documentation/networking/tlan.txt index 7e6aa5b20c37..34550dfcef74 100644 --- a/Documentation/networking/tlan.txt +++ b/Documentation/networking/tlan.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | (C) 1998 James Banks | 2 | (C) 1998 James Banks |
3 | (C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com> | 3 | (C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com> |
4 | 4 | ||
5 | For driver information/updates visit http://opensource.compaq.com | 5 | For driver information/updates visit http://www.compaq.com |
6 | 6 | ||
7 | 7 | ||
8 | TLAN driver for Linux, version 1.14a | 8 | TLAN driver for Linux, version 1.14a |
@@ -113,5 +113,5 @@ III. Things to try if you have problems. | |||
113 | 113 | ||
114 | There is also a tlan mailing list which you can join by sending "subscribe tlan" | 114 | There is also a tlan mailing list which you can join by sending "subscribe tlan" |
115 | in the body of an email to majordomo@vuser.vu.union.edu. | 115 | in the body of an email to majordomo@vuser.vu.union.edu. |
116 | There is also a tlan website at http://opensource.compaq.com | 116 | There is also a tlan website at http://www.compaq.com |
117 | 117 | ||
diff --git a/Documentation/networking/udplite.txt b/Documentation/networking/udplite.txt index 855d8da57a23..d727a3829100 100644 --- a/Documentation/networking/udplite.txt +++ b/Documentation/networking/udplite.txt | |||
@@ -11,11 +11,13 @@ | |||
11 | This file briefly describes the existing kernel support and the socket API. | 11 | This file briefly describes the existing kernel support and the socket API. |
12 | For in-depth information, you can consult: | 12 | For in-depth information, you can consult: |
13 | 13 | ||
14 | o The UDP-Lite Homepage: http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ | 14 | o The UDP-Lite Homepage: |
15 | http://web.archive.org/web/*/http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ | ||
15 | From here you can also download some example application source code. | 16 | From here you can also download some example application source code. |
16 | 17 | ||
17 | o The UDP-Lite HOWTO on | 18 | o The UDP-Lite HOWTO on |
18 | http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/UDP-Lite-HOWTO.txt | 19 | http://web.archive.org/web/*/http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ |
20 | files/UDP-Lite-HOWTO.txt | ||
19 | 21 | ||
20 | o The Wireshark UDP-Lite WiKi (with capture files): | 22 | o The Wireshark UDP-Lite WiKi (with capture files): |
21 | http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol | 23 | http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol |
@@ -26,12 +28,7 @@ | |||
26 | I) APPLICATIONS | 28 | I) APPLICATIONS |
27 | 29 | ||
28 | Several applications have been ported successfully to UDP-Lite. Ethereal | 30 | Several applications have been ported successfully to UDP-Lite. Ethereal |
29 | (now called wireshark) has UDP-Litev4/v6 support by default. The tarball on | 31 | (now called wireshark) has UDP-Litev4/v6 support by default. |
30 | |||
31 | http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/udplite_linux.tar.gz | ||
32 | |||
33 | has source code for several v4/v6 client-server and network testing examples. | ||
34 | |||
35 | Porting applications to UDP-Lite is straightforward: only socket level and | 32 | Porting applications to UDP-Lite is straightforward: only socket level and |
36 | IPPROTO need to be changed; senders additionally set the checksum coverage | 33 | IPPROTO need to be changed; senders additionally set the checksum coverage |
37 | length (default = header length = 8). Details are in the next section. | 34 | length (default = header length = 8). Details are in the next section. |
diff --git a/Documentation/networking/wavelan.txt b/Documentation/networking/wavelan.txt deleted file mode 100644 index afa6e521c685..000000000000 --- a/Documentation/networking/wavelan.txt +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | The Wavelan drivers saga | ||
2 | ------------------------ | ||
3 | |||
4 | By Jean Tourrilhes <jt@hpl.hp.com> | ||
5 | |||
6 | The Wavelan is a Radio network adapter designed by | ||
7 | Lucent. Under this generic name is hidden quite a variety of hardware, | ||
8 | and many Linux driver to support it. | ||
9 | The get the full story on Wireless LANs, please consult : | ||
10 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ | ||
11 | |||
12 | "wavelan" driver (old ISA Wavelan) | ||
13 | ---------------- | ||
14 | o Config : Network device -> Wireless LAN -> AT&T WaveLAN | ||
15 | o Location : .../drivers/net/wireless/wavelan* | ||
16 | o in-line doc : .../drivers/net/wireless/wavelan.p.h | ||
17 | o on-line doc : | ||
18 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html | ||
19 | |||
20 | This is the driver for the ISA version of the first generation | ||
21 | of the Wavelan, now discontinued. The device is 2 Mb/s, composed of a | ||
22 | Intel 82586 controller and a Lucent Modem, and is NOT 802.11 compliant. | ||
23 | The driver has been tested with the following hardware : | ||
24 | o Wavelan ISA 915 MHz (full length ISA card) | ||
25 | o Wavelan ISA 915 MHz 2.0 (half length ISA card) | ||
26 | o Wavelan ISA 2.4 GHz (full length ISA card, fixed frequency) | ||
27 | o Wavelan ISA 2.4 GHz 2.0 (half length ISA card, frequency selectable) | ||
28 | o Above cards with the optional DES encryption feature | ||
29 | |||
30 | "wavelan_cs" driver (old Pcmcia Wavelan) | ||
31 | ------------------- | ||
32 | o Config : Network device -> PCMCIA network -> | ||
33 | Pcmcia Wireless LAN -> AT&T/Lucent WaveLAN | ||
34 | o Location : .../drivers/net/pcmcia/wavelan* | ||
35 | o in-line doc : .../drivers/net/pcmcia/wavelan_cs.h | ||
36 | o on-line doc : | ||
37 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html | ||
38 | |||
39 | This is the driver for the PCMCIA version of the first | ||
40 | generation of the Wavelan, now discontinued. The device is 2 Mb/s, | ||
41 | composed of a Intel 82593 controller (totally different from the 82586) | ||
42 | and a Lucent Modem, and NOT 802.11 compatible. | ||
43 | The driver has been tested with the following hardware : | ||
44 | o Wavelan Pcmcia 915 MHz 2.0 (Pcmcia card + separate | ||
45 | modem/antenna block) | ||
46 | o Wavelan Pcmcia 2.4 GHz 2.0 (Pcmcia card + separate | ||
47 | modem/antenna block) | ||
48 | |||
49 | "wvlan_cs" driver (Wavelan IEEE, GPL) | ||
50 | ----------------- | ||
51 | o Config : Not yet in kernel | ||
52 | o Location : Pcmcia package 3.1.10+ | ||
53 | o on-line doc : http://www.fasta.fh-dortmund.de/users/andy/wvlan/ | ||
54 | |||
55 | This is the driver for the current generation of Wavelan IEEE, | ||
56 | which is 802.11 compatible. Depending on version, it is 2 Mb/s or 11 | ||
57 | Mb/s, with or without encryption, all implemented in Lucent specific | ||
58 | DSP (the Hermes). | ||
59 | This is a GPL full source PCMCIA driver (ISA is just a Pcmcia | ||
60 | card with ISA-Pcmcia bridge). | ||
61 | |||
62 | "wavelan2_cs" driver (Wavelan IEEE, binary) | ||
63 | -------------------- | ||
64 | o Config : Not yet in kernel | ||
65 | o Location : ftp://sourceforge.org/pcmcia/contrib/ | ||
66 | |||
67 | This driver support exactly the same hardware as the previous | ||
68 | driver, the main difference is that it is based on a binary library | ||
69 | and supported by Lucent. | ||
70 | |||
71 | I hope it clears the confusion ;-) | ||
72 | |||
73 | Jean | ||
diff --git a/Documentation/networking/x25-iface.txt b/Documentation/networking/x25-iface.txt index 975cc87ebdd1..78f662ee0622 100644 --- a/Documentation/networking/x25-iface.txt +++ b/Documentation/networking/x25-iface.txt | |||
@@ -20,23 +20,23 @@ the rest of the skbuff, if any more information does exist. | |||
20 | Packet Layer to Device Driver | 20 | Packet Layer to Device Driver |
21 | ----------------------------- | 21 | ----------------------------- |
22 | 22 | ||
23 | First Byte = 0x00 | 23 | First Byte = 0x00 (X25_IFACE_DATA) |
24 | 24 | ||
25 | This indicates that the rest of the skbuff contains data to be transmitted | 25 | This indicates that the rest of the skbuff contains data to be transmitted |
26 | over the LAPB link. The LAPB link should already exist before any data is | 26 | over the LAPB link. The LAPB link should already exist before any data is |
27 | passed down. | 27 | passed down. |
28 | 28 | ||
29 | First Byte = 0x01 | 29 | First Byte = 0x01 (X25_IFACE_CONNECT) |
30 | 30 | ||
31 | Establish the LAPB link. If the link is already established then the connect | 31 | Establish the LAPB link. If the link is already established then the connect |
32 | confirmation message should be returned as soon as possible. | 32 | confirmation message should be returned as soon as possible. |
33 | 33 | ||
34 | First Byte = 0x02 | 34 | First Byte = 0x02 (X25_IFACE_DISCONNECT) |
35 | 35 | ||
36 | Terminate the LAPB link. If it is already disconnected then the disconnect | 36 | Terminate the LAPB link. If it is already disconnected then the disconnect |
37 | confirmation message should be returned as soon as possible. | 37 | confirmation message should be returned as soon as possible. |
38 | 38 | ||
39 | First Byte = 0x03 | 39 | First Byte = 0x03 (X25_IFACE_PARAMS) |
40 | 40 | ||
41 | LAPB parameters. To be defined. | 41 | LAPB parameters. To be defined. |
42 | 42 | ||
@@ -44,22 +44,22 @@ LAPB parameters. To be defined. | |||
44 | Device Driver to Packet Layer | 44 | Device Driver to Packet Layer |
45 | ----------------------------- | 45 | ----------------------------- |
46 | 46 | ||
47 | First Byte = 0x00 | 47 | First Byte = 0x00 (X25_IFACE_DATA) |
48 | 48 | ||
49 | This indicates that the rest of the skbuff contains data that has been | 49 | This indicates that the rest of the skbuff contains data that has been |
50 | received over the LAPB link. | 50 | received over the LAPB link. |
51 | 51 | ||
52 | First Byte = 0x01 | 52 | First Byte = 0x01 (X25_IFACE_CONNECT) |
53 | 53 | ||
54 | LAPB link has been established. The same message is used for both a LAPB | 54 | LAPB link has been established. The same message is used for both a LAPB |
55 | link connect_confirmation and a connect_indication. | 55 | link connect_confirmation and a connect_indication. |
56 | 56 | ||
57 | First Byte = 0x02 | 57 | First Byte = 0x02 (X25_IFACE_DISCONNECT) |
58 | 58 | ||
59 | LAPB link has been terminated. This same message is used for both a LAPB | 59 | LAPB link has been terminated. This same message is used for both a LAPB |
60 | link disconnect_confirmation and a disconnect_indication. | 60 | link disconnect_confirmation and a disconnect_indication. |
61 | 61 | ||
62 | First Byte = 0x03 | 62 | First Byte = 0x03 (X25_IFACE_PARAMS) |
63 | 63 | ||
64 | LAPB parameters. To be defined. | 64 | LAPB parameters. To be defined. |
65 | 65 | ||