diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /Documentation/networking | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'Documentation/networking')
39 files changed, 475 insertions, 1702 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX index 2cc3c7733a2..bbce1215434 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -1,5 +1,7 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - this file | 2 | - this file |
3 | 3c359.txt | ||
4 | - information on the 3Com TokenLink Velocity XL (3c5359) driver. | ||
3 | 3c505.txt | 5 | 3c505.txt |
4 | - information on the 3Com EtherLink Plus (3c505) driver. | 6 | - information on the 3Com EtherLink Plus (3c505) driver. |
5 | 3c509.txt | 7 | 3c509.txt |
@@ -140,8 +142,8 @@ netif-msg.txt | |||
140 | - Design of the network interface message level setting (NETIF_MSG_*). | 142 | - Design of the network interface message level setting (NETIF_MSG_*). |
141 | nfc.txt | 143 | nfc.txt |
142 | - The Linux Near Field Communication (NFS) subsystem. | 144 | - The Linux Near Field Communication (NFS) subsystem. |
143 | openvswitch.txt | 145 | olympic.txt |
144 | - Open vSwitch developer documentation. | 146 | - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info. |
145 | operstates.txt | 147 | operstates.txt |
146 | - Overview of network interface operational states. | 148 | - Overview of network interface operational states. |
147 | packet_mmap.txt | 149 | packet_mmap.txt |
@@ -180,6 +182,8 @@ skfp.txt | |||
180 | - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. | 182 | - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. |
181 | smc9.txt | 183 | smc9.txt |
182 | - the driver for SMC's 9000 series of Ethernet cards | 184 | - the driver for SMC's 9000 series of Ethernet cards |
185 | smctr.txt | ||
186 | - SMC TokenCard TokenRing Linux driver info. | ||
183 | spider-net.txt | 187 | spider-net.txt |
184 | - README for the Spidernet Driver (as found in PS3 / Cell BE). | 188 | - README for the Spidernet Driver (as found in PS3 / Cell BE). |
185 | stmmac.txt | 189 | stmmac.txt |
@@ -194,6 +198,8 @@ tcp-thin.txt | |||
194 | - kernel tuning options for low rate 'thin' TCP streams. | 198 | - kernel tuning options for low rate 'thin' TCP streams. |
195 | tlan.txt | 199 | tlan.txt |
196 | - ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info. | 200 | - ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info. |
201 | tms380tr.txt | ||
202 | - SysKonnect Token Ring ISA/PCI adapter driver info. | ||
197 | tproxy.txt | 203 | tproxy.txt |
198 | - Transparent proxy support user guide. | 204 | - Transparent proxy support user guide. |
199 | tuntap.txt | 205 | tuntap.txt |
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt index fbf722e15ac..dcc9eaf5939 100644 --- a/Documentation/networking/3c509.txt +++ b/Documentation/networking/3c509.txt | |||
@@ -25,6 +25,7 @@ models: | |||
25 | 3c509B (later revision of the ISA card; supports full-duplex) | 25 | 3c509B (later revision of the ISA card; supports full-duplex) |
26 | 3c589 (PCMCIA) | 26 | 3c589 (PCMCIA) |
27 | 3c589B (later revision of the 3c589; supports full-duplex) | 27 | 3c589B (later revision of the 3c589; supports full-duplex) |
28 | 3c529 (MCA) | ||
28 | 3c579 (EISA) | 29 | 3c579 (EISA) |
29 | 30 | ||
30 | Large portions of this documentation were heavily borrowed from the guide | 31 | Large portions of this documentation were heavily borrowed from the guide |
diff --git a/Documentation/networking/LICENSE.qlcnic b/Documentation/networking/LICENSE.qlcnic index e7fb2c6023b..29ad4b10642 100644 --- a/Documentation/networking/LICENSE.qlcnic +++ b/Documentation/networking/LICENSE.qlcnic | |||
@@ -1,22 +1,61 @@ | |||
1 | Copyright (c) 2009-2011 QLogic Corporation | 1 | Copyright (c) 2009-2010 QLogic Corporation |
2 | QLogic Linux qlcnic NIC Driver | 2 | QLogic Linux qlcnic NIC Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 2.6 that may be | ||
5 | distributed with QLogic hardware specific firmware binary file. | ||
4 | You may modify and redistribute the device driver code under the | 6 | You may modify and redistribute the device driver code under the |
5 | GNU General Public License (a copy of which is attached hereto as | 7 | GNU General Public License (a copy of which is attached hereto as |
6 | Exhibit A) published by the Free Software Foundation (version 2). | 8 | Exhibit A) published by the Free Software Foundation (version 2). |
7 | 9 | ||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
46 | |||
8 | 47 | ||
9 | EXHIBIT A | 48 | EXHIBIT A |
10 | 49 | ||
11 | GNU GENERAL PUBLIC LICENSE | 50 | GNU GENERAL PUBLIC LICENSE |
12 | Version 2, June 1991 | 51 | Version 2, June 1991 |
13 | 52 | ||
14 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | 53 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
15 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 54 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
16 | Everyone is permitted to copy and distribute verbatim copies | 55 | Everyone is permitted to copy and distribute verbatim copies |
17 | of this license document, but changing it is not allowed. | 56 | of this license document, but changing it is not allowed. |
18 | 57 | ||
19 | Preamble | 58 | Preamble |
20 | 59 | ||
21 | The licenses for most software are designed to take away your | 60 | The licenses for most software are designed to take away your |
22 | freedom to share and change it. By contrast, the GNU General Public | 61 | freedom to share and change it. By contrast, the GNU General Public |
@@ -66,7 +105,7 @@ patent must be licensed for everyone's free use or not licensed at all. | |||
66 | The precise terms and conditions for copying, distribution and | 105 | The precise terms and conditions for copying, distribution and |
67 | modification follow. | 106 | modification follow. |
68 | 107 | ||
69 | GNU GENERAL PUBLIC LICENSE | 108 | GNU GENERAL PUBLIC LICENSE |
70 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | 109 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
71 | 110 | ||
72 | 0. This License applies to any program or other work which contains | 111 | 0. This License applies to any program or other work which contains |
@@ -265,7 +304,7 @@ make exceptions for this. Our decision will be guided by the two goals | |||
265 | of preserving the free status of all derivatives of our free software and | 304 | of preserving the free status of all derivatives of our free software and |
266 | of promoting the sharing and reuse of software generally. | 305 | of promoting the sharing and reuse of software generally. |
267 | 306 | ||
268 | NO WARRANTY | 307 | NO WARRANTY |
269 | 308 | ||
270 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | 309 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
271 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | 310 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
diff --git a/Documentation/networking/LICENSE.qlge b/Documentation/networking/LICENSE.qlge index ce64e4d15b2..123b6edd7f1 100644 --- a/Documentation/networking/LICENSE.qlge +++ b/Documentation/networking/LICENSE.qlge | |||
@@ -1,288 +1,46 @@ | |||
1 | Copyright (c) 2003-2011 QLogic Corporation | 1 | Copyright (c) 2003-2008 QLogic Corporation |
2 | QLogic Linux qlge NIC Driver | 2 | QLogic Linux Networking HBA Driver |
3 | 3 | ||
4 | This program includes a device driver for Linux 2.6 that may be | ||
5 | distributed with QLogic hardware specific firmware binary file. | ||
4 | You may modify and redistribute the device driver code under the | 6 | You may modify and redistribute the device driver code under the |
5 | GNU General Public License (a copy of which is attached hereto as | 7 | GNU General Public License as published by the Free Software |
6 | Exhibit A) published by the Free Software Foundation (version 2). | 8 | Foundation (version 2 or a later version). |
9 | |||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
7 | 46 | ||
8 | |||
9 | EXHIBIT A | ||
10 | |||
11 | GNU GENERAL PUBLIC LICENSE | ||
12 | Version 2, June 1991 | ||
13 | |||
14 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
15 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
16 | Everyone is permitted to copy and distribute verbatim copies | ||
17 | of this license document, but changing it is not allowed. | ||
18 | |||
19 | Preamble | ||
20 | |||
21 | The licenses for most software are designed to take away your | ||
22 | freedom to share and change it. By contrast, the GNU General Public | ||
23 | License is intended to guarantee your freedom to share and change free | ||
24 | software--to make sure the software is free for all its users. This | ||
25 | General Public License applies to most of the Free Software | ||
26 | Foundation's software and to any other program whose authors commit to | ||
27 | using it. (Some other Free Software Foundation software is covered by | ||
28 | the GNU Lesser General Public License instead.) You can apply it to | ||
29 | your programs, too. | ||
30 | |||
31 | When we speak of free software, we are referring to freedom, not | ||
32 | price. Our General Public Licenses are designed to make sure that you | ||
33 | have the freedom to distribute copies of free software (and charge for | ||
34 | this service if you wish), that you receive source code or can get it | ||
35 | if you want it, that you can change the software or use pieces of it | ||
36 | in new free programs; and that you know you can do these things. | ||
37 | |||
38 | To protect your rights, we need to make restrictions that forbid | ||
39 | anyone to deny you these rights or to ask you to surrender the rights. | ||
40 | These restrictions translate to certain responsibilities for you if you | ||
41 | distribute copies of the software, or if you modify it. | ||
42 | |||
43 | For example, if you distribute copies of such a program, whether | ||
44 | gratis or for a fee, you must give the recipients all the rights that | ||
45 | you have. You must make sure that they, too, receive or can get the | ||
46 | source code. And you must show them these terms so they know their | ||
47 | rights. | ||
48 | |||
49 | We protect your rights with two steps: (1) copyright the software, and | ||
50 | (2) offer you this license which gives you legal permission to copy, | ||
51 | distribute and/or modify the software. | ||
52 | |||
53 | Also, for each author's protection and ours, we want to make certain | ||
54 | that everyone understands that there is no warranty for this free | ||
55 | software. If the software is modified by someone else and passed on, we | ||
56 | want its recipients to know that what they have is not the original, so | ||
57 | that any problems introduced by others will not reflect on the original | ||
58 | authors' reputations. | ||
59 | |||
60 | Finally, any free program is threatened constantly by software | ||
61 | patents. We wish to avoid the danger that redistributors of a free | ||
62 | program will individually obtain patent licenses, in effect making the | ||
63 | program proprietary. To prevent this, we have made it clear that any | ||
64 | patent must be licensed for everyone's free use or not licensed at all. | ||
65 | |||
66 | The precise terms and conditions for copying, distribution and | ||
67 | modification follow. | ||
68 | |||
69 | GNU GENERAL PUBLIC LICENSE | ||
70 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
71 | |||
72 | 0. This License applies to any program or other work which contains | ||
73 | a notice placed by the copyright holder saying it may be distributed | ||
74 | under the terms of this General Public License. The "Program", below, | ||
75 | refers to any such program or work, and a "work based on the Program" | ||
76 | means either the Program or any derivative work under copyright law: | ||
77 | that is to say, a work containing the Program or a portion of it, | ||
78 | either verbatim or with modifications and/or translated into another | ||
79 | language. (Hereinafter, translation is included without limitation in | ||
80 | the term "modification".) Each licensee is addressed as "you". | ||
81 | |||
82 | Activities other than copying, distribution and modification are not | ||
83 | covered by this License; they are outside its scope. The act of | ||
84 | running the Program is not restricted, and the output from the Program | ||
85 | is covered only if its contents constitute a work based on the | ||
86 | Program (independent of having been made by running the Program). | ||
87 | Whether that is true depends on what the Program does. | ||
88 | |||
89 | 1. You may copy and distribute verbatim copies of the Program's | ||
90 | source code as you receive it, in any medium, provided that you | ||
91 | conspicuously and appropriately publish on each copy an appropriate | ||
92 | copyright notice and disclaimer of warranty; keep intact all the | ||
93 | notices that refer to this License and to the absence of any warranty; | ||
94 | and give any other recipients of the Program a copy of this License | ||
95 | along with the Program. | ||
96 | |||
97 | You may charge a fee for the physical act of transferring a copy, and | ||
98 | you may at your option offer warranty protection in exchange for a fee. | ||
99 | |||
100 | 2. You may modify your copy or copies of the Program or any portion | ||
101 | of it, thus forming a work based on the Program, and copy and | ||
102 | distribute such modifications or work under the terms of Section 1 | ||
103 | above, provided that you also meet all of these conditions: | ||
104 | |||
105 | a) You must cause the modified files to carry prominent notices | ||
106 | stating that you changed the files and the date of any change. | ||
107 | |||
108 | b) You must cause any work that you distribute or publish, that in | ||
109 | whole or in part contains or is derived from the Program or any | ||
110 | part thereof, to be licensed as a whole at no charge to all third | ||
111 | parties under the terms of this License. | ||
112 | |||
113 | c) If the modified program normally reads commands interactively | ||
114 | when run, you must cause it, when started running for such | ||
115 | interactive use in the most ordinary way, to print or display an | ||
116 | announcement including an appropriate copyright notice and a | ||
117 | notice that there is no warranty (or else, saying that you provide | ||
118 | a warranty) and that users may redistribute the program under | ||
119 | these conditions, and telling the user how to view a copy of this | ||
120 | License. (Exception: if the Program itself is interactive but | ||
121 | does not normally print such an announcement, your work based on | ||
122 | the Program is not required to print an announcement.) | ||
123 | |||
124 | These requirements apply to the modified work as a whole. If | ||
125 | identifiable sections of that work are not derived from the Program, | ||
126 | and can be reasonably considered independent and separate works in | ||
127 | themselves, then this License, and its terms, do not apply to those | ||
128 | sections when you distribute them as separate works. But when you | ||
129 | distribute the same sections as part of a whole which is a work based | ||
130 | on the Program, the distribution of the whole must be on the terms of | ||
131 | this License, whose permissions for other licensees extend to the | ||
132 | entire whole, and thus to each and every part regardless of who wrote it. | ||
133 | |||
134 | Thus, it is not the intent of this section to claim rights or contest | ||
135 | your rights to work written entirely by you; rather, the intent is to | ||
136 | exercise the right to control the distribution of derivative or | ||
137 | collective works based on the Program. | ||
138 | |||
139 | In addition, mere aggregation of another work not based on the Program | ||
140 | with the Program (or with a work based on the Program) on a volume of | ||
141 | a storage or distribution medium does not bring the other work under | ||
142 | the scope of this License. | ||
143 | |||
144 | 3. You may copy and distribute the Program (or a work based on it, | ||
145 | under Section 2) in object code or executable form under the terms of | ||
146 | Sections 1 and 2 above provided that you also do one of the following: | ||
147 | |||
148 | a) Accompany it with the complete corresponding machine-readable | ||
149 | source code, which must be distributed under the terms of Sections | ||
150 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
151 | |||
152 | b) Accompany it with a written offer, valid for at least three | ||
153 | years, to give any third party, for a charge no more than your | ||
154 | cost of physically performing source distribution, a complete | ||
155 | machine-readable copy of the corresponding source code, to be | ||
156 | distributed under the terms of Sections 1 and 2 above on a medium | ||
157 | customarily used for software interchange; or, | ||
158 | |||
159 | c) Accompany it with the information you received as to the offer | ||
160 | to distribute corresponding source code. (This alternative is | ||
161 | allowed only for noncommercial distribution and only if you | ||
162 | received the program in object code or executable form with such | ||
163 | an offer, in accord with Subsection b above.) | ||
164 | |||
165 | The source code for a work means the preferred form of the work for | ||
166 | making modifications to it. For an executable work, complete source | ||
167 | code means all the source code for all modules it contains, plus any | ||
168 | associated interface definition files, plus the scripts used to | ||
169 | control compilation and installation of the executable. However, as a | ||
170 | special exception, the source code distributed need not include | ||
171 | anything that is normally distributed (in either source or binary | ||
172 | form) with the major components (compiler, kernel, and so on) of the | ||
173 | operating system on which the executable runs, unless that component | ||
174 | itself accompanies the executable. | ||
175 | |||
176 | If distribution of executable or object code is made by offering | ||
177 | access to copy from a designated place, then offering equivalent | ||
178 | access to copy the source code from the same place counts as | ||
179 | distribution of the source code, even though third parties are not | ||
180 | compelled to copy the source along with the object code. | ||
181 | |||
182 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
183 | except as expressly provided under this License. Any attempt | ||
184 | otherwise to copy, modify, sublicense or distribute the Program is | ||
185 | void, and will automatically terminate your rights under this License. | ||
186 | However, parties who have received copies, or rights, from you under | ||
187 | this License will not have their licenses terminated so long as such | ||
188 | parties remain in full compliance. | ||
189 | |||
190 | 5. You are not required to accept this License, since you have not | ||
191 | signed it. However, nothing else grants you permission to modify or | ||
192 | distribute the Program or its derivative works. These actions are | ||
193 | prohibited by law if you do not accept this License. Therefore, by | ||
194 | modifying or distributing the Program (or any work based on the | ||
195 | Program), you indicate your acceptance of this License to do so, and | ||
196 | all its terms and conditions for copying, distributing or modifying | ||
197 | the Program or works based on it. | ||
198 | |||
199 | 6. Each time you redistribute the Program (or any work based on the | ||
200 | Program), the recipient automatically receives a license from the | ||
201 | original licensor to copy, distribute or modify the Program subject to | ||
202 | these terms and conditions. You may not impose any further | ||
203 | restrictions on the recipients' exercise of the rights granted herein. | ||
204 | You are not responsible for enforcing compliance by third parties to | ||
205 | this License. | ||
206 | |||
207 | 7. If, as a consequence of a court judgment or allegation of patent | ||
208 | infringement or for any other reason (not limited to patent issues), | ||
209 | conditions are imposed on you (whether by court order, agreement or | ||
210 | otherwise) that contradict the conditions of this License, they do not | ||
211 | excuse you from the conditions of this License. If you cannot | ||
212 | distribute so as to satisfy simultaneously your obligations under this | ||
213 | License and any other pertinent obligations, then as a consequence you | ||
214 | may not distribute the Program at all. For example, if a patent | ||
215 | license would not permit royalty-free redistribution of the Program by | ||
216 | all those who receive copies directly or indirectly through you, then | ||
217 | the only way you could satisfy both it and this License would be to | ||
218 | refrain entirely from distribution of the Program. | ||
219 | |||
220 | If any portion of this section is held invalid or unenforceable under | ||
221 | any particular circumstance, the balance of the section is intended to | ||
222 | apply and the section as a whole is intended to apply in other | ||
223 | circumstances. | ||
224 | |||
225 | It is not the purpose of this section to induce you to infringe any | ||
226 | patents or other property right claims or to contest validity of any | ||
227 | such claims; this section has the sole purpose of protecting the | ||
228 | integrity of the free software distribution system, which is | ||
229 | implemented by public license practices. Many people have made | ||
230 | generous contributions to the wide range of software distributed | ||
231 | through that system in reliance on consistent application of that | ||
232 | system; it is up to the author/donor to decide if he or she is willing | ||
233 | to distribute software through any other system and a licensee cannot | ||
234 | impose that choice. | ||
235 | |||
236 | This section is intended to make thoroughly clear what is believed to | ||
237 | be a consequence of the rest of this License. | ||
238 | |||
239 | 8. If the distribution and/or use of the Program is restricted in | ||
240 | certain countries either by patents or by copyrighted interfaces, the | ||
241 | original copyright holder who places the Program under this License | ||
242 | may add an explicit geographical distribution limitation excluding | ||
243 | those countries, so that distribution is permitted only in or among | ||
244 | countries not thus excluded. In such case, this License incorporates | ||
245 | the limitation as if written in the body of this License. | ||
246 | |||
247 | 9. The Free Software Foundation may publish revised and/or new versions | ||
248 | of the General Public License from time to time. Such new versions will | ||
249 | be similar in spirit to the present version, but may differ in detail to | ||
250 | address new problems or concerns. | ||
251 | |||
252 | Each version is given a distinguishing version number. If the Program | ||
253 | specifies a version number of this License which applies to it and "any | ||
254 | later version", you have the option of following the terms and conditions | ||
255 | either of that version or of any later version published by the Free | ||
256 | Software Foundation. If the Program does not specify a version number of | ||
257 | this License, you may choose any version ever published by the Free Software | ||
258 | Foundation. | ||
259 | |||
260 | 10. If you wish to incorporate parts of the Program into other free | ||
261 | programs whose distribution conditions are different, write to the author | ||
262 | to ask for permission. For software which is copyrighted by the Free | ||
263 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
264 | make exceptions for this. Our decision will be guided by the two goals | ||
265 | of preserving the free status of all derivatives of our free software and | ||
266 | of promoting the sharing and reuse of software generally. | ||
267 | |||
268 | NO WARRANTY | ||
269 | |||
270 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
271 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
272 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
273 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
274 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
275 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
276 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
277 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
278 | REPAIR OR CORRECTION. | ||
279 | |||
280 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
281 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
282 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
283 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
284 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
285 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
286 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
287 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
288 | POSSIBILITY OF SUCH DAMAGES. | ||
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt index c1d82047a4b..88d4afbdef9 100644 --- a/Documentation/networking/batman-adv.txt +++ b/Documentation/networking/batman-adv.txt | |||
@@ -1,3 +1,5 @@ | |||
1 | [state: 17-04-2011] | ||
2 | |||
1 | BATMAN-ADV | 3 | BATMAN-ADV |
2 | ---------- | 4 | ---------- |
3 | 5 | ||
@@ -65,20 +67,18 @@ To deactivate an interface you have to write "none" into its | |||
65 | All mesh wide settings can be found in batman's own interface | 67 | All mesh wide settings can be found in batman's own interface |
66 | folder: | 68 | folder: |
67 | 69 | ||
68 | # ls /sys/class/net/bat0/mesh/ | 70 | # ls /sys/class/net/bat0/mesh/ |
69 | # aggregated_ogms gw_bandwidth log_level | 71 | # aggregated_ogms gw_bandwidth hop_penalty |
70 | # ap_isolation gw_mode orig_interval | 72 | # bonding gw_mode orig_interval |
71 | # bonding gw_sel_class routing_algo | 73 | # fragmentation gw_sel_class vis_mode |
72 | # bridge_loop_avoidance hop_penalty vis_mode | ||
73 | # fragmentation | ||
74 | 74 | ||
75 | 75 | ||
76 | There is a special folder for debugging information: | 76 | There is a special folder for debugging information: |
77 | 77 | ||
78 | # ls /sys/kernel/debug/batman_adv/bat0/ | 78 | # ls /sys/kernel/debug/batman_adv/bat0/ |
79 | # bla_backbone_table log transtable_global | 79 | # gateways socket transtable_global vis_data |
80 | # bla_claim_table originators transtable_local | 80 | # originators softif_neigh transtable_local |
81 | # gateways socket vis_data | 81 | |
82 | 82 | ||
83 | Some of the files contain all sort of status information regard- | 83 | Some of the files contain all sort of status information regard- |
84 | ing the mesh network. For example, you can view the table of | 84 | ing the mesh network. For example, you can view the table of |
@@ -200,23 +200,15 @@ abled during run time. Following log_levels are defined: | |||
200 | 200 | ||
201 | 0 - All debug output disabled | 201 | 0 - All debug output disabled |
202 | 1 - Enable messages related to routing / flooding / broadcasting | 202 | 1 - Enable messages related to routing / flooding / broadcasting |
203 | 2 - Enable messages related to route added / changed / deleted | 203 | 2 - Enable route or tt entry added / changed / deleted |
204 | 4 - Enable messages related to translation table operations | 204 | 3 - Enable all messages |
205 | 8 - Enable messages related to bridge loop avoidance | ||
206 | 16 - Enable messaged related to DAT, ARP snooping and parsing | ||
207 | 31 - Enable all messages | ||
208 | 205 | ||
209 | The debug output can be changed at runtime using the file | 206 | The debug output can be changed at runtime using the file |
210 | /sys/class/net/bat0/mesh/log_level. e.g. | 207 | /sys/class/net/bat0/mesh/log_level. e.g. |
211 | 208 | ||
212 | # echo 6 > /sys/class/net/bat0/mesh/log_level | 209 | # echo 2 > /sys/class/net/bat0/mesh/log_level |
213 | |||
214 | will enable debug messages for when routes change. | ||
215 | |||
216 | Counters for different types of packets entering and leaving the | ||
217 | batman-adv module are available through ethtool: | ||
218 | 210 | ||
219 | # ethtool --statistics bat0 | 211 | will enable debug messages for when routes or TTs change. |
220 | 212 | ||
221 | 213 | ||
222 | BATCTL | 214 | BATCTL |
diff --git a/Documentation/networking/baycom.txt b/Documentation/networking/baycom.txt index 688f18fd446..4e68849d563 100644 --- a/Documentation/networking/baycom.txt +++ b/Documentation/networking/baycom.txt | |||
@@ -93,7 +93,7 @@ Every time a driver is inserted into the kernel, it has to know which | |||
93 | modems it should access at which ports. This can be done with the setbaycom | 93 | modems it should access at which ports. This can be done with the setbaycom |
94 | utility. If you are only using one modem, you can also configure the | 94 | utility. If you are only using one modem, you can also configure the |
95 | driver from the insmod command line (or by means of an option line in | 95 | driver from the insmod command line (or by means of an option line in |
96 | /etc/modprobe.d/*.conf). | 96 | /etc/modprobe.conf). |
97 | 97 | ||
98 | Examples: | 98 | Examples: |
99 | modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 | 99 | modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 |
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 10a015c384b..91df678fb7f 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -173,8 +173,9 @@ bonding module at load time, or are specified via sysfs. | |||
173 | 173 | ||
174 | Module options may be given as command line arguments to the | 174 | Module options may be given as command line arguments to the |
175 | insmod or modprobe command, but are usually specified in either the | 175 | insmod or modprobe command, but are usually specified in either the |
176 | /etc/modrobe.d/*.conf configuration files, or in a distro-specific | 176 | /etc/modules.conf or /etc/modprobe.conf configuration file, or in a |
177 | configuration file (some of which are detailed in the next section). | 177 | distro-specific configuration file (some of which are detailed in the next |
178 | section). | ||
178 | 179 | ||
179 | Details on bonding support for sysfs is provided in the | 180 | Details on bonding support for sysfs is provided in the |
180 | "Configuring Bonding Manually via Sysfs" section, below. | 181 | "Configuring Bonding Manually via Sysfs" section, below. |
@@ -195,23 +196,6 @@ or, for backwards compatibility, the option value. E.g., | |||
195 | 196 | ||
196 | The parameters are as follows: | 197 | The parameters are as follows: |
197 | 198 | ||
198 | active_slave | ||
199 | |||
200 | Specifies the new active slave for modes that support it | ||
201 | (active-backup, balance-alb and balance-tlb). Possible values | ||
202 | are the name of any currently enslaved interface, or an empty | ||
203 | string. If a name is given, the slave and its link must be up in order | ||
204 | to be selected as the new active slave. If an empty string is | ||
205 | specified, the current active slave is cleared, and a new active | ||
206 | slave is selected automatically. | ||
207 | |||
208 | Note that this is only available through the sysfs interface. No module | ||
209 | parameter by this name exists. | ||
210 | |||
211 | The normal value of this option is the name of the currently | ||
212 | active slave, or the empty string if there is no active slave or | ||
213 | the current mode does not use an active slave. | ||
214 | |||
215 | ad_select | 199 | ad_select |
216 | 200 | ||
217 | Specifies the 802.3ad aggregation selection logic to use. The | 201 | Specifies the 802.3ad aggregation selection logic to use. The |
@@ -752,22 +736,12 @@ xmit_hash_policy | |||
752 | protocol information to generate the hash. | 736 | protocol information to generate the hash. |
753 | 737 | ||
754 | Uses XOR of hardware MAC addresses and IP addresses to | 738 | Uses XOR of hardware MAC addresses and IP addresses to |
755 | generate the hash. The IPv4 formula is | 739 | generate the hash. The formula is |
756 | 740 | ||
757 | (((source IP XOR dest IP) AND 0xffff) XOR | 741 | (((source IP XOR dest IP) AND 0xffff) XOR |
758 | ( source MAC XOR destination MAC )) | 742 | ( source MAC XOR destination MAC )) |
759 | modulo slave count | 743 | modulo slave count |
760 | 744 | ||
761 | The IPv6 formula is | ||
762 | |||
763 | hash = (source ip quad 2 XOR dest IP quad 2) XOR | ||
764 | (source ip quad 3 XOR dest IP quad 3) XOR | ||
765 | (source ip quad 4 XOR dest IP quad 4) | ||
766 | |||
767 | (((hash >> 24) XOR (hash >> 16) XOR (hash >> 8) XOR hash) | ||
768 | XOR (source MAC XOR destination MAC)) | ||
769 | modulo slave count | ||
770 | |||
771 | This algorithm will place all traffic to a particular | 745 | This algorithm will place all traffic to a particular |
772 | network peer on the same slave. For non-IP traffic, | 746 | network peer on the same slave. For non-IP traffic, |
773 | the formula is the same as for the layer2 transmit | 747 | the formula is the same as for the layer2 transmit |
@@ -788,29 +762,19 @@ xmit_hash_policy | |||
788 | slaves, although a single connection will not span | 762 | slaves, although a single connection will not span |
789 | multiple slaves. | 763 | multiple slaves. |
790 | 764 | ||
791 | The formula for unfragmented IPv4 TCP and UDP packets is | 765 | The formula for unfragmented TCP and UDP packets is |
792 | 766 | ||
793 | ((source port XOR dest port) XOR | 767 | ((source port XOR dest port) XOR |
794 | ((source IP XOR dest IP) AND 0xffff) | 768 | ((source IP XOR dest IP) AND 0xffff) |
795 | modulo slave count | 769 | modulo slave count |
796 | 770 | ||
797 | The formula for unfragmented IPv6 TCP and UDP packets is | 771 | For fragmented TCP or UDP packets and all other IP |
798 | 772 | protocol traffic, the source and destination port | |
799 | hash = (source port XOR dest port) XOR | ||
800 | ((source ip quad 2 XOR dest IP quad 2) XOR | ||
801 | (source ip quad 3 XOR dest IP quad 3) XOR | ||
802 | (source ip quad 4 XOR dest IP quad 4)) | ||
803 | |||
804 | ((hash >> 24) XOR (hash >> 16) XOR (hash >> 8) XOR hash) | ||
805 | modulo slave count | ||
806 | |||
807 | For fragmented TCP or UDP packets and all other IPv4 and | ||
808 | IPv6 protocol traffic, the source and destination port | ||
809 | information is omitted. For non-IP traffic, the | 773 | information is omitted. For non-IP traffic, the |
810 | formula is the same as for the layer2 transmit hash | 774 | formula is the same as for the layer2 transmit hash |
811 | policy. | 775 | policy. |
812 | 776 | ||
813 | The IPv4 policy is intended to mimic the behavior of | 777 | This policy is intended to mimic the behavior of |
814 | certain switches, notably Cisco switches with PFC2 as | 778 | certain switches, notably Cisco switches with PFC2 as |
815 | well as some Foundry and IBM products. | 779 | well as some Foundry and IBM products. |
816 | 780 | ||
@@ -1040,7 +1004,7 @@ ifcfg-bondX files. | |||
1040 | 1004 | ||
1041 | Because the sysconfig scripts supply the bonding module | 1005 | Because the sysconfig scripts supply the bonding module |
1042 | options in the ifcfg-bondX file, it is not necessary to add them to | 1006 | options in the ifcfg-bondX file, it is not necessary to add them to |
1043 | the system /etc/modules.d/*.conf configuration files. | 1007 | the system /etc/modules.conf or /etc/modprobe.conf configuration file. |
1044 | 1008 | ||
1045 | 3.2 Configuration with Initscripts Support | 1009 | 3.2 Configuration with Initscripts Support |
1046 | ------------------------------------------ | 1010 | ------------------------------------------ |
@@ -1117,13 +1081,15 @@ queried targets, e.g., | |||
1117 | arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 | 1081 | arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2 |
1118 | 1082 | ||
1119 | is the proper syntax to specify multiple targets. When specifying | 1083 | is the proper syntax to specify multiple targets. When specifying |
1120 | options via BONDING_OPTS, it is not necessary to edit /etc/modprobe.d/*.conf. | 1084 | options via BONDING_OPTS, it is not necessary to edit /etc/modules.conf or |
1085 | /etc/modprobe.conf. | ||
1121 | 1086 | ||
1122 | For even older versions of initscripts that do not support | 1087 | For even older versions of initscripts that do not support |
1123 | BONDING_OPTS, it is necessary to edit /etc/modprobe.d/*.conf, depending upon | 1088 | BONDING_OPTS, it is necessary to edit /etc/modules.conf (or |
1124 | your distro) to load the bonding module with your desired options when the | 1089 | /etc/modprobe.conf, depending upon your distro) to load the bonding module |
1125 | bond0 interface is brought up. The following lines in /etc/modprobe.d/*.conf | 1090 | with your desired options when the bond0 interface is brought up. The |
1126 | will load the bonding module, and select its options: | 1091 | following lines in /etc/modules.conf (or modprobe.conf) will load the |
1092 | bonding module, and select its options: | ||
1127 | 1093 | ||
1128 | alias bond0 bonding | 1094 | alias bond0 bonding |
1129 | options bond0 mode=balance-alb miimon=100 | 1095 | options bond0 mode=balance-alb miimon=100 |
@@ -1169,7 +1135,7 @@ knowledge of bonding. One such distro is SuSE Linux Enterprise Server | |||
1169 | version 8. | 1135 | version 8. |
1170 | 1136 | ||
1171 | The general method for these systems is to place the bonding | 1137 | The general method for these systems is to place the bonding |
1172 | module parameters into a config file in /etc/modprobe.d/ (as | 1138 | module parameters into /etc/modules.conf or /etc/modprobe.conf (as |
1173 | appropriate for the installed distro), then add modprobe and/or | 1139 | appropriate for the installed distro), then add modprobe and/or |
1174 | ifenslave commands to the system's global init script. The name of | 1140 | ifenslave commands to the system's global init script. The name of |
1175 | the global init script differs; for sysconfig, it is | 1141 | the global init script differs; for sysconfig, it is |
@@ -1230,7 +1196,7 @@ options, you may wish to use the "max_bonds" module parameter, | |||
1230 | documented above. | 1196 | documented above. |
1231 | 1197 | ||
1232 | To create multiple bonding devices with differing options, it is | 1198 | To create multiple bonding devices with differing options, it is |
1233 | preferable to use bonding parameters exported by sysfs, documented in the | 1199 | preferrable to use bonding parameters exported by sysfs, documented in the |
1234 | section below. | 1200 | section below. |
1235 | 1201 | ||
1236 | For versions of bonding without sysfs support, the only means to | 1202 | For versions of bonding without sysfs support, the only means to |
@@ -1245,7 +1211,7 @@ network initialization scripts. | |||
1245 | specify a different name for each instance (the module loading system | 1211 | specify a different name for each instance (the module loading system |
1246 | requires that every loaded module, even multiple instances of the same | 1212 | requires that every loaded module, even multiple instances of the same |
1247 | module, have a unique name). This is accomplished by supplying multiple | 1213 | module, have a unique name). This is accomplished by supplying multiple |
1248 | sets of bonding options in /etc/modprobe.d/*.conf, for example: | 1214 | sets of bonding options in /etc/modprobe.conf, for example: |
1249 | 1215 | ||
1250 | alias bond0 bonding | 1216 | alias bond0 bonding |
1251 | options bond0 -o bond0 mode=balance-rr miimon=100 | 1217 | options bond0 -o bond0 mode=balance-rr miimon=100 |
@@ -1810,8 +1776,8 @@ route additions may cause trouble. | |||
1810 | On systems with network configuration scripts that do not | 1776 | On systems with network configuration scripts that do not |
1811 | associate physical devices directly with network interface names (so | 1777 | associate physical devices directly with network interface names (so |
1812 | that the same physical device always has the same "ethX" name), it may | 1778 | that the same physical device always has the same "ethX" name), it may |
1813 | be necessary to add some special logic to config files in | 1779 | be necessary to add some special logic to either /etc/modules.conf or |
1814 | /etc/modprobe.d/. | 1780 | /etc/modprobe.conf (depending upon which is installed on the system). |
1815 | 1781 | ||
1816 | For example, given a modules.conf containing the following: | 1782 | For example, given a modules.conf containing the following: |
1817 | 1783 | ||
@@ -1838,15 +1804,20 @@ add above bonding e1000 tg3 | |||
1838 | bonding is loaded. This command is fully documented in the | 1804 | bonding is loaded. This command is fully documented in the |
1839 | modules.conf manual page. | 1805 | modules.conf manual page. |
1840 | 1806 | ||
1841 | On systems utilizing modprobe an equivalent problem can occur. | 1807 | On systems utilizing modprobe.conf (or modprobe.conf.local), |
1842 | In this case, the following can be added to config files in | 1808 | an equivalent problem can occur. In this case, the following can be |
1843 | /etc/modprobe.d/ as: | 1809 | added to modprobe.conf (or modprobe.conf.local, as appropriate), as |
1810 | follows (all on one line; it has been split here for clarity): | ||
1844 | 1811 | ||
1845 | softdep bonding pre: tg3 e1000 | 1812 | install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; |
1813 | /sbin/modprobe --ignore-install bonding | ||
1846 | 1814 | ||
1847 | This will load tg3 and e1000 modules before loading the bonding one. | 1815 | This will, when loading the bonding module, rather than |
1848 | Full documentation on this can be found in the modprobe.d and modprobe | 1816 | performing the normal action, instead execute the provided command. |
1849 | manual pages. | 1817 | This command loads the device drivers in the order needed, then calls |
1818 | modprobe with --ignore-install to cause the normal action to then take | ||
1819 | place. Full documentation on this can be found in the modprobe.conf | ||
1820 | and modprobe manual pages. | ||
1850 | 1821 | ||
1851 | 8.3. Painfully Slow Or No Failed Link Detection By Miimon | 1822 | 8.3. Painfully Slow Or No Failed Link Detection By Miimon |
1852 | --------------------------------------------------------- | 1823 | --------------------------------------------------------- |
@@ -1970,7 +1941,7 @@ access to fail over to. Additionally, the bonding load balance modes | |||
1970 | support link monitoring of their members, so if individual links fail, | 1941 | support link monitoring of their members, so if individual links fail, |
1971 | the load will be rebalanced across the remaining devices. | 1942 | the load will be rebalanced across the remaining devices. |
1972 | 1943 | ||
1973 | See Section 12, "Configuring Bonding for Maximum Throughput" | 1944 | See Section 13, "Configuring Bonding for Maximum Throughput" |
1974 | for information on configuring bonding with one peer device. | 1945 | for information on configuring bonding with one peer device. |
1975 | 1946 | ||
1976 | 11.2 High Availability in a Multiple Switch Topology | 1947 | 11.2 High Availability in a Multiple Switch Topology |
@@ -2640,7 +2611,7 @@ be found at: | |||
2640 | 2611 | ||
2641 | https://lists.sourceforge.net/lists/listinfo/bonding-devel | 2612 | https://lists.sourceforge.net/lists/listinfo/bonding-devel |
2642 | 2613 | ||
2643 | Discussions regarding the development of the bonding driver take place | 2614 | Discussions regarding the developpement of the bonding driver take place |
2644 | on the main Linux network mailing list, hosted at vger.kernel.org. The list | 2615 | on the main Linux network mailing list, hosted at vger.kernel.org. The list |
2645 | address is: | 2616 | address is: |
2646 | 2617 | ||
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt index a27cb6214ed..a7ba5e4e2c9 100644 --- a/Documentation/networking/bridge.txt +++ b/Documentation/networking/bridge.txt | |||
@@ -1,14 +1,7 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | 1 | In order to use the Ethernet bridging functionality, you'll need the |
2 | userspace tools. | 2 | userspace tools. These programs and documentation are available |
3 | 3 | at http://www.linuxfoundation.org/en/Net:Bridge. The download page is | |
4 | Documentation for Linux bridging is on: | 4 | http://prdownloads.sourceforge.net/bridge. |
5 | http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge | ||
6 | |||
7 | The bridge-utilities are maintained at: | ||
8 | git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git | ||
9 | |||
10 | Additionally, the iproute2 utilities can be used to configure | ||
11 | bridge devices. | ||
12 | 5 | ||
13 | If you still have questions, don't hesitate to post to the mailing list | 6 | If you still have questions, don't hesitate to post to the mailing list |
14 | (more info https://lists.linux-foundation.org/mailman/listinfo/bridge). | 7 | (more info https://lists.linux-foundation.org/mailman/listinfo/bridge). |
diff --git a/Documentation/networking/caif/Linux-CAIF.txt b/Documentation/networking/caif/Linux-CAIF.txt index 0aa4bd381be..e52fd62bef3 100644 --- a/Documentation/networking/caif/Linux-CAIF.txt +++ b/Documentation/networking/caif/Linux-CAIF.txt | |||
@@ -19,36 +19,60 @@ and host. Currently, UART and Loopback are available for Linux. | |||
19 | Architecture: | 19 | Architecture: |
20 | ------------ | 20 | ------------ |
21 | The implementation of CAIF is divided into: | 21 | The implementation of CAIF is divided into: |
22 | * CAIF Socket Layer and GPRS IP Interface. | 22 | * CAIF Socket Layer, Kernel API, and Net Device. |
23 | * CAIF Core Protocol Implementation | 23 | * CAIF Core Protocol Implementation |
24 | * CAIF Link Layer, implemented as NET devices. | 24 | * CAIF Link Layer, implemented as NET devices. |
25 | 25 | ||
26 | 26 | ||
27 | RTNL | 27 | RTNL |
28 | ! | 28 | ! |
29 | ! +------+ +------+ | 29 | ! +------+ +------+ +------+ |
30 | ! +------+! +------+! | 30 | ! +------+! +------+! +------+! |
31 | ! ! IP !! !Socket!! | 31 | ! ! Sock !! !Kernel!! ! Net !! |
32 | +-------> !interf!+ ! API !+ <- CAIF Client APIs | 32 | ! ! API !+ ! API !+ ! Dev !+ <- CAIF Client APIs |
33 | ! +------+ +------! | 33 | ! +------+ +------! +------+ |
34 | ! ! ! | 34 | ! ! ! ! |
35 | ! +-----------+ | 35 | ! +----------!----------+ |
36 | ! ! | 36 | ! +------+ <- CAIF Protocol Implementation |
37 | ! +------+ <- CAIF Core Protocol | 37 | +-------> ! CAIF ! |
38 | ! ! CAIF ! | 38 | ! Core ! |
39 | ! ! Core ! | 39 | +------+ |
40 | ! +------+ | 40 | +--------!--------+ |
41 | ! +----------!---------+ | 41 | ! ! |
42 | ! ! ! ! | 42 | +------+ +-----+ |
43 | ! +------+ +-----+ +------+ | 43 | ! ! ! TTY ! <- Link Layer (Net Devices) |
44 | +--> ! HSI ! ! TTY ! ! USB ! <- Link Layer (Net Devices) | 44 | +------+ +-----+ |
45 | +------+ +-----+ +------+ | 45 | |
46 | 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. | ||
47 | 71 | ||
48 | 72 | ||
49 | I M P L E M E N T A T I O N | 73 | I M P L E M E N T A T I O N |
50 | =========================== | 74 | =========================== |
51 | 75 | =========================== | |
52 | 76 | ||
53 | CAIF Core Protocol Layer | 77 | CAIF Core Protocol Layer |
54 | ========================================= | 78 | ========================================= |
@@ -64,13 +88,17 @@ The Core CAIF implementation contains: | |||
64 | - Simple implementation of CAIF. | 88 | - Simple implementation of CAIF. |
65 | - Layered architecture (a la Streams), each layer in the CAIF | 89 | - Layered architecture (a la Streams), each layer in the CAIF |
66 | specification is implemented in a separate c-file. | 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. | ||
67 | - Clients must call configuration function to add PHY layer. | 93 | - Clients must call configuration function to add PHY layer. |
68 | - Clients must implement CAIF layer to consume/produce | 94 | - Clients must implement CAIF layer to consume/produce |
69 | CAIF payload with receive and transmit functions. | 95 | CAIF payload with receive and transmit functions. |
70 | - Clients must call configuration function to add and connect the | 96 | - Clients must call configuration function to add and connect the |
71 | Client layer. | 97 | Client layer. |
72 | - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed | 98 | - When receiving / transmitting CAIF Packets (cfpkt), ownership is passed |
73 | to the called function (except for framing layers' receive function) | 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). | ||
74 | 102 | ||
75 | Layered Architecture | 103 | Layered Architecture |
76 | -------------------- | 104 | -------------------- |
@@ -81,6 +109,11 @@ Implementation. The support functions include: | |||
81 | CAIF Packet has functions for creating, destroying and adding content | 109 | CAIF Packet has functions for creating, destroying and adding content |
82 | and for adding/extracting header and trailers to protocol packets. | 110 | and for adding/extracting header and trailers to protocol packets. |
83 | 111 | ||
112 | - CFLST CAIF list implementation. | ||
113 | |||
114 | - CFGLUE CAIF Glue. Contains OS Specifics, such as memory | ||
115 | allocation, endianness, etc. | ||
116 | |||
84 | The CAIF Protocol implementation contains: | 117 | The CAIF Protocol implementation contains: |
85 | 118 | ||
86 | - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol | 119 | - CFCNFG CAIF Configuration layer. Configures the CAIF Protocol |
@@ -95,7 +128,7 @@ The CAIF Protocol implementation contains: | |||
95 | control and remote shutdown requests. | 128 | control and remote shutdown requests. |
96 | 129 | ||
97 | - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual | 130 | - CFVEI CAIF VEI layer. Handles CAIF AT Channels on VEI (Virtual |
98 | External Interface). This layer encodes/decodes VEI frames. | 131 | External Interface). This layer encodes/decodes VEI frames. |
99 | 132 | ||
100 | - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP | 133 | - CFDGML CAIF Datagram layer. Handles CAIF Datagram layer (IP |
101 | traffic), encodes/decodes Datagram frames. | 134 | traffic), encodes/decodes Datagram frames. |
@@ -137,7 +170,7 @@ The CAIF Protocol implementation contains: | |||
137 | +---------+ +---------+ | 170 | +---------+ +---------+ |
138 | ! ! | 171 | ! ! |
139 | +---------+ +---------+ | 172 | +---------+ +---------+ |
140 | | | | Serial | | 173 | | | | Serial | |
141 | | | | CFSERL | | 174 | | | | CFSERL | |
142 | +---------+ +---------+ | 175 | +---------+ +---------+ |
143 | 176 | ||
@@ -153,20 +186,24 @@ In this layered approach the following "rules" apply. | |||
153 | layer->dn->transmit(layer->dn, packet); | 186 | layer->dn->transmit(layer->dn, packet); |
154 | 187 | ||
155 | 188 | ||
156 | CAIF Socket and IP interface | 189 | Linux Driver Implementation |
157 | =========================== | 190 | =========================== |
158 | 191 | ||
159 | The IP interface and CAIF socket API are implemented on top of the | 192 | Linux GPRS Net Device and CAIF socket are implemented on top of the |
160 | CAIF Core protocol. The IP Interface and CAIF socket have an instance of | 193 | CAIF Core protocol. The Net device and CAIF socket have an instance of |
161 | 'struct cflayer', just like the CAIF Core protocol stack. | 194 | 'struct cflayer', just like the CAIF Core protocol stack. |
162 | Net device and Socket implement the 'receive()' function defined by | 195 | Net device and Socket implement the 'receive()' function defined by |
163 | 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and | 196 | 'struct cflayer', just like the rest of the CAIF stack. In this way, transmit and |
164 | receive of packets is handled as by the rest of the layers: the 'dn->transmit()' | 197 | receive of packets is handled as by the rest of the layers: the 'dn->transmit()' |
165 | function is called in order to transmit data. | 198 | function is called in order to transmit data. |
166 | 199 | ||
200 | The layer on top of the CAIF Core implementation is | ||
201 | sometimes referred to as the "Client layer". | ||
202 | |||
203 | |||
167 | Configuration of Link Layer | 204 | Configuration of Link Layer |
168 | --------------------------- | 205 | --------------------------- |
169 | The Link Layer is implemented as Linux network devices (struct net_device). | 206 | The Link Layer is implemented as Linux net devices (struct net_device). |
170 | Payload handling and registration is done using standard Linux mechanisms. | 207 | Payload handling and registration is done using standard Linux mechanisms. |
171 | 208 | ||
172 | The CAIF Protocol relies on a loss-less link layer without implementing | 209 | The CAIF Protocol relies on a loss-less link layer without implementing |
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 820f55344ed..56ca3b75376 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
@@ -22,8 +22,7 @@ This file contains | |||
22 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 22 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
23 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK | 23 | 4.1.3 RAW socket option CAN_RAW_LOOPBACK |
24 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS | 24 | 4.1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS |
25 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES | 25 | 4.1.5 RAW socket returned message flags |
26 | 4.1.6 RAW socket returned message flags | ||
27 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) | 26 | 4.2 Broadcast Manager protocol sockets (SOCK_DGRAM) |
28 | 4.3 connected transport protocols (SOCK_SEQPACKET) | 27 | 4.3 connected transport protocols (SOCK_SEQPACKET) |
29 | 4.4 unconnected transport protocols (SOCK_DGRAM) | 28 | 4.4 unconnected transport protocols (SOCK_DGRAM) |
@@ -42,8 +41,7 @@ This file contains | |||
42 | 6.5.1 Netlink interface to set/get devices properties | 41 | 6.5.1 Netlink interface to set/get devices properties |
43 | 6.5.2 Setting the CAN bit-timing | 42 | 6.5.2 Setting the CAN bit-timing |
44 | 6.5.3 Starting and stopping the CAN network device | 43 | 6.5.3 Starting and stopping the CAN network device |
45 | 6.6 CAN FD (flexible data rate) driver support | 44 | 6.6 supported CAN hardware |
46 | 6.7 supported CAN hardware | ||
47 | 45 | ||
48 | 7 Socket CAN resources | 46 | 7 Socket CAN resources |
49 | 47 | ||
@@ -234,16 +232,16 @@ solution for a couple of reasons: | |||
234 | arbitration problems and error frames caused by the different | 232 | arbitration problems and error frames caused by the different |
235 | ECUs. The occurrence of detected errors are important for diagnosis | 233 | ECUs. The occurrence of detected errors are important for diagnosis |
236 | and have to be logged together with the exact timestamp. For this | 234 | and have to be logged together with the exact timestamp. For this |
237 | reason the CAN interface driver can generate so called Error Message | 235 | reason the CAN interface driver can generate so called Error Frames |
238 | Frames that can optionally be passed to the user application in the | 236 | that can optionally be passed to the user application in the same |
239 | same way as other CAN frames. Whenever an error on the physical layer | 237 | way as other CAN frames. Whenever an error on the physical layer |
240 | or the MAC layer is detected (e.g. by the CAN controller) the driver | 238 | or the MAC layer is detected (e.g. by the CAN controller) the driver |
241 | creates an appropriate error message frame. Error messages frames can | 239 | creates an appropriate error frame. Error frames can be requested by |
242 | be requested by the user application using the common CAN filter | 240 | the user application using the common CAN filter mechanisms. Inside |
243 | mechanisms. Inside this filter definition the (interested) type of | 241 | this filter definition the (interested) type of errors may be |
244 | errors may be selected. The reception of error messages is disabled | 242 | selected. The reception of error frames is disabled by default. |
245 | by default. The format of the CAN error message frame is briefly | 243 | The format of the CAN error frame is briefly described in the Linux |
246 | described in the Linux header file "include/linux/can/error.h". | 244 | header file "include/linux/can/error.h". |
247 | 245 | ||
248 | 4. How to use Socket CAN | 246 | 4. How to use Socket CAN |
249 | ------------------------ | 247 | ------------------------ |
@@ -275,7 +273,7 @@ solution for a couple of reasons: | |||
275 | 273 | ||
276 | struct can_frame { | 274 | struct can_frame { |
277 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | 275 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ |
278 | __u8 can_dlc; /* frame payload length in byte (0 .. 8) */ | 276 | __u8 can_dlc; /* data length code: 0 .. 8 */ |
279 | __u8 data[8] __attribute__((aligned(8))); | 277 | __u8 data[8] __attribute__((aligned(8))); |
280 | }; | 278 | }; |
281 | 279 | ||
@@ -377,51 +375,6 @@ solution for a couple of reasons: | |||
377 | nbytes = sendto(s, &frame, sizeof(struct can_frame), | 375 | nbytes = sendto(s, &frame, sizeof(struct can_frame), |
378 | 0, (struct sockaddr*)&addr, sizeof(addr)); | 376 | 0, (struct sockaddr*)&addr, sizeof(addr)); |
379 | 377 | ||
380 | Remark about CAN FD (flexible data rate) support: | ||
381 | |||
382 | Generally the handling of CAN FD is very similar to the formerly described | ||
383 | examples. The new CAN FD capable CAN controllers support two different | ||
384 | bitrates for the arbitration phase and the payload phase of the CAN FD frame | ||
385 | and up to 64 bytes of payload. This extended payload length breaks all the | ||
386 | kernel interfaces (ABI) which heavily rely on the CAN frame with fixed eight | ||
387 | bytes of payload (struct can_frame) like the CAN_RAW socket. Therefore e.g. | ||
388 | the CAN_RAW socket supports a new socket option CAN_RAW_FD_FRAMES that | ||
389 | switches the socket into a mode that allows the handling of CAN FD frames | ||
390 | and (legacy) CAN frames simultaneously (see section 4.1.5). | ||
391 | |||
392 | The struct canfd_frame is defined in include/linux/can.h: | ||
393 | |||
394 | struct canfd_frame { | ||
395 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | ||
396 | __u8 len; /* frame payload length in byte (0 .. 64) */ | ||
397 | __u8 flags; /* additional flags for CAN FD */ | ||
398 | __u8 __res0; /* reserved / padding */ | ||
399 | __u8 __res1; /* reserved / padding */ | ||
400 | __u8 data[64] __attribute__((aligned(8))); | ||
401 | }; | ||
402 | |||
403 | The struct canfd_frame and the existing struct can_frame have the can_id, | ||
404 | the payload length and the payload data at the same offset inside their | ||
405 | structures. This allows to handle the different structures very similar. | ||
406 | When the content of a struct can_frame is copied into a struct canfd_frame | ||
407 | all structure elements can be used as-is - only the data[] becomes extended. | ||
408 | |||
409 | When introducing the struct canfd_frame it turned out that the data length | ||
410 | code (DLC) of the struct can_frame was used as a length information as the | ||
411 | length and the DLC has a 1:1 mapping in the range of 0 .. 8. To preserve | ||
412 | the easy handling of the length information the canfd_frame.len element | ||
413 | contains a plain length value from 0 .. 64. So both canfd_frame.len and | ||
414 | can_frame.can_dlc are equal and contain a length information and no DLC. | ||
415 | For details about the distinction of CAN and CAN FD capable devices and | ||
416 | the mapping to the bus-relevant data length code (DLC), see chapter 6.6. | ||
417 | |||
418 | The length of the two CAN(FD) frame structures define the maximum transfer | ||
419 | unit (MTU) of the CAN(FD) network interface and skbuff data length. Two | ||
420 | definitions are specified for CAN specific MTUs in include/linux/can.h : | ||
421 | |||
422 | #define CAN_MTU (sizeof(struct can_frame)) == 16 => 'legacy' CAN frame | ||
423 | #define CANFD_MTU (sizeof(struct canfd_frame)) == 72 => CAN FD frame | ||
424 | |||
425 | 4.1 RAW protocol sockets with can_filters (SOCK_RAW) | 378 | 4.1 RAW protocol sockets with can_filters (SOCK_RAW) |
426 | 379 | ||
427 | Using CAN_RAW sockets is extensively comparable to the commonly | 380 | Using CAN_RAW sockets is extensively comparable to the commonly |
@@ -430,7 +383,7 @@ solution for a couple of reasons: | |||
430 | defaults are set at RAW socket binding time: | 383 | defaults are set at RAW socket binding time: |
431 | 384 | ||
432 | - The filters are set to exactly one filter receiving everything | 385 | - The filters are set to exactly one filter receiving everything |
433 | - The socket only receives valid data frames (=> no error message frames) | 386 | - The socket only receives valid data frames (=> no error frames) |
434 | - The loopback of sent CAN frames is enabled (see chapter 3.2) | 387 | - The loopback of sent CAN frames is enabled (see chapter 3.2) |
435 | - The socket does not receive its own sent frames (in loopback mode) | 388 | - The socket does not receive its own sent frames (in loopback mode) |
436 | 389 | ||
@@ -481,7 +434,7 @@ solution for a couple of reasons: | |||
481 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 434 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
482 | 435 | ||
483 | As described in chapter 3.4 the CAN interface driver can generate so | 436 | As described in chapter 3.4 the CAN interface driver can generate so |
484 | called Error Message Frames that can optionally be passed to the user | 437 | called Error Frames that can optionally be passed to the user |
485 | application in the same way as other CAN frames. The possible | 438 | application in the same way as other CAN frames. The possible |
486 | errors are divided into different error classes that may be filtered | 439 | errors are divided into different error classes that may be filtered |
487 | using the appropriate error mask. To register for every possible | 440 | using the appropriate error mask. To register for every possible |
@@ -519,69 +472,7 @@ solution for a couple of reasons: | |||
519 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, | 472 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS, |
520 | &recv_own_msgs, sizeof(recv_own_msgs)); | 473 | &recv_own_msgs, sizeof(recv_own_msgs)); |
521 | 474 | ||
522 | 4.1.5 RAW socket option CAN_RAW_FD_FRAMES | 475 | 4.1.5 RAW socket returned message flags |
523 | |||
524 | CAN FD support in CAN_RAW sockets can be enabled with a new socket option | ||
525 | CAN_RAW_FD_FRAMES which is off by default. When the new socket option is | ||
526 | not supported by the CAN_RAW socket (e.g. on older kernels), switching the | ||
527 | CAN_RAW_FD_FRAMES option returns the error -ENOPROTOOPT. | ||
528 | |||
529 | Once CAN_RAW_FD_FRAMES is enabled the application can send both CAN frames | ||
530 | and CAN FD frames. OTOH the application has to handle CAN and CAN FD frames | ||
531 | when reading from the socket. | ||
532 | |||
533 | CAN_RAW_FD_FRAMES enabled: CAN_MTU and CANFD_MTU are allowed | ||
534 | CAN_RAW_FD_FRAMES disabled: only CAN_MTU is allowed (default) | ||
535 | |||
536 | Example: | ||
537 | [ remember: CANFD_MTU == sizeof(struct canfd_frame) ] | ||
538 | |||
539 | struct canfd_frame cfd; | ||
540 | |||
541 | nbytes = read(s, &cfd, CANFD_MTU); | ||
542 | |||
543 | if (nbytes == CANFD_MTU) { | ||
544 | printf("got CAN FD frame with length %d\n", cfd.len); | ||
545 | /* cfd.flags contains valid data */ | ||
546 | } else if (nbytes == CAN_MTU) { | ||
547 | printf("got legacy CAN frame with length %d\n", cfd.len); | ||
548 | /* cfd.flags is undefined */ | ||
549 | } else { | ||
550 | fprintf(stderr, "read: invalid CAN(FD) frame\n"); | ||
551 | return 1; | ||
552 | } | ||
553 | |||
554 | /* the content can be handled independently from the received MTU size */ | ||
555 | |||
556 | printf("can_id: %X data length: %d data: ", cfd.can_id, cfd.len); | ||
557 | for (i = 0; i < cfd.len; i++) | ||
558 | printf("%02X ", cfd.data[i]); | ||
559 | |||
560 | When reading with size CANFD_MTU only returns CAN_MTU bytes that have | ||
561 | been received from the socket a legacy CAN frame has been read into the | ||
562 | provided CAN FD structure. Note that the canfd_frame.flags data field is | ||
563 | not specified in the struct can_frame and therefore it is only valid in | ||
564 | CANFD_MTU sized CAN FD frames. | ||
565 | |||
566 | As long as the payload length is <=8 the received CAN frames from CAN FD | ||
567 | capable CAN devices can be received and read by legacy sockets too. When | ||
568 | user-generated CAN FD frames have a payload length <=8 these can be send | ||
569 | by legacy CAN network interfaces too. Sending CAN FD frames with payload | ||
570 | length > 8 to a legacy CAN network interface returns an -EMSGSIZE error. | ||
571 | |||
572 | Implementation hint for new CAN applications: | ||
573 | |||
574 | To build a CAN FD aware application use struct canfd_frame as basic CAN | ||
575 | data structure for CAN_RAW based applications. When the application is | ||
576 | executed on an older Linux kernel and switching the CAN_RAW_FD_FRAMES | ||
577 | socket option returns an error: No problem. You'll get legacy CAN frames | ||
578 | or CAN FD frames and can process them the same way. | ||
579 | |||
580 | When sending to CAN devices make sure that the device is capable to handle | ||
581 | CAN FD frames by checking if the device maximum transfer unit is CANFD_MTU. | ||
582 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | ||
583 | |||
584 | 4.1.6 RAW socket returned message flags | ||
585 | 476 | ||
586 | When using recvmsg() call, the msg->msg_flags may contain following flags: | 477 | When using recvmsg() call, the msg->msg_flags may contain following flags: |
587 | 478 | ||
@@ -636,7 +527,7 @@ solution for a couple of reasons: | |||
636 | 527 | ||
637 | rcvlist_all - list for unfiltered entries (no filter operations) | 528 | rcvlist_all - list for unfiltered entries (no filter operations) |
638 | rcvlist_eff - list for single extended frame (EFF) entries | 529 | rcvlist_eff - list for single extended frame (EFF) entries |
639 | rcvlist_err - list for error message frames masks | 530 | rcvlist_err - list for error frames masks |
640 | rcvlist_fil - list for mask/value filters | 531 | rcvlist_fil - list for mask/value filters |
641 | rcvlist_inv - list for mask/value filters (inverse semantic) | 532 | rcvlist_inv - list for mask/value filters (inverse semantic) |
642 | rcvlist_sff - list for single standard frame (SFF) entries | 533 | rcvlist_sff - list for single standard frame (SFF) entries |
@@ -682,13 +573,10 @@ solution for a couple of reasons: | |||
682 | dev->type = ARPHRD_CAN; /* the netdevice hardware type */ | 573 | dev->type = ARPHRD_CAN; /* the netdevice hardware type */ |
683 | dev->flags = IFF_NOARP; /* CAN has no arp */ | 574 | dev->flags = IFF_NOARP; /* CAN has no arp */ |
684 | 575 | ||
685 | dev->mtu = CAN_MTU; /* sizeof(struct can_frame) -> legacy CAN interface */ | 576 | dev->mtu = sizeof(struct can_frame); |
686 | 577 | ||
687 | or alternative, when the controller supports CAN with flexible data rate: | 578 | The struct can_frame is the payload of each socket buffer in the |
688 | dev->mtu = CANFD_MTU; /* sizeof(struct canfd_frame) -> CAN FD interface */ | 579 | protocol family PF_CAN. |
689 | |||
690 | The struct can_frame or struct canfd_frame is the payload of each socket | ||
691 | buffer (skbuff) in the protocol family PF_CAN. | ||
692 | 580 | ||
693 | 6.2 local loopback of sent frames | 581 | 6.2 local loopback of sent frames |
694 | 582 | ||
@@ -761,7 +649,7 @@ solution for a couple of reasons: | |||
761 | The CAN device must be configured via netlink interface. The supported | 649 | The CAN device must be configured via netlink interface. The supported |
762 | netlink message types are defined and briefly described in | 650 | netlink message types are defined and briefly described in |
763 | "include/linux/can/netlink.h". CAN link support for the program "ip" | 651 | "include/linux/can/netlink.h". CAN link support for the program "ip" |
764 | of the IPROUTE2 utility suite is available and it can be used as shown | 652 | of the IPROUTE2 utility suite is avaiable and it can be used as shown |
765 | below: | 653 | below: |
766 | 654 | ||
767 | - Setting CAN device properties: | 655 | - Setting CAN device properties: |
@@ -896,41 +784,15 @@ solution for a couple of reasons: | |||
896 | $ ip link set canX type can restart-ms 100 | 784 | $ ip link set canX type can restart-ms 100 |
897 | 785 | ||
898 | Alternatively, the application may realize the "bus-off" condition | 786 | Alternatively, the application may realize the "bus-off" condition |
899 | by monitoring CAN error message frames and do a restart when | 787 | by monitoring CAN error frames and do a restart when appropriate with |
900 | appropriate with the command: | 788 | the command: |
901 | 789 | ||
902 | $ ip link set canX type can restart | 790 | $ ip link set canX type can restart |
903 | 791 | ||
904 | Note that a restart will also create a CAN error message frame (see | 792 | Note that a restart will also create a CAN error frame (see also |
905 | also chapter 3.4). | 793 | chapter 3.4). |
906 | |||
907 | 6.6 CAN FD (flexible data rate) driver support | ||
908 | |||
909 | CAN FD capable CAN controllers support two different bitrates for the | ||
910 | arbitration phase and the payload phase of the CAN FD frame. Therefore a | ||
911 | second bittiming has to be specified in order to enable the CAN FD bitrate. | ||
912 | |||
913 | Additionally CAN FD capable CAN controllers support up to 64 bytes of | ||
914 | payload. The representation of this length in can_frame.can_dlc and | ||
915 | canfd_frame.len for userspace applications and inside the Linux network | ||
916 | layer is a plain value from 0 .. 64 instead of the CAN 'data length code'. | ||
917 | The data length code was a 1:1 mapping to the payload length in the legacy | ||
918 | CAN frames anyway. The payload length to the bus-relevant DLC mapping is | ||
919 | only performed inside the CAN drivers, preferably with the helper | ||
920 | functions can_dlc2len() and can_len2dlc(). | ||
921 | |||
922 | The CAN netdevice driver capabilities can be distinguished by the network | ||
923 | devices maximum transfer unit (MTU): | ||
924 | |||
925 | MTU = 16 (CAN_MTU) => sizeof(struct can_frame) => 'legacy' CAN device | ||
926 | MTU = 72 (CANFD_MTU) => sizeof(struct canfd_frame) => CAN FD capable device | ||
927 | |||
928 | The CAN device MTU can be retrieved e.g. with a SIOCGIFMTU ioctl() syscall. | ||
929 | N.B. CAN FD capable devices can also handle and send legacy CAN frames. | ||
930 | |||
931 | FIXME: Add details about the CAN FD controller configuration when available. | ||
932 | 794 | ||
933 | 6.7 Supported CAN hardware | 795 | 6.6 Supported CAN hardware |
934 | 796 | ||
935 | Please check the "Kconfig" file in "drivers/net/can" to get an actual | 797 | Please check the "Kconfig" file in "drivers/net/can" to get an actual |
936 | list of the support CAN hardware. On the Socket CAN project website | 798 | list of the support CAN hardware. On the Socket CAN project website |
diff --git a/Documentation/networking/dl2k.txt b/Documentation/networking/dl2k.txt index cba74f7a3ab..10e8490fa40 100644 --- a/Documentation/networking/dl2k.txt +++ b/Documentation/networking/dl2k.txt | |||
@@ -45,13 +45,12 @@ Now eth0 should active, you can test it by "ping" or get more information by | |||
45 | "ifconfig". If tested ok, continue the next step. | 45 | "ifconfig". If tested ok, continue the next step. |
46 | 46 | ||
47 | 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net | 47 | 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net |
48 | 5. Add the following line to /etc/modprobe.d/dl2k.conf: | 48 | 5. Add the following line to /etc/modprobe.conf: |
49 | alias eth0 dl2k | 49 | alias eth0 dl2k |
50 | 6. Run depmod to updated module indexes. | 50 | 6. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 |
51 | 7. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 | ||
52 | located at /etc/sysconfig/network-scripts or create it manually. | 51 | located at /etc/sysconfig/network-scripts or create it manually. |
53 | [see - Configuration Script Sample] | 52 | [see - Configuration Script Sample] |
54 | 8. Driver will automatically load and configure at next boot time. | 53 | 7. Driver will automatically load and configure at next boot time. |
55 | 54 | ||
56 | Compiling the Driver | 55 | Compiling the Driver |
57 | ==================== | 56 | ==================== |
@@ -155,8 +154,8 @@ Installing the Driver | |||
155 | ----------------- | 154 | ----------------- |
156 | 1. Copy dl2k.o to the network modules directory, typically | 155 | 1. Copy dl2k.o to the network modules directory, typically |
157 | /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. | 156 | /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. |
158 | 2. Locate the boot module configuration file, most commonly in the | 157 | 2. Locate the boot module configuration file, most commonly modprobe.conf |
159 | /etc/modprobe.d/ directory. Add the following lines: | 158 | or modules.conf (for 2.4) in the /etc directory. Add the following lines: |
160 | 159 | ||
161 | alias ethx dl2k | 160 | alias ethx dl2k |
162 | options dl2k <optional parameters> | 161 | options dl2k <optional parameters> |
diff --git a/Documentation/networking/dns_resolver.txt b/Documentation/networking/dns_resolver.txt index d86adcdae42..7f531ad8328 100644 --- a/Documentation/networking/dns_resolver.txt +++ b/Documentation/networking/dns_resolver.txt | |||
@@ -102,10 +102,6 @@ implemented in the module can be called after doing: | |||
102 | If _expiry is non-NULL, the expiry time (TTL) of the result will be | 102 | If _expiry is non-NULL, the expiry time (TTL) of the result will be |
103 | returned also. | 103 | returned also. |
104 | 104 | ||
105 | The kernel maintains an internal keyring in which it caches looked up keys. | ||
106 | This can be cleared by any process that has the CAP_SYS_ADMIN capability by | ||
107 | the use of KEYCTL_KEYRING_CLEAR on the keyring ID. | ||
108 | |||
109 | 105 | ||
110 | =============================== | 106 | =============================== |
111 | READING DNS KEYS FROM USERSPACE | 107 | READING DNS KEYS FROM USERSPACE |
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt index da59e288413..03283daa64f 100644 --- a/Documentation/networking/driver.txt +++ b/Documentation/networking/driver.txt | |||
@@ -2,16 +2,16 @@ Document about softnet driver issues | |||
2 | 2 | ||
3 | Transmit path guidelines: | 3 | Transmit path guidelines: |
4 | 4 | ||
5 | 1) The ndo_start_xmit method must not return NETDEV_TX_BUSY under | 5 | 1) The hard_start_xmit method must never return '1' under any |
6 | any normal circumstances. It is considered a hard error unless | 6 | normal circumstances. It is considered a hard error unless |
7 | there is no way your device can tell ahead of time when it's | 7 | there is no way your device can tell ahead of time when it's |
8 | transmit function will become busy. | 8 | transmit function will become busy. |
9 | 9 | ||
10 | Instead it must maintain the queue properly. For example, | 10 | Instead it must maintain the queue properly. For example, |
11 | for a driver implementing scatter-gather this means: | 11 | for a driver implementing scatter-gather this means: |
12 | 12 | ||
13 | static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb, | 13 | static int drv_hard_start_xmit(struct sk_buff *skb, |
14 | struct net_device *dev) | 14 | struct net_device *dev) |
15 | { | 15 | { |
16 | struct drv *dp = netdev_priv(dev); | 16 | struct drv *dp = netdev_priv(dev); |
17 | 17 | ||
@@ -23,7 +23,7 @@ Transmit path guidelines: | |||
23 | unlock_tx(dp); | 23 | unlock_tx(dp); |
24 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | 24 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", |
25 | dev->name); | 25 | dev->name); |
26 | return NETDEV_TX_BUSY; | 26 | return 1; |
27 | } | 27 | } |
28 | 28 | ||
29 | ... queue packet to card ... | 29 | ... queue packet to card ... |
@@ -35,7 +35,6 @@ Transmit path guidelines: | |||
35 | ... | 35 | ... |
36 | unlock_tx(dp); | 36 | unlock_tx(dp); |
37 | ... | 37 | ... |
38 | return NETDEV_TX_OK; | ||
39 | } | 38 | } |
40 | 39 | ||
41 | And then at the end of your TX reclamation event handling: | 40 | And then at the end of your TX reclamation event handling: |
@@ -59,12 +58,15 @@ Transmit path guidelines: | |||
59 | TX_BUFFS_AVAIL(dp) > 0) | 58 | TX_BUFFS_AVAIL(dp) > 0) |
60 | netif_wake_queue(dp->dev); | 59 | netif_wake_queue(dp->dev); |
61 | 60 | ||
62 | 2) An ndo_start_xmit method must not modify the shared parts of a | 61 | 2) Do not forget to update netdev->trans_start to jiffies after |
62 | each new tx packet is given to the hardware. | ||
63 | |||
64 | 3) A hard_start_xmit method must not modify the shared parts of a | ||
63 | cloned SKB. | 65 | cloned SKB. |
64 | 66 | ||
65 | 3) Do not forget that once you return NETDEV_TX_OK from your | 67 | 4) Do not forget that once you return 0 from your hard_start_xmit |
66 | ndo_start_xmit method, it is your driver's responsibility to free | 68 | method, it is your driver's responsibility to free up the SKB |
67 | up the SKB and in some finite amount of time. | 69 | and in some finite amount of time. |
68 | 70 | ||
69 | For example, this means that it is not allowed for your TX | 71 | For example, this means that it is not allowed for your TX |
70 | mitigation scheme to let TX packets "hang out" in the TX | 72 | mitigation scheme to let TX packets "hang out" in the TX |
@@ -72,9 +74,8 @@ Transmit path guidelines: | |||
72 | This error can deadlock sockets waiting for send buffer room | 74 | This error can deadlock sockets waiting for send buffer room |
73 | to be freed up. | 75 | to be freed up. |
74 | 76 | ||
75 | If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you | 77 | If you return 1 from the hard_start_xmit method, you must not keep |
76 | must not keep any reference to that SKB and you must not attempt | 78 | any reference to that SKB and you must not attempt to free it up. |
77 | to free it up. | ||
78 | 79 | ||
79 | Probing guidelines: | 80 | Probing guidelines: |
80 | 81 | ||
@@ -84,10 +85,10 @@ Probing guidelines: | |||
84 | 85 | ||
85 | Close/stop guidelines: | 86 | Close/stop guidelines: |
86 | 87 | ||
87 | 1) After the ndo_stop routine has been called, the hardware must | 88 | 1) After the dev->stop routine has been called, the hardware must |
88 | not receive or transmit any data. All in flight packets must | 89 | not receive or transmit any data. All in flight packets must |
89 | be aborted. If necessary, poll or wait for completion of | 90 | be aborted. If necessary, poll or wait for completion of |
90 | any reset commands. | 91 | any reset commands. |
91 | 92 | ||
92 | 2) The ndo_stop routine will be called by unregister_netdevice | 93 | 2) The dev->stop routine will be called by unregister_netdevice |
93 | if device is still UP. | 94 | if device is still UP. |
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt index fcb6c71cdb6..162f323a7a1 100644 --- a/Documentation/networking/e100.txt +++ b/Documentation/networking/e100.txt | |||
@@ -94,8 +94,8 @@ Additional Configurations | |||
94 | 94 | ||
95 | Configuring a network driver to load properly when the system is started is | 95 | Configuring a network driver to load properly when the system is started is |
96 | distribution dependent. Typically, the configuration process involves adding | 96 | distribution dependent. Typically, the configuration process involves adding |
97 | an alias line to /etc/modprobe.d/*.conf as well as editing other system | 97 | an alias line to /etc/modules.conf or /etc/modprobe.conf as well as editing |
98 | startup scripts and/or configuration files. Many popular Linux | 98 | other system startup scripts and/or configuration files. Many popular Linux |
99 | distributions ship with tools to make these changes for you. To learn the | 99 | distributions ship with tools to make these changes for you. To learn the |
100 | proper way to configure a network device for your system, refer to your | 100 | proper way to configure a network device for your system, refer to your |
101 | distribution documentation. If during this process you are asked for the | 101 | distribution documentation. If during this process you are asked for the |
@@ -103,7 +103,7 @@ Additional Configurations | |||
103 | PRO/100 Family of Adapters is e100. | 103 | PRO/100 Family of Adapters is e100. |
104 | 104 | ||
105 | As an example, if you install the e100 driver for two PRO/100 adapters | 105 | As an example, if you install the e100 driver for two PRO/100 adapters |
106 | (eth0 and eth1), add the following to a configuraton file in /etc/modprobe.d/ | 106 | (eth0 and eth1), add the following to modules.conf or modprobe.conf: |
107 | 107 | ||
108 | alias eth0 e100 | 108 | alias eth0 e100 |
109 | alias eth1 e100 | 109 | alias eth1 e100 |
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt index d52af53efdc..6e0d2a9613e 100644 --- a/Documentation/networking/fore200e.txt +++ b/Documentation/networking/fore200e.txt | |||
@@ -11,10 +11,12 @@ i386, alpha (untested), powerpc, sparc and sparc64 archs. | |||
11 | 11 | ||
12 | The intent is to enable the use of different models of FORE adapters at the | 12 | The intent is to enable the use of different models of FORE adapters at the |
13 | same time, by hosts that have several bus interfaces (such as PCI+SBUS, | 13 | same time, by hosts that have several bus interfaces (such as PCI+SBUS, |
14 | or PCI+EISA). | 14 | PCI+MCA or PCI+EISA). |
15 | 15 | ||
16 | Only PCI and SBUS devices are currently supported by the driver, but support | 16 | Only PCI and SBUS devices are currently supported by the driver, but support |
17 | for other bus interfaces such as EISA should not be too hard to add. | 17 | for other bus interfaces such as EISA should not be too hard to add (this may |
18 | be more tricky for the MCA bus, though, as FORE made some MCA-specific | ||
19 | modifications to the adapter's AALI interface). | ||
18 | 20 | ||
19 | 21 | ||
20 | Firmware Copyright Notice | 22 | Firmware Copyright Notice |
@@ -42,7 +44,7 @@ the 'software updates' pages. The firmware binaries are part of | |||
42 | the various ForeThought software distributions. | 44 | the various ForeThought software distributions. |
43 | 45 | ||
44 | Notice that different versions of the PCA-200E firmware exist, depending | 46 | Notice that different versions of the PCA-200E firmware exist, depending |
45 | on the endianness of the host architecture. The driver is shipped with | 47 | on the endianess of the host architecture. The driver is shipped with |
46 | both little and big endian PCA firmware images. | 48 | both little and big endian PCA firmware images. |
47 | 49 | ||
48 | Name and location of the new firmware images can be set at kernel | 50 | Name and location of the new firmware images can be set at kernel |
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt index 703cf4370c7..f41ea240522 100644 --- a/Documentation/networking/ieee802154.txt +++ b/Documentation/networking/ieee802154.txt | |||
@@ -4,22 +4,15 @@ | |||
4 | 4 | ||
5 | Introduction | 5 | Introduction |
6 | ============ | 6 | ============ |
7 | The IEEE 802.15.4 working group focuses on standartization of bottom | ||
8 | two layers: Medium Accsess Control (MAC) and Physical (PHY). And there | ||
9 | are mainly two options available for upper layers: | ||
10 | - ZigBee - proprietary protocol from ZigBee Alliance | ||
11 | - 6LowPAN - IPv6 networking over low rate personal area networks | ||
12 | 7 | ||
13 | The Linux-ZigBee project goal is to provide complete implementation | 8 | The Linux-ZigBee project goal is to provide complete implementation |
14 | of IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack | 9 | of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack |
15 | of protocols for organizing Low-Rate Wireless Personal Area Networks. | 10 | of protocols for organizing Low-Rate Wireless Personal Area Networks. |
16 | 11 | ||
17 | The stack is composed of three main parts: | 12 | Currently only IEEE 802.15.4 layer is implemented. We have chosen |
18 | - IEEE 802.15.4 layer; We have chosen to use plain Berkeley socket API, | 13 | to use plain Berkeley socket API, the generic Linux networking stack |
19 | the generic Linux networking stack to transfer IEEE 802.15.4 messages | 14 | to transfer IEEE 802.15.4 messages and a special protocol over genetlink |
20 | and a special protocol over genetlink for configuration/management | 15 | for configuration/management |
21 | - MAC - provides access to shared channel and reliable data delivery | ||
22 | - PHY - represents device drivers | ||
23 | 16 | ||
24 | 17 | ||
25 | Socket API | 18 | Socket API |
@@ -36,6 +29,15 @@ or git tree at git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee). | |||
36 | One can use SOCK_RAW for passing raw data towards device xmit function. YMMV. | 29 | One can use SOCK_RAW for passing raw data towards device xmit function. YMMV. |
37 | 30 | ||
38 | 31 | ||
32 | MLME - MAC Level Management | ||
33 | ============================ | ||
34 | |||
35 | Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands. | ||
36 | See the include/net/nl802154.h header. Our userspace tools package | ||
37 | (see above) provides CLI configuration utility for radio interfaces and simple | ||
38 | coordinator for IEEE 802.15.4 networks as an example users of MLME protocol. | ||
39 | |||
40 | |||
39 | Kernel side | 41 | Kernel side |
40 | ============= | 42 | ============= |
41 | 43 | ||
@@ -49,15 +51,6 @@ Like with WiFi, there are several types of devices implementing IEEE 802.15.4. | |||
49 | Those types of devices require different approach to be hooked into Linux kernel. | 51 | Those types of devices require different approach to be hooked into Linux kernel. |
50 | 52 | ||
51 | 53 | ||
52 | MLME - MAC Level Management | ||
53 | ============================ | ||
54 | |||
55 | Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands. | ||
56 | See the include/net/nl802154.h header. Our userspace tools package | ||
57 | (see above) provides CLI configuration utility for radio interfaces and simple | ||
58 | coordinator for IEEE 802.15.4 networks as an example users of MLME protocol. | ||
59 | |||
60 | |||
61 | HardMAC | 54 | HardMAC |
62 | ======= | 55 | ======= |
63 | 56 | ||
@@ -80,71 +73,8 @@ We provide an example of simple HardMAC driver at drivers/ieee802154/fakehard.c | |||
80 | SoftMAC | 73 | SoftMAC |
81 | ======= | 74 | ======= |
82 | 75 | ||
83 | The MAC is the middle layer in the IEEE 802.15.4 Linux stack. This moment it | 76 | We are going to provide intermediate layer implementing IEEE 802.15.4 MAC |
84 | provides interface for drivers registration and management of slave interfaces. | 77 | in software. This is currently WIP. |
85 | |||
86 | NOTE: Currently the only monitor device type is supported - it's IEEE 802.15.4 | ||
87 | stack interface for network sniffers (e.g. WireShark). | ||
88 | |||
89 | This layer is going to be extended soon. | ||
90 | 78 | ||
91 | See header include/net/mac802154.h and several drivers in drivers/ieee802154/. | 79 | See header include/net/mac802154.h and several drivers in drivers/ieee802154/. |
92 | 80 | ||
93 | |||
94 | Device drivers API | ||
95 | ================== | ||
96 | |||
97 | The include/net/mac802154.h defines following functions: | ||
98 | - struct ieee802154_dev *ieee802154_alloc_device | ||
99 | (size_t priv_size, struct ieee802154_ops *ops): | ||
100 | allocation of IEEE 802.15.4 compatible device | ||
101 | |||
102 | - void ieee802154_free_device(struct ieee802154_dev *dev): | ||
103 | freeing allocated device | ||
104 | |||
105 | - int ieee802154_register_device(struct ieee802154_dev *dev): | ||
106 | register PHY in the system | ||
107 | |||
108 | - void ieee802154_unregister_device(struct ieee802154_dev *dev): | ||
109 | freeing registered PHY | ||
110 | |||
111 | Moreover IEEE 802.15.4 device operations structure should be filled. | ||
112 | |||
113 | Fake drivers | ||
114 | ============ | ||
115 | |||
116 | In addition there are two drivers available which simulate real devices with | ||
117 | HardMAC (fakehard) and SoftMAC (fakelb - IEEE 802.15.4 loopback driver) | ||
118 | interfaces. This option provides possibility to test and debug stack without | ||
119 | usage of real hardware. | ||
120 | |||
121 | See sources in drivers/ieee802154 folder for more details. | ||
122 | |||
123 | |||
124 | 6LoWPAN Linux implementation | ||
125 | ============================ | ||
126 | |||
127 | The IEEE 802.15.4 standard specifies an MTU of 128 bytes, yielding about 80 | ||
128 | octets of actual MAC payload once security is turned on, on a wireless link | ||
129 | with a link throughput of 250 kbps or less. The 6LoWPAN adaptation format | ||
130 | [RFC4944] was specified to carry IPv6 datagrams over such constrained links, | ||
131 | taking into account limited bandwidth, memory, or energy resources that are | ||
132 | expected in applications such as wireless Sensor Networks. [RFC4944] defines | ||
133 | a Mesh Addressing header to support sub-IP forwarding, a Fragmentation header | ||
134 | to support the IPv6 minimum MTU requirement [RFC2460], and stateless header | ||
135 | compression for IPv6 datagrams (LOWPAN_HC1 and LOWPAN_HC2) to reduce the | ||
136 | relatively large IPv6 and UDP headers down to (in the best case) several bytes. | ||
137 | |||
138 | In Semptember 2011 the standard update was published - [RFC6282]. | ||
139 | It deprecates HC1 and HC2 compression and defines IPHC encoding format which is | ||
140 | used in this Linux implementation. | ||
141 | |||
142 | All the code related to 6lowpan you may find in files: net/ieee802154/6lowpan.* | ||
143 | |||
144 | To setup 6lowpan interface you need (busybox release > 1.17.0): | ||
145 | 1. Add IEEE802.15.4 interface and initialize PANid; | ||
146 | 2. Add 6lowpan interface by command like: | ||
147 | # ip link add link wpan0 name lowpan0 type lowpan | ||
148 | 3. Set MAC (if needs): | ||
149 | # ip link set lowpan0 address de:ad:be:ef:ca:fe:ba:be | ||
150 | 4. Bring up 'lowpan0' interface | ||
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c index ac5debb2f16..65968fbf1e4 100644 --- a/Documentation/networking/ifenslave.c +++ b/Documentation/networking/ifenslave.c | |||
@@ -539,14 +539,12 @@ static int if_getconfig(char *ifname) | |||
539 | metric = 0; | 539 | metric = 0; |
540 | } else | 540 | } else |
541 | metric = ifr.ifr_metric; | 541 | metric = ifr.ifr_metric; |
542 | printf("The result of SIOCGIFMETRIC is %d\n", metric); | ||
543 | 542 | ||
544 | strcpy(ifr.ifr_name, ifname); | 543 | strcpy(ifr.ifr_name, ifname); |
545 | if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) | 544 | if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) |
546 | mtu = 0; | 545 | mtu = 0; |
547 | else | 546 | else |
548 | mtu = ifr.ifr_mtu; | 547 | mtu = ifr.ifr_mtu; |
549 | printf("The result of SIOCGIFMTU is %d\n", mtu); | ||
550 | 548 | ||
551 | strcpy(ifr.ifr_name, ifname); | 549 | strcpy(ifr.ifr_name, ifname); |
552 | if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) { | 550 | if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) { |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index dbca6618208..ca5cdcd0f0e 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -20,7 +20,7 @@ ip_no_pmtu_disc - BOOLEAN | |||
20 | default FALSE | 20 | default FALSE |
21 | 21 | ||
22 | min_pmtu - INTEGER | 22 | min_pmtu - INTEGER |
23 | default 552 - minimum discovered Path MTU | 23 | default 562 - minimum discovered Path MTU |
24 | 24 | ||
25 | route/max_size - INTEGER | 25 | route/max_size - INTEGER |
26 | Maximum number of routes allowed in the kernel. Increase | 26 | Maximum number of routes allowed in the kernel. Increase |
@@ -30,24 +30,6 @@ neigh/default/gc_thresh3 - INTEGER | |||
30 | Maximum number of neighbor entries allowed. Increase this | 30 | Maximum number of neighbor entries allowed. Increase this |
31 | when using large numbers of interfaces and when communicating | 31 | when using large numbers of interfaces and when communicating |
32 | with large numbers of directly-connected peers. | 32 | with large numbers of directly-connected peers. |
33 | Default: 1024 | ||
34 | |||
35 | neigh/default/unres_qlen_bytes - INTEGER | ||
36 | The maximum number of bytes which may be used by packets | ||
37 | queued for each unresolved address by other network layers. | ||
38 | (added in linux 3.3) | ||
39 | Setting negative value is meaningless and will return error. | ||
40 | Default: 65536 Bytes(64KB) | ||
41 | |||
42 | neigh/default/unres_qlen - INTEGER | ||
43 | The maximum number of packets which may be queued for each | ||
44 | unresolved address by other network layers. | ||
45 | (deprecated in linux 3.3) : use unres_qlen_bytes instead. | ||
46 | Prior to linux 3.3, the default value is 3 which may cause | ||
47 | unexpected packet loss. The current default value is calculated | ||
48 | according to default value of unres_qlen_bytes and true size of | ||
49 | packet. | ||
50 | Default: 31 | ||
51 | 33 | ||
52 | mtu_expires - INTEGER | 34 | mtu_expires - INTEGER |
53 | Time, in seconds, that cached PMTU information is kept. | 35 | Time, in seconds, that cached PMTU information is kept. |
@@ -56,6 +38,12 @@ min_adv_mss - INTEGER | |||
56 | The advertised MSS depends on the first hop route MTU, but will | 38 | The advertised MSS depends on the first hop route MTU, but will |
57 | never be lower than this setting. | 39 | never be lower than this setting. |
58 | 40 | ||
41 | rt_cache_rebuild_count - INTEGER | ||
42 | The per net-namespace route cache emergency rebuild threshold. | ||
43 | Any net-namespace having its route cache rebuilt due to | ||
44 | a hash bucket chain being too long more than this many times | ||
45 | will have its route caching disabled | ||
46 | |||
59 | IP Fragmentation: | 47 | IP Fragmentation: |
60 | 48 | ||
61 | ipfrag_high_thresh - INTEGER | 49 | ipfrag_high_thresh - INTEGER |
@@ -149,7 +137,7 @@ tcp_adv_win_scale - INTEGER | |||
149 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), | 137 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), |
150 | if it is <= 0. | 138 | if it is <= 0. |
151 | Possible values are [-31, 31], inclusive. | 139 | Possible values are [-31, 31], inclusive. |
152 | Default: 1 | 140 | Default: 2 |
153 | 141 | ||
154 | tcp_allowed_congestion_control - STRING | 142 | tcp_allowed_congestion_control - STRING |
155 | Show/set the congestion control choices available to non-privileged | 143 | Show/set the congestion control choices available to non-privileged |
@@ -177,9 +165,6 @@ tcp_congestion_control - STRING | |||
177 | connections. The algorithm "reno" is always available, but | 165 | connections. The algorithm "reno" is always available, but |
178 | additional choices may be available based on kernel configuration. | 166 | additional choices may be available based on kernel configuration. |
179 | Default is set as part of kernel configuration. | 167 | Default is set as part of kernel configuration. |
180 | For passive connections, the listener congestion control choice | ||
181 | is inherited. | ||
182 | [see setsockopt(listenfd, SOL_TCP, TCP_CONGESTION, "name" ...) ] | ||
183 | 168 | ||
184 | tcp_cookie_size - INTEGER | 169 | tcp_cookie_size - INTEGER |
185 | Default size of TCP Cookie Transactions (TCPCT) option, that may be | 170 | Default size of TCP Cookie Transactions (TCPCT) option, that may be |
@@ -192,31 +177,16 @@ tcp_cookie_size - INTEGER | |||
192 | tcp_dsack - BOOLEAN | 177 | tcp_dsack - BOOLEAN |
193 | Allows TCP to send "duplicate" SACKs. | 178 | Allows TCP to send "duplicate" SACKs. |
194 | 179 | ||
195 | tcp_early_retrans - INTEGER | ||
196 | Enable Early Retransmit (ER), per RFC 5827. ER lowers the threshold | ||
197 | for triggering fast retransmit when the amount of outstanding data is | ||
198 | small and when no previously unsent data can be transmitted (such | ||
199 | that limited transmit could be used). | ||
200 | Possible values: | ||
201 | 0 disables ER | ||
202 | 1 enables ER | ||
203 | 2 enables ER but delays fast recovery and fast retransmit | ||
204 | by a fourth of RTT. This mitigates connection falsely | ||
205 | recovers when network has a small degree of reordering | ||
206 | (less than 3 packets). | ||
207 | Default: 2 | ||
208 | |||
209 | tcp_ecn - INTEGER | 180 | tcp_ecn - INTEGER |
210 | Control use of Explicit Congestion Notification (ECN) by TCP. | 181 | Enable Explicit Congestion Notification (ECN) in TCP. ECN is only |
211 | ECN is used only when both ends of the TCP connection indicate | 182 | used when both ends of the TCP flow support it. It is useful to |
212 | support for it. This feature is useful in avoiding losses due | 183 | avoid losses due to congestion (when the bottleneck router supports |
213 | to congestion by allowing supporting routers to signal | 184 | ECN). |
214 | congestion before having to drop packets. | ||
215 | Possible values are: | 185 | Possible values are: |
216 | 0 Disable ECN. Neither initiate nor accept ECN. | 186 | 0 disable ECN |
217 | 1 Always request ECN on outgoing connection attempts. | 187 | 1 ECN enabled |
218 | 2 Enable ECN when requested by incoming connections | 188 | 2 Only server-side ECN enabled. If the other end does |
219 | but do not request ECN on outgoing connections. | 189 | not support ECN, behavior is like with ECN disabled. |
220 | Default: 2 | 190 | Default: 2 |
221 | 191 | ||
222 | tcp_fack - BOOLEAN | 192 | tcp_fack - BOOLEAN |
@@ -224,14 +194,15 @@ tcp_fack - BOOLEAN | |||
224 | The value is not used, if tcp_sack is not enabled. | 194 | The value is not used, if tcp_sack is not enabled. |
225 | 195 | ||
226 | tcp_fin_timeout - INTEGER | 196 | tcp_fin_timeout - INTEGER |
227 | The length of time an orphaned (no longer referenced by any | 197 | Time to hold socket in state FIN-WAIT-2, if it was closed |
228 | application) connection will remain in the FIN_WAIT_2 state | 198 | by our side. Peer can be broken and never close its side, |
229 | before it is aborted at the local end. While a perfectly | 199 | or even died unexpectedly. Default value is 60sec. |
230 | valid "receive only" state for an un-orphaned connection, an | 200 | Usual value used in 2.2 was 180 seconds, you may restore |
231 | orphaned connection in FIN_WAIT_2 state could otherwise wait | 201 | it, but remember that if your machine is even underloaded WEB server, |
232 | forever for the remote to close its end of the connection. | 202 | you risk to overflow memory with kilotons of dead sockets, |
233 | Cf. tcp_max_orphans | 203 | FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1, |
234 | Default: 60 seconds | 204 | because they eat maximum 1.5K of memory, but they tend |
205 | to live longer. Cf. tcp_max_orphans. | ||
235 | 206 | ||
236 | tcp_frto - INTEGER | 207 | tcp_frto - INTEGER |
237 | Enables Forward RTO-Recovery (F-RTO) defined in RFC4138. | 208 | Enables Forward RTO-Recovery (F-RTO) defined in RFC4138. |
@@ -311,11 +282,11 @@ tcp_max_ssthresh - INTEGER | |||
311 | Default: 0 (off) | 282 | Default: 0 (off) |
312 | 283 | ||
313 | tcp_max_syn_backlog - INTEGER | 284 | tcp_max_syn_backlog - INTEGER |
314 | Maximal number of remembered connection requests, which have not | 285 | Maximal number of remembered connection requests, which are |
315 | received an acknowledgment from connecting client. | 286 | still did not receive an acknowledgment from connecting client. |
316 | The minimal value is 128 for low memory machines, and it will | 287 | Default value is 1024 for systems with more than 128Mb of memory, |
317 | increase in proportion to the memory of machine. | 288 | and 128 for low memory machines. If server suffers of overload, |
318 | If server suffers from overload, try increasing this number. | 289 | try to increase this number. |
319 | 290 | ||
320 | tcp_max_tw_buckets - INTEGER | 291 | tcp_max_tw_buckets - INTEGER |
321 | Maximal number of timewait sockets held by system simultaneously. | 292 | Maximal number of timewait sockets held by system simultaneously. |
@@ -426,7 +397,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max | |||
426 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables | 397 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables |
427 | automatic tuning of that socket's receive buffer size, in which | 398 | automatic tuning of that socket's receive buffer size, in which |
428 | case this value is ignored. | 399 | case this value is ignored. |
429 | Default: between 87380B and 6MB, depending on RAM size. | 400 | Default: between 87380B and 4MB, depending on RAM size. |
430 | 401 | ||
431 | tcp_sack - BOOLEAN | 402 | tcp_sack - BOOLEAN |
432 | Enable select acknowledgments (SACKS). | 403 | Enable select acknowledgments (SACKS). |
@@ -447,9 +418,7 @@ tcp_stdurg - BOOLEAN | |||
447 | tcp_synack_retries - INTEGER | 418 | tcp_synack_retries - INTEGER |
448 | Number of times SYNACKs for a passive TCP connection attempt will | 419 | Number of times SYNACKs for a passive TCP connection attempt will |
449 | be retransmitted. Should not be higher than 255. Default value | 420 | be retransmitted. Should not be higher than 255. Default value |
450 | is 5, which corresponds to 31seconds till the last retransmission | 421 | is 5, which corresponds to ~180seconds. |
451 | with the current initial RTO of 1second. With this the final timeout | ||
452 | for a passive TCP connection will happen after 63seconds. | ||
453 | 422 | ||
454 | tcp_syncookies - BOOLEAN | 423 | tcp_syncookies - BOOLEAN |
455 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES | 424 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES |
@@ -472,40 +441,10 @@ tcp_syncookies - BOOLEAN | |||
472 | SYN flood warnings in logs not being really flooded, your server | 441 | SYN flood warnings in logs not being really flooded, your server |
473 | is seriously misconfigured. | 442 | is seriously misconfigured. |
474 | 443 | ||
475 | tcp_fastopen - INTEGER | ||
476 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data | ||
477 | in the opening SYN packet. To use this feature, the client application | ||
478 | must use sendmsg() or sendto() with MSG_FASTOPEN flag rather than | ||
479 | connect() to perform a TCP handshake automatically. | ||
480 | |||
481 | The values (bitmap) are | ||
482 | 1: Enables sending data in the opening SYN on the client. | ||
483 | 2: Enables TCP Fast Open on the server side, i.e., allowing data in | ||
484 | a SYN packet to be accepted and passed to the application before | ||
485 | 3-way hand shake finishes. | ||
486 | 4: Send data in the opening SYN regardless of cookie availability and | ||
487 | without a cookie option. | ||
488 | 0x100: Accept SYN data w/o validating the cookie. | ||
489 | 0x200: Accept data-in-SYN w/o any cookie option present. | ||
490 | 0x400/0x800: Enable Fast Open on all listeners regardless of the | ||
491 | TCP_FASTOPEN socket option. The two different flags designate two | ||
492 | different ways of setting max_qlen without the TCP_FASTOPEN socket | ||
493 | option. | ||
494 | |||
495 | Default: 0 | ||
496 | |||
497 | Note that the client & server side Fast Open flags (1 and 2 | ||
498 | respectively) must be also enabled before the rest of flags can take | ||
499 | effect. | ||
500 | |||
501 | See include/net/tcp.h and the code for more details. | ||
502 | |||
503 | tcp_syn_retries - INTEGER | 444 | tcp_syn_retries - INTEGER |
504 | Number of times initial SYNs for an active TCP connection attempt | 445 | Number of times initial SYNs for an active TCP connection attempt |
505 | will be retransmitted. Should not be higher than 255. Default value | 446 | will be retransmitted. Should not be higher than 255. Default value |
506 | is 6, which corresponds to 63seconds till the last retransmission | 447 | is 5, which corresponds to ~180seconds. |
507 | with the current initial RTO of 1second. With this the final timeout | ||
508 | for an active TCP connection attempt will happen after 127seconds. | ||
509 | 448 | ||
510 | tcp_timestamps - BOOLEAN | 449 | tcp_timestamps - BOOLEAN |
511 | Enable timestamps as defined in RFC1323. | 450 | Enable timestamps as defined in RFC1323. |
@@ -585,25 +524,6 @@ tcp_thin_dupack - BOOLEAN | |||
585 | Documentation/networking/tcp-thin.txt | 524 | Documentation/networking/tcp-thin.txt |
586 | Default: 0 | 525 | Default: 0 |
587 | 526 | ||
588 | tcp_limit_output_bytes - INTEGER | ||
589 | Controls TCP Small Queue limit per tcp socket. | ||
590 | TCP bulk sender tends to increase packets in flight until it | ||
591 | gets losses notifications. With SNDBUF autotuning, this can | ||
592 | result in a large amount of packets queued in qdisc/device | ||
593 | on the local machine, hurting latency of other flows, for | ||
594 | typical pfifo_fast qdiscs. | ||
595 | tcp_limit_output_bytes limits the number of bytes on qdisc | ||
596 | or device to reduce artificial RTT/cwnd and reduce bufferbloat. | ||
597 | Note: For GSO/TSO enabled flows, we try to have at least two | ||
598 | packets in flight. Reducing tcp_limit_output_bytes might also | ||
599 | reduce the size of individual GSO packet (64KB being the max) | ||
600 | Default: 131072 | ||
601 | |||
602 | tcp_challenge_ack_limit - INTEGER | ||
603 | Limits number of Challenge ACK sent per second, as recommended | ||
604 | in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks) | ||
605 | Default: 100 | ||
606 | |||
607 | UDP variables: | 527 | UDP variables: |
608 | 528 | ||
609 | udp_mem - vector of 3 INTEGERs: min, pressure, max | 529 | udp_mem - vector of 3 INTEGERs: min, pressure, max |
@@ -671,8 +591,15 @@ IP Variables: | |||
671 | ip_local_port_range - 2 INTEGERS | 591 | ip_local_port_range - 2 INTEGERS |
672 | Defines the local port range that is used by TCP and UDP to | 592 | Defines the local port range that is used by TCP and UDP to |
673 | choose the local port. The first number is the first, the | 593 | choose the local port. The first number is the first, the |
674 | second the last local port number. The default values are | 594 | second the last local port number. Default value depends on |
675 | 32768 and 61000 respectively. | 595 | amount of memory available on the system: |
596 | > 128Mb 32768-61000 | ||
597 | < 128Mb 1024-4999 or even less. | ||
598 | This number defines number of active connections, which this | ||
599 | system can issue simultaneously to systems not supporting | ||
600 | TCP extensions (timestamps). With tcp_tw_recycle enabled | ||
601 | (i.e. by default) range 1024-4999 is enough to issue up to | ||
602 | 2000 connections per second to systems supporting timestamps. | ||
676 | 603 | ||
677 | ip_local_reserved_ports - list of comma separated ranges | 604 | ip_local_reserved_ports - list of comma separated ranges |
678 | Specify the ports which are reserved for known third-party | 605 | Specify the ports which are reserved for known third-party |
@@ -910,19 +837,9 @@ accept_source_route - BOOLEAN | |||
910 | FALSE (host) | 837 | FALSE (host) |
911 | 838 | ||
912 | accept_local - BOOLEAN | 839 | accept_local - BOOLEAN |
913 | Accept packets with local source addresses. In combination | 840 | Accept packets with local source addresses. In combination with |
914 | with suitable routing, this can be used to direct packets | 841 | suitable routing, this can be used to direct packets between two |
915 | between two local interfaces over the wire and have them | 842 | local interfaces over the wire and have them accepted properly. |
916 | accepted properly. | ||
917 | |||
918 | rp_filter must be set to a non-zero value in order for | ||
919 | accept_local to have an effect. | ||
920 | |||
921 | default FALSE | ||
922 | |||
923 | route_localnet - BOOLEAN | ||
924 | Do not consider loopback addresses as martian source or destination | ||
925 | while routing. This enables the use of 127/8 for local routing purposes. | ||
926 | default FALSE | 843 | default FALSE |
927 | 844 | ||
928 | rp_filter - INTEGER | 845 | rp_filter - INTEGER |
@@ -1128,11 +1045,6 @@ conf/interface/*: | |||
1128 | accept_ra - INTEGER | 1045 | accept_ra - INTEGER |
1129 | Accept Router Advertisements; autoconfigure using them. | 1046 | Accept Router Advertisements; autoconfigure using them. |
1130 | 1047 | ||
1131 | It also determines whether or not to transmit Router | ||
1132 | Solicitations. If and only if the functional setting is to | ||
1133 | accept Router Advertisements, Router Solicitations will be | ||
1134 | transmitted. | ||
1135 | |||
1136 | Possible values are: | 1048 | Possible values are: |
1137 | 0 Do not accept Router Advertisements. | 1049 | 0 Do not accept Router Advertisements. |
1138 | 1 Accept Router Advertisements if forwarding is disabled. | 1050 | 1 Accept Router Advertisements if forwarding is disabled. |
@@ -1203,14 +1115,14 @@ forwarding - INTEGER | |||
1203 | Possible values are: | 1115 | Possible values are: |
1204 | 0 Forwarding disabled | 1116 | 0 Forwarding disabled |
1205 | 1 Forwarding enabled | 1117 | 1 Forwarding enabled |
1118 | 2 Forwarding enabled (Hybrid Mode) | ||
1206 | 1119 | ||
1207 | FALSE (0): | 1120 | FALSE (0): |
1208 | 1121 | ||
1209 | By default, Host behaviour is assumed. This means: | 1122 | By default, Host behaviour is assumed. This means: |
1210 | 1123 | ||
1211 | 1. IsRouter flag is not set in Neighbour Advertisements. | 1124 | 1. IsRouter flag is not set in Neighbour Advertisements. |
1212 | 2. If accept_ra is TRUE (default), transmit Router | 1125 | 2. Router Solicitations are being sent when necessary. |
1213 | Solicitations. | ||
1214 | 3. If accept_ra is TRUE (default), accept Router | 1126 | 3. If accept_ra is TRUE (default), accept Router |
1215 | Advertisements (and do autoconfiguration). | 1127 | Advertisements (and do autoconfiguration). |
1216 | 4. If accept_redirects is TRUE (default), accept Redirects. | 1128 | 4. If accept_redirects is TRUE (default), accept Redirects. |
@@ -1221,10 +1133,16 @@ forwarding - INTEGER | |||
1221 | This means exactly the reverse from the above: | 1133 | This means exactly the reverse from the above: |
1222 | 1134 | ||
1223 | 1. IsRouter flag is set in Neighbour Advertisements. | 1135 | 1. IsRouter flag is set in Neighbour Advertisements. |
1224 | 2. Router Solicitations are not sent unless accept_ra is 2. | 1136 | 2. Router Solicitations are not sent. |
1225 | 3. Router Advertisements are ignored unless accept_ra is 2. | 1137 | 3. Router Advertisements are ignored unless accept_ra is 2. |
1226 | 4. Redirects are ignored. | 1138 | 4. Redirects are ignored. |
1227 | 1139 | ||
1140 | TRUE (2): | ||
1141 | |||
1142 | Hybrid mode. Same behaviour as TRUE, except for: | ||
1143 | |||
1144 | 2. Router Solicitations are being sent when necessary. | ||
1145 | |||
1228 | Default: 0 (disabled) if global forwarding is disabled (default), | 1146 | Default: 0 (disabled) if global forwarding is disabled (default), |
1229 | otherwise 1 (enabled). | 1147 | otherwise 1 (enabled). |
1230 | 1148 | ||
@@ -1331,12 +1249,6 @@ force_tllao - BOOLEAN | |||
1331 | race condition where the sender deletes the cached link-layer address | 1249 | race condition where the sender deletes the cached link-layer address |
1332 | prior to receiving a response to a previous solicitation." | 1250 | prior to receiving a response to a previous solicitation." |
1333 | 1251 | ||
1334 | ndisc_notify - BOOLEAN | ||
1335 | Define mode for notification of address and device changes. | ||
1336 | 0 - (default): do nothing | ||
1337 | 1 - Generate unsolicited neighbour advertisements when device is brought | ||
1338 | up or hardware address changes. | ||
1339 | |||
1340 | icmp/*: | 1252 | icmp/*: |
1341 | ratelimit - INTEGER | 1253 | ratelimit - INTEGER |
1342 | Limit the maximal rates for sending ICMPv6 packets. | 1254 | Limit the maximal rates for sending ICMPv6 packets. |
@@ -1370,22 +1282,13 @@ bridge-nf-call-ip6tables - BOOLEAN | |||
1370 | bridge-nf-filter-vlan-tagged - BOOLEAN | 1282 | bridge-nf-filter-vlan-tagged - BOOLEAN |
1371 | 1 : pass bridged vlan-tagged ARP/IP/IPv6 traffic to {arp,ip,ip6}tables. | 1283 | 1 : pass bridged vlan-tagged ARP/IP/IPv6 traffic to {arp,ip,ip6}tables. |
1372 | 0 : disable this. | 1284 | 0 : disable this. |
1373 | Default: 0 | 1285 | Default: 1 |
1374 | 1286 | ||
1375 | bridge-nf-filter-pppoe-tagged - BOOLEAN | 1287 | bridge-nf-filter-pppoe-tagged - BOOLEAN |
1376 | 1 : pass bridged pppoe-tagged IP/IPv6 traffic to {ip,ip6}tables. | 1288 | 1 : pass bridged pppoe-tagged IP/IPv6 traffic to {ip,ip6}tables. |
1377 | 0 : disable this. | 1289 | 0 : disable this. |
1378 | Default: 0 | 1290 | Default: 1 |
1379 | 1291 | ||
1380 | bridge-nf-pass-vlan-input-dev - BOOLEAN | ||
1381 | 1: if bridge-nf-filter-vlan-tagged is enabled, try to find a vlan | ||
1382 | interface on the bridge and set the netfilter input device to the vlan. | ||
1383 | This allows use of e.g. "iptables -i br0.1" and makes the REDIRECT | ||
1384 | target work with vlan-on-top-of-bridge interfaces. When no matching | ||
1385 | vlan interface is found, or this switch is off, the input device is | ||
1386 | set to the bridge interface. | ||
1387 | 0: disable bridge netfilter vlan interface lookup. | ||
1388 | Default: 0 | ||
1389 | 1292 | ||
1390 | proc/sys/net/sctp/* Variables: | 1293 | proc/sys/net/sctp/* Variables: |
1391 | 1294 | ||
@@ -1467,20 +1370,6 @@ path_max_retrans - INTEGER | |||
1467 | 1370 | ||
1468 | Default: 5 | 1371 | Default: 5 |
1469 | 1372 | ||
1470 | pf_retrans - INTEGER | ||
1471 | The number of retransmissions that will be attempted on a given path | ||
1472 | before traffic is redirected to an alternate transport (should one | ||
1473 | exist). Note this is distinct from path_max_retrans, as a path that | ||
1474 | passes the pf_retrans threshold can still be used. Its only | ||
1475 | deprioritized when a transmission path is selected by the stack. This | ||
1476 | setting is primarily used to enable fast failover mechanisms without | ||
1477 | having to reduce path_max_retrans to a very low value. See: | ||
1478 | http://www.ietf.org/id/draft-nishida-tsvwg-sctp-failover-05.txt | ||
1479 | for details. Note also that a value of pf_retrans > path_max_retrans | ||
1480 | disables this feature | ||
1481 | |||
1482 | Default: 0 | ||
1483 | |||
1484 | rto_initial - INTEGER | 1373 | rto_initial - INTEGER |
1485 | The initial round trip timeout value in milliseconds that will be used | 1374 | The initial round trip timeout value in milliseconds that will be used |
1486 | in calculating round trip times. This is the initial time interval | 1375 | in calculating round trip times. This is the initial time interval |
@@ -1528,20 +1417,6 @@ cookie_preserve_enable - BOOLEAN | |||
1528 | 1417 | ||
1529 | Default: 1 | 1418 | Default: 1 |
1530 | 1419 | ||
1531 | cookie_hmac_alg - STRING | ||
1532 | Select the hmac algorithm used when generating the cookie value sent by | ||
1533 | a listening sctp socket to a connecting client in the INIT-ACK chunk. | ||
1534 | Valid values are: | ||
1535 | * md5 | ||
1536 | * sha1 | ||
1537 | * none | ||
1538 | Ability to assign md5 or sha1 as the selected alg is predicated on the | ||
1539 | configuration of those algorithms at build time (CONFIG_CRYPTO_MD5 and | ||
1540 | CONFIG_CRYPTO_SHA1). | ||
1541 | |||
1542 | Default: Dependent on configuration. MD5 if available, else SHA1 if | ||
1543 | available, else none. | ||
1544 | |||
1545 | rcvbuf_policy - INTEGER | 1420 | rcvbuf_policy - INTEGER |
1546 | Determines if the receive buffer is attributed to the socket or to | 1421 | Determines if the receive buffer is attributed to the socket or to |
1547 | association. SCTP supports the capability to create multiple | 1422 | association. SCTP supports the capability to create multiple |
@@ -1554,7 +1429,7 @@ rcvbuf_policy - INTEGER | |||
1554 | blocking. | 1429 | blocking. |
1555 | 1430 | ||
1556 | 1: rcvbuf space is per association | 1431 | 1: rcvbuf space is per association |
1557 | 0: rcvbuf space is per socket | 1432 | 0: recbuf space is per socket |
1558 | 1433 | ||
1559 | Default: 0 | 1434 | Default: 0 |
1560 | 1435 | ||
@@ -1604,8 +1479,11 @@ addr_scope_policy - INTEGER | |||
1604 | 1479 | ||
1605 | 1480 | ||
1606 | /proc/sys/net/core/* | 1481 | /proc/sys/net/core/* |
1607 | Please see: Documentation/sysctl/net.txt for descriptions of these entries. | 1482 | dev_weight - INTEGER |
1483 | The maximum number of packets that kernel can handle on a NAPI | ||
1484 | interrupt, it's a Per-CPU variable. | ||
1608 | 1485 | ||
1486 | Default: 64 | ||
1609 | 1487 | ||
1610 | /proc/sys/net/unix/* | 1488 | /proc/sys/net/unix/* |
1611 | max_dgram_qlen - INTEGER | 1489 | max_dgram_qlen - INTEGER |
diff --git a/Documentation/networking/ipv6.txt b/Documentation/networking/ipv6.txt index 6cd74fa5535..9fd7e21296c 100644 --- a/Documentation/networking/ipv6.txt +++ b/Documentation/networking/ipv6.txt | |||
@@ -2,9 +2,9 @@ | |||
2 | Options for the ipv6 module are supplied as parameters at load time. | 2 | Options for the ipv6 module are supplied as parameters at load time. |
3 | 3 | ||
4 | Module options may be given as command line arguments to the insmod | 4 | Module options may be given as command line arguments to the insmod |
5 | or modprobe command, but are usually specified in either | 5 | or modprobe command, but are usually specified in either the |
6 | /etc/modules.d/*.conf configuration files, or in a distro-specific | 6 | /etc/modules.conf or /etc/modprobe.conf configuration file, or in a |
7 | configuration file. | 7 | distro-specific configuration file. |
8 | 8 | ||
9 | The available ipv6 module parameters are listed below. If a parameter | 9 | The available ipv6 module parameters are listed below. If a parameter |
10 | is not specified the default value is used. | 10 | is not specified the default value is used. |
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt index f2a2488f1bf..4ccdbca0381 100644 --- a/Documentation/networking/ipvs-sysctl.txt +++ b/Documentation/networking/ipvs-sysctl.txt | |||
@@ -15,23 +15,6 @@ amemthresh - INTEGER | |||
15 | enabled and the variable is automatically set to 2, otherwise | 15 | enabled and the variable is automatically set to 2, otherwise |
16 | the strategy is disabled and the variable is set to 1. | 16 | the strategy is disabled and the variable is set to 1. |
17 | 17 | ||
18 | conntrack - BOOLEAN | ||
19 | 0 - disabled (default) | ||
20 | not 0 - enabled | ||
21 | |||
22 | If set, maintain connection tracking entries for | ||
23 | connections handled by IPVS. | ||
24 | |||
25 | This should be enabled if connections handled by IPVS are to be | ||
26 | also handled by stateful firewall rules. That is, iptables rules | ||
27 | that make use of connection tracking. It is a performance | ||
28 | optimisation to disable this setting otherwise. | ||
29 | |||
30 | Connections handled by the IPVS FTP application module | ||
31 | will have connection tracking entries regardless of this setting. | ||
32 | |||
33 | Only available when IPVS is compiled with CONFIG_IP_VS_NFCT enabled. | ||
34 | |||
35 | cache_bypass - BOOLEAN | 18 | cache_bypass - BOOLEAN |
36 | 0 - disabled (default) | 19 | 0 - disabled (default) |
37 | not 0 - enabled | 20 | not 0 - enabled |
@@ -56,7 +39,7 @@ debug_level - INTEGER | |||
56 | 11 - IPVS packet handling (ip_vs_in/ip_vs_out) | 39 | 11 - IPVS packet handling (ip_vs_in/ip_vs_out) |
57 | 12 or more - packet traversal | 40 | 12 or more - packet traversal |
58 | 41 | ||
59 | Only available when IPVS is compiled with CONFIG_IP_VS_DEBUG enabled. | 42 | Only available when IPVS is compiled with the CONFIG_IPVS_DEBUG |
60 | 43 | ||
61 | Higher debugging levels include the messages for lower debugging | 44 | Higher debugging levels include the messages for lower debugging |
62 | levels, so setting debug level 2, includes level 0, 1 and 2 | 45 | levels, so setting debug level 2, includes level 0, 1 and 2 |
@@ -140,11 +123,13 @@ nat_icmp_send - BOOLEAN | |||
140 | secure_tcp - INTEGER | 123 | secure_tcp - INTEGER |
141 | 0 - disabled (default) | 124 | 0 - disabled (default) |
142 | 125 | ||
143 | The secure_tcp defense is to use a more complicated TCP state | 126 | The secure_tcp defense is to use a more complicated state |
144 | transition table. For VS/NAT, it also delays entering the | 127 | transition table and some possible short timeouts of each |
145 | TCP ESTABLISHED state until the three way handshake is completed. | 128 | state. In the VS/NAT, it delays the entering the ESTABLISHED |
129 | until the real server starts to send data and ACK packet | ||
130 | (after 3-way handshake). | ||
146 | 131 | ||
147 | The value definition is the same as that of drop_entry and | 132 | The value definition is the same as that of drop_entry or |
148 | drop_packet. | 133 | drop_packet. |
149 | 134 | ||
150 | sync_threshold - INTEGER | 135 | sync_threshold - INTEGER |
@@ -156,36 +141,3 @@ sync_threshold - INTEGER | |||
156 | synchronized, every time the number of its incoming packets | 141 | synchronized, every time the number of its incoming packets |
157 | modulus 50 equals the threshold. The range of the threshold is | 142 | modulus 50 equals the threshold. The range of the threshold is |
158 | from 0 to 49. | 143 | from 0 to 49. |
159 | |||
160 | snat_reroute - BOOLEAN | ||
161 | 0 - disabled | ||
162 | not 0 - enabled (default) | ||
163 | |||
164 | If enabled, recalculate the route of SNATed packets from | ||
165 | realservers so that they are routed as if they originate from the | ||
166 | director. Otherwise they are routed as if they are forwarded by the | ||
167 | director. | ||
168 | |||
169 | If policy routing is in effect then it is possible that the route | ||
170 | of a packet originating from a director is routed differently to a | ||
171 | packet being forwarded by the director. | ||
172 | |||
173 | If policy routing is not in effect then the recalculated route will | ||
174 | always be the same as the original route so it is an optimisation | ||
175 | to disable snat_reroute and avoid the recalculation. | ||
176 | |||
177 | sync_version - INTEGER | ||
178 | default 1 | ||
179 | |||
180 | The version of the synchronisation protocol used when sending | ||
181 | synchronisation messages. | ||
182 | |||
183 | 0 selects the original synchronisation protocol (version 0). This | ||
184 | should be used when sending synchronisation messages to a legacy | ||
185 | system that only understands the original synchronisation protocol. | ||
186 | |||
187 | 1 selects the current synchronisation protocol (version 1). This | ||
188 | should be used where possible. | ||
189 | |||
190 | Kernels with this sync_version entry are able to receive messages | ||
191 | of both version 1 and version 2 of the synchronisation protocol. | ||
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt index d75a1f9565b..e196f16df31 100644 --- a/Documentation/networking/ixgb.txt +++ b/Documentation/networking/ixgb.txt | |||
@@ -274,9 +274,9 @@ Additional Configurations | |||
274 | ------------------------------------------------- | 274 | ------------------------------------------------- |
275 | Configuring a network driver to load properly when the system is started is | 275 | Configuring a network driver to load properly when the system is started is |
276 | distribution dependent. Typically, the configuration process involves adding | 276 | distribution dependent. Typically, the configuration process involves adding |
277 | an alias line to files in /etc/modprobe.d/ as well as editing other system | 277 | an alias line to /etc/modprobe.conf as well as editing other system startup |
278 | startup scripts and/or configuration files. Many popular Linux distributions | 278 | scripts and/or configuration files. Many popular Linux distributions ship |
279 | ship with tools to make these changes for you. To learn the proper way to | 279 | with tools to make these changes for you. To learn the proper way to |
280 | configure a network device for your system, refer to your distribution | 280 | configure a network device for your system, refer to your distribution |
281 | documentation. If during this process you are asked for the driver or module | 281 | documentation. If during this process you are asked for the driver or module |
282 | name, the name for the Linux Base Driver for the Intel 10GbE Family of | 282 | name, the name for the Linux Base Driver for the Intel 10GbE Family of |
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt index e63fc1f7bf8..e7bf3979fac 100644 --- a/Documentation/networking/l2tp.txt +++ b/Documentation/networking/l2tp.txt | |||
@@ -111,7 +111,7 @@ When creating PPPoL2TP sockets, the application provides information | |||
111 | to the driver about the socket in a socket connect() call. Source and | 111 | to the driver about the socket in a socket connect() call. Source and |
112 | destination tunnel and session ids are provided, as well as the file | 112 | destination tunnel and session ids are provided, as well as the file |
113 | descriptor of a UDP socket. See struct pppol2tp_addr in | 113 | descriptor of a UDP socket. See struct pppol2tp_addr in |
114 | include/linux/if_pppol2tp.h. Note that zero tunnel / session ids are | 114 | include/linux/if_ppp.h. Note that zero tunnel / session ids are |
115 | treated specially. When creating the per-tunnel PPPoL2TP management | 115 | treated specially. When creating the per-tunnel PPPoL2TP management |
116 | socket in Step 2 above, zero source and destination session ids are | 116 | socket in Step 2 above, zero source and destination session ids are |
117 | specified, which tells the driver to prepare the supplied UDP file | 117 | specified, which tells the driver to prepare the supplied UDP file |
diff --git a/Documentation/networking/ltpc.txt b/Documentation/networking/ltpc.txt index 0bf3220c715..fe2a9129d95 100644 --- a/Documentation/networking/ltpc.txt +++ b/Documentation/networking/ltpc.txt | |||
@@ -25,7 +25,7 @@ the driver will try to determine them itself. | |||
25 | 25 | ||
26 | If you load the driver as a module, you can pass the parameters "io=", | 26 | If you load the driver as a module, you can pass the parameters "io=", |
27 | "irq=", and "dma=" on the command line with insmod or modprobe, or add | 27 | "irq=", and "dma=" on the command line with insmod or modprobe, or add |
28 | them as options in a configuration file in /etc/modprobe.d/ directory: | 28 | them as options in /etc/modprobe.conf: |
29 | 29 | ||
30 | alias lt0 ltpc # autoload the module when the interface is configured | 30 | alias lt0 ltpc # autoload the module when the interface is configured |
31 | options ltpc io=0x240 irq=9 dma=1 | 31 | options ltpc io=0x240 irq=9 dma=1 |
diff --git a/Documentation/networking/mac80211-auth-assoc-deauth.txt b/Documentation/networking/mac80211-auth-assoc-deauth.txt deleted file mode 100644 index d7a15fe91bf..00000000000 --- a/Documentation/networking/mac80211-auth-assoc-deauth.txt +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | # | ||
2 | # This outlines the Linux authentication/association and | ||
3 | # deauthentication/disassociation flows. | ||
4 | # | ||
5 | # This can be converted into a diagram using the service | ||
6 | # at http://www.websequencediagrams.com/ | ||
7 | # | ||
8 | |||
9 | participant userspace | ||
10 | participant mac80211 | ||
11 | participant driver | ||
12 | |||
13 | alt authentication needed (not FT) | ||
14 | userspace->mac80211: authenticate | ||
15 | |||
16 | alt authenticated/authenticating already | ||
17 | mac80211->driver: sta_state(AP, not-exists) | ||
18 | mac80211->driver: bss_info_changed(clear BSSID) | ||
19 | else associated | ||
20 | note over mac80211,driver | ||
21 | like deauth/disassoc, without sending the | ||
22 | BA session stop & deauth/disassoc frames | ||
23 | end note | ||
24 | end | ||
25 | |||
26 | mac80211->driver: config(channel, channel type) | ||
27 | mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) | ||
28 | mac80211->driver: sta_state(AP, exists) | ||
29 | |||
30 | alt no probe request data known | ||
31 | mac80211->driver: TX directed probe request | ||
32 | driver->mac80211: RX probe response | ||
33 | end | ||
34 | |||
35 | mac80211->driver: TX auth frame | ||
36 | driver->mac80211: RX auth frame | ||
37 | |||
38 | alt WEP shared key auth | ||
39 | mac80211->driver: TX auth frame | ||
40 | driver->mac80211: RX auth frame | ||
41 | end | ||
42 | |||
43 | mac80211->driver: sta_state(AP, authenticated) | ||
44 | mac80211->userspace: RX auth frame | ||
45 | |||
46 | end | ||
47 | |||
48 | userspace->mac80211: associate | ||
49 | alt authenticated or associated | ||
50 | note over mac80211,driver: cleanup like for authenticate | ||
51 | end | ||
52 | |||
53 | alt not previously authenticated (FT) | ||
54 | mac80211->driver: config(channel, channel type) | ||
55 | mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) | ||
56 | mac80211->driver: sta_state(AP, exists) | ||
57 | mac80211->driver: sta_state(AP, authenticated) | ||
58 | end | ||
59 | mac80211->driver: TX assoc | ||
60 | driver->mac80211: RX assoc response | ||
61 | note over mac80211: init rate control | ||
62 | mac80211->driver: sta_state(AP, associated) | ||
63 | |||
64 | alt not using WPA | ||
65 | mac80211->driver: sta_state(AP, authorized) | ||
66 | end | ||
67 | |||
68 | mac80211->driver: set up QoS parameters | ||
69 | |||
70 | mac80211->driver: bss_info_changed(QoS, HT, associated with AID) | ||
71 | mac80211->userspace: associated | ||
72 | |||
73 | note left of userspace: associated now | ||
74 | |||
75 | alt using WPA | ||
76 | note over userspace | ||
77 | do 4-way-handshake | ||
78 | (data frames) | ||
79 | end note | ||
80 | userspace->mac80211: authorized | ||
81 | mac80211->driver: sta_state(AP, authorized) | ||
82 | end | ||
83 | |||
84 | userspace->mac80211: deauthenticate/disassociate | ||
85 | mac80211->driver: stop BA sessions | ||
86 | mac80211->driver: TX deauth/disassoc | ||
87 | mac80211->driver: flush frames | ||
88 | mac80211->driver: sta_state(AP,associated) | ||
89 | mac80211->driver: sta_state(AP,authenticated) | ||
90 | mac80211->driver: sta_state(AP,exists) | ||
91 | mac80211->driver: sta_state(AP,not-exists) | ||
92 | mac80211->driver: turn off powersave | ||
93 | mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...) | ||
94 | mac80211->driver: config(channel type to non-HT) | ||
95 | mac80211->userspace: disconnected | ||
diff --git a/Documentation/networking/mac80211-injection.txt b/Documentation/networking/mac80211-injection.txt index 3a930072b16..b30e81ad530 100644 --- a/Documentation/networking/mac80211-injection.txt +++ b/Documentation/networking/mac80211-injection.txt | |||
@@ -23,10 +23,6 @@ radiotap headers and used to control injection: | |||
23 | IEEE80211_RADIOTAP_F_FRAG: frame will be fragmented if longer than the | 23 | IEEE80211_RADIOTAP_F_FRAG: frame will be fragmented if longer than the |
24 | current fragmentation threshold. | 24 | current fragmentation threshold. |
25 | 25 | ||
26 | * IEEE80211_RADIOTAP_TX_FLAGS | ||
27 | |||
28 | IEEE80211_RADIOTAP_F_TX_NOACK: frame should be sent without waiting for | ||
29 | an ACK even if it is a unicast frame | ||
30 | 26 | ||
31 | The injection code can also skip all other currently defined radiotap fields | 27 | The injection code can also skip all other currently defined radiotap fields |
32 | facilitating replay of captured radiotap headers directly. | 28 | facilitating replay of captured radiotap headers directly. |
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt index 2e9e0ae2cd4..8d022073e3e 100644 --- a/Documentation/networking/netconsole.txt +++ b/Documentation/networking/netconsole.txt | |||
@@ -51,23 +51,8 @@ Built-in netconsole starts immediately after the TCP stack is | |||
51 | initialized and attempts to bring up the supplied dev at the supplied | 51 | initialized and attempts to bring up the supplied dev at the supplied |
52 | address. | 52 | address. |
53 | 53 | ||
54 | The remote host has several options to receive the kernel messages, | 54 | The remote host can run either 'netcat -u -l -p <port>', |
55 | for example: | 55 | 'nc -l -u <port>' or syslogd. |
56 | |||
57 | 1) syslogd | ||
58 | |||
59 | 2) netcat | ||
60 | |||
61 | On distributions using a BSD-based netcat version (e.g. Fedora, | ||
62 | openSUSE and Ubuntu) the listening port must be specified without | ||
63 | the -p switch: | ||
64 | |||
65 | 'nc -u -l -p <port>' / 'nc -u -l <port>' or | ||
66 | 'netcat -u -l -p <port>' / 'netcat -u -l <port>' | ||
67 | |||
68 | 3) socat | ||
69 | |||
70 | 'socat udp-recv:<port> -' | ||
71 | 56 | ||
72 | Dynamic reconfiguration: | 57 | Dynamic reconfiguration: |
73 | ======================== | 58 | ======================== |
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index f310edec8a7..4b1c0dcef84 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt | |||
@@ -152,16 +152,3 @@ NETIF_F_VLAN_CHALLENGED should be set for devices which can't cope with VLAN | |||
152 | headers. Some drivers set this because the cards can't handle the bigger MTU. | 152 | headers. Some drivers set this because the cards can't handle the bigger MTU. |
153 | [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU | 153 | [FIXME: Those cases could be fixed in VLAN code by allowing only reduced-MTU |
154 | VLANs. This may be not useful, though.] | 154 | VLANs. This may be not useful, though.] |
155 | |||
156 | * rx-fcs | ||
157 | |||
158 | This requests that the NIC append the Ethernet Frame Checksum (FCS) | ||
159 | to the end of the skb data. This allows sniffers and other tools to | ||
160 | read the CRC recorded by the NIC on receipt of the packet. | ||
161 | |||
162 | * rx-all | ||
163 | |||
164 | This requests that the NIC receive all possible frames, including errored | ||
165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with | ||
166 | bad packets on it. Some NICs may receive more packets if also put into normal | ||
167 | PROMISC mode. | ||
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index c7ecc708049..87b3d15f523 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt | |||
@@ -47,32 +47,33 @@ packets is preferred. | |||
47 | 47 | ||
48 | struct net_device synchronization rules | 48 | struct net_device synchronization rules |
49 | ======================================= | 49 | ======================================= |
50 | ndo_open: | 50 | dev->open: |
51 | Synchronization: rtnl_lock() semaphore. | 51 | Synchronization: rtnl_lock() semaphore. |
52 | Context: process | 52 | Context: process |
53 | 53 | ||
54 | ndo_stop: | 54 | dev->stop: |
55 | Synchronization: rtnl_lock() semaphore. | 55 | Synchronization: rtnl_lock() semaphore. |
56 | Context: process | 56 | Context: process |
57 | Note: netif_running() is guaranteed false | 57 | Note1: netif_running() is guaranteed false |
58 | Note2: dev->poll() is guaranteed to be stopped | ||
58 | 59 | ||
59 | ndo_do_ioctl: | 60 | dev->do_ioctl: |
60 | Synchronization: rtnl_lock() semaphore. | 61 | Synchronization: rtnl_lock() semaphore. |
61 | Context: process | 62 | Context: process |
62 | 63 | ||
63 | ndo_get_stats: | 64 | dev->get_stats: |
64 | Synchronization: dev_base_lock rwlock. | 65 | Synchronization: dev_base_lock rwlock. |
65 | Context: nominally process, but don't sleep inside an rwlock | 66 | Context: nominally process, but don't sleep inside an rwlock |
66 | 67 | ||
67 | ndo_start_xmit: | 68 | dev->hard_start_xmit: |
68 | Synchronization: __netif_tx_lock spinlock. | 69 | Synchronization: netif_tx_lock spinlock. |
69 | 70 | ||
70 | When the driver sets NETIF_F_LLTX in dev->features this will be | 71 | When the driver sets NETIF_F_LLTX in dev->features this will be |
71 | called without holding netif_tx_lock. In this case the driver | 72 | called without holding netif_tx_lock. In this case the driver |
72 | has to lock by itself when needed. It is recommended to use a try lock | 73 | has to lock by itself when needed. It is recommended to use a try lock |
73 | for this and return NETDEV_TX_LOCKED when the spin lock fails. | 74 | for this and return NETDEV_TX_LOCKED when the spin lock fails. |
74 | The locking there should also properly protect against | 75 | The locking there should also properly protect against |
75 | set_rx_mode. Note that the use of NETIF_F_LLTX is deprecated. | 76 | set_multicast_list. Note that the use of NETIF_F_LLTX is deprecated. |
76 | Don't use it for new drivers. | 77 | Don't use it for new drivers. |
77 | 78 | ||
78 | Context: Process with BHs disabled or BH (timer), | 79 | Context: Process with BHs disabled or BH (timer), |
@@ -86,20 +87,20 @@ ndo_start_xmit: | |||
86 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. | 87 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. |
87 | Only valid when NETIF_F_LLTX is set. | 88 | Only valid when NETIF_F_LLTX is set. |
88 | 89 | ||
89 | ndo_tx_timeout: | 90 | dev->tx_timeout: |
90 | Synchronization: netif_tx_lock spinlock; all TX queues frozen. | 91 | Synchronization: netif_tx_lock spinlock. |
91 | Context: BHs disabled | 92 | Context: BHs disabled |
92 | Notes: netif_queue_stopped() is guaranteed true | 93 | Notes: netif_queue_stopped() is guaranteed true |
93 | 94 | ||
94 | ndo_set_rx_mode: | 95 | dev->set_multicast_list: |
95 | Synchronization: netif_addr_lock spinlock. | 96 | Synchronization: netif_tx_lock spinlock. |
96 | Context: BHs disabled | 97 | Context: BHs disabled |
97 | 98 | ||
98 | struct napi_struct synchronization rules | 99 | struct napi_struct synchronization rules |
99 | ======================================== | 100 | ======================================== |
100 | napi->poll: | 101 | napi->poll: |
101 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device | 102 | Synchronization: NAPI_STATE_SCHED bit in napi->state. Device |
102 | driver's ndo_stop method will invoke napi_disable() on | 103 | driver's dev->close method will invoke napi_disable() on |
103 | all NAPI instances which will do a sleeping poll on the | 104 | all NAPI instances which will do a sleeping poll on the |
104 | NAPI_STATE_SCHED napi->state bit, waiting for all pending | 105 | NAPI_STATE_SCHED napi->state bit, waiting for all pending |
105 | NAPI activity to cease. | 106 | NAPI activity to cease. |
diff --git a/Documentation/networking/openvswitch.txt b/Documentation/networking/openvswitch.txt deleted file mode 100644 index 8fa2dd1e792..00000000000 --- a/Documentation/networking/openvswitch.txt +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | Open vSwitch datapath developer documentation | ||
2 | ============================================= | ||
3 | |||
4 | The Open vSwitch kernel module allows flexible userspace control over | ||
5 | flow-level packet processing on selected network devices. It can be | ||
6 | used to implement a plain Ethernet switch, network device bonding, | ||
7 | VLAN processing, network access control, flow-based network control, | ||
8 | and so on. | ||
9 | |||
10 | The kernel module implements multiple "datapaths" (analogous to | ||
11 | bridges), each of which can have multiple "vports" (analogous to ports | ||
12 | within a bridge). Each datapath also has associated with it a "flow | ||
13 | table" that userspace populates with "flows" that map from keys based | ||
14 | on packet headers and metadata to sets of actions. The most common | ||
15 | action forwards the packet to another vport; other actions are also | ||
16 | implemented. | ||
17 | |||
18 | When a packet arrives on a vport, the kernel module processes it by | ||
19 | extracting its flow key and looking it up in the flow table. If there | ||
20 | is a matching flow, it executes the associated actions. If there is | ||
21 | no match, it queues the packet to userspace for processing (as part of | ||
22 | its processing, userspace will likely set up a flow to handle further | ||
23 | packets of the same type entirely in-kernel). | ||
24 | |||
25 | |||
26 | Flow key compatibility | ||
27 | ---------------------- | ||
28 | |||
29 | Network protocols evolve over time. New protocols become important | ||
30 | and existing protocols lose their prominence. For the Open vSwitch | ||
31 | kernel module to remain relevant, it must be possible for newer | ||
32 | versions to parse additional protocols as part of the flow key. It | ||
33 | might even be desirable, someday, to drop support for parsing | ||
34 | protocols that have become obsolete. Therefore, the Netlink interface | ||
35 | to Open vSwitch is designed to allow carefully written userspace | ||
36 | applications to work with any version of the flow key, past or future. | ||
37 | |||
38 | To support this forward and backward compatibility, whenever the | ||
39 | kernel module passes a packet to userspace, it also passes along the | ||
40 | flow key that it parsed from the packet. Userspace then extracts its | ||
41 | own notion of a flow key from the packet and compares it against the | ||
42 | kernel-provided version: | ||
43 | |||
44 | - If userspace's notion of the flow key for the packet matches the | ||
45 | kernel's, then nothing special is necessary. | ||
46 | |||
47 | - If the kernel's flow key includes more fields than the userspace | ||
48 | version of the flow key, for example if the kernel decoded IPv6 | ||
49 | headers but userspace stopped at the Ethernet type (because it | ||
50 | does not understand IPv6), then again nothing special is | ||
51 | necessary. Userspace can still set up a flow in the usual way, | ||
52 | as long as it uses the kernel-provided flow key to do it. | ||
53 | |||
54 | - If the userspace flow key includes more fields than the | ||
55 | kernel's, for example if userspace decoded an IPv6 header but | ||
56 | the kernel stopped at the Ethernet type, then userspace can | ||
57 | forward the packet manually, without setting up a flow in the | ||
58 | kernel. This case is bad for performance because every packet | ||
59 | that the kernel considers part of the flow must go to userspace, | ||
60 | but the forwarding behavior is correct. (If userspace can | ||
61 | determine that the values of the extra fields would not affect | ||
62 | forwarding behavior, then it could set up a flow anyway.) | ||
63 | |||
64 | How flow keys evolve over time is important to making this work, so | ||
65 | the following sections go into detail. | ||
66 | |||
67 | |||
68 | Flow key format | ||
69 | --------------- | ||
70 | |||
71 | A flow key is passed over a Netlink socket as a sequence of Netlink | ||
72 | attributes. Some attributes represent packet metadata, defined as any | ||
73 | information about a packet that cannot be extracted from the packet | ||
74 | itself, e.g. the vport on which the packet was received. Most | ||
75 | attributes, however, are extracted from headers within the packet, | ||
76 | e.g. source and destination addresses from Ethernet, IP, or TCP | ||
77 | headers. | ||
78 | |||
79 | The <linux/openvswitch.h> header file defines the exact format of the | ||
80 | flow key attributes. For informal explanatory purposes here, we write | ||
81 | them as comma-separated strings, with parentheses indicating arguments | ||
82 | and nesting. For example, the following could represent a flow key | ||
83 | corresponding to a TCP packet that arrived on vport 1: | ||
84 | |||
85 | in_port(1), eth(src=e0:91:f5:21:d0:b2, dst=00:02:e3:0f:80:a4), | ||
86 | eth_type(0x0800), ipv4(src=172.16.0.20, dst=172.18.0.52, proto=17, tos=0, | ||
87 | frag=no), tcp(src=49163, dst=80) | ||
88 | |||
89 | Often we ellipsize arguments not important to the discussion, e.g.: | ||
90 | |||
91 | in_port(1), eth(...), eth_type(0x0800), ipv4(...), tcp(...) | ||
92 | |||
93 | |||
94 | Basic rule for evolving flow keys | ||
95 | --------------------------------- | ||
96 | |||
97 | Some care is needed to really maintain forward and backward | ||
98 | compatibility for applications that follow the rules listed under | ||
99 | "Flow key compatibility" above. | ||
100 | |||
101 | The basic rule is obvious: | ||
102 | |||
103 | ------------------------------------------------------------------ | ||
104 | New network protocol support must only supplement existing flow | ||
105 | key attributes. It must not change the meaning of already defined | ||
106 | flow key attributes. | ||
107 | ------------------------------------------------------------------ | ||
108 | |||
109 | This rule does have less-obvious consequences so it is worth working | ||
110 | through a few examples. Suppose, for example, that the kernel module | ||
111 | did not already implement VLAN parsing. Instead, it just interpreted | ||
112 | the 802.1Q TPID (0x8100) as the Ethertype then stopped parsing the | ||
113 | packet. The flow key for any packet with an 802.1Q header would look | ||
114 | essentially like this, ignoring metadata: | ||
115 | |||
116 | eth(...), eth_type(0x8100) | ||
117 | |||
118 | Naively, to add VLAN support, it makes sense to add a new "vlan" flow | ||
119 | key attribute to contain the VLAN tag, then continue to decode the | ||
120 | encapsulated headers beyond the VLAN tag using the existing field | ||
121 | definitions. With this change, a TCP packet in VLAN 10 would have a | ||
122 | flow key much like this: | ||
123 | |||
124 | eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...) | ||
125 | |||
126 | But this change would negatively affect a userspace application that | ||
127 | has not been updated to understand the new "vlan" flow key attribute. | ||
128 | The application could, following the flow compatibility rules above, | ||
129 | ignore the "vlan" attribute that it does not understand and therefore | ||
130 | assume that the flow contained IP packets. This is a bad assumption | ||
131 | (the flow only contains IP packets if one parses and skips over the | ||
132 | 802.1Q header) and it could cause the application's behavior to change | ||
133 | across kernel versions even though it follows the compatibility rules. | ||
134 | |||
135 | The solution is to use a set of nested attributes. This is, for | ||
136 | example, why 802.1Q support uses nested attributes. A TCP packet in | ||
137 | VLAN 10 is actually expressed as: | ||
138 | |||
139 | eth(...), eth_type(0x8100), vlan(vid=10, pcp=0), encap(eth_type(0x0800), | ||
140 | ip(proto=6, ...), tcp(...))) | ||
141 | |||
142 | Notice how the "eth_type", "ip", and "tcp" flow key attributes are | ||
143 | nested inside the "encap" attribute. Thus, an application that does | ||
144 | not understand the "vlan" key will not see either of those attributes | ||
145 | and therefore will not misinterpret them. (Also, the outer eth_type | ||
146 | is still 0x8100, not changed to 0x0800.) | ||
147 | |||
148 | Handling malformed packets | ||
149 | -------------------------- | ||
150 | |||
151 | Don't drop packets in the kernel for malformed protocol headers, bad | ||
152 | checksums, etc. This would prevent userspace from implementing a | ||
153 | simple Ethernet switch that forwards every packet. | ||
154 | |||
155 | Instead, in such a case, include an attribute with "empty" content. | ||
156 | It doesn't matter if the empty content could be valid protocol values, | ||
157 | as long as those values are rarely seen in practice, because userspace | ||
158 | can always forward all packets with those values to userspace and | ||
159 | handle them individually. | ||
160 | |||
161 | For example, consider a packet that contains an IP header that | ||
162 | indicates protocol 6 for TCP, but which is truncated just after the IP | ||
163 | header, so that the TCP header is missing. The flow key for this | ||
164 | packet would include a tcp attribute with all-zero src and dst, like | ||
165 | this: | ||
166 | |||
167 | eth(...), eth_type(0x0800), ip(proto=6, ...), tcp(src=0, dst=0) | ||
168 | |||
169 | As another example, consider a packet with an Ethernet type of 0x8100, | ||
170 | indicating that a VLAN TCI should follow, but which is truncated just | ||
171 | after the Ethernet type. The flow key for this packet would include | ||
172 | an all-zero-bits vlan and an empty encap attribute, like this: | ||
173 | |||
174 | eth(...), eth_type(0x8100), vlan(0), encap() | ||
175 | |||
176 | Unlike a TCP packet with source and destination ports 0, an | ||
177 | all-zero-bits VLAN TCI is not that rare, so the CFI bit (aka | ||
178 | VLAN_TAG_PRESENT inside the kernel) is ordinarily set in a vlan | ||
179 | attribute expressly to allow this situation to be distinguished. | ||
180 | Thus, the flow key in this second example unambiguously indicates a | ||
181 | missing or malformed VLAN TCI. | ||
182 | |||
183 | Other rules | ||
184 | ----------- | ||
185 | |||
186 | The other rules for flow keys are much less subtle: | ||
187 | |||
188 | - Duplicate attributes are not allowed at a given nesting level. | ||
189 | |||
190 | - Ordering of attributes is not significant. | ||
191 | |||
192 | - When the kernel sends a given flow key to userspace, it always | ||
193 | composes it the same way. This allows userspace to hash and | ||
194 | compare entire flow keys that it may not be able to fully | ||
195 | interpret. | ||
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 94444b152fb..4acea660372 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -3,9 +3,9 @@ | |||
3 | -------------------------------------------------------------------------------- | 3 | -------------------------------------------------------------------------------- |
4 | 4 | ||
5 | This file documents the mmap() facility available with the PACKET | 5 | This file documents the mmap() facility available with the PACKET |
6 | socket interface on 2.4/2.6/3.x 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 | i) capture network traffic with utilities like tcpdump, ii) transmit network | 7 | capture network traffic with utilities like tcpdump or any other that needs |
8 | traffic, or any other that needs 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://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap | 11 | http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap |
@@ -21,18 +21,19 @@ Please send your comments to | |||
21 | + Why use PACKET_MMAP | 21 | + Why use PACKET_MMAP |
22 | -------------------------------------------------------------------------------- | 22 | -------------------------------------------------------------------------------- |
23 | 23 | ||
24 | In Linux 2.4/2.6/3.x if PACKET_MMAP is not enabled, the capture process is very | 24 | In Linux 2.4/2.6 if PACKET_MMAP is not enabled, the capture process is very |
25 | inefficient. It uses very limited buffers and requires one system call to | 25 | inefficient. It uses very limited buffers and requires one system call |
26 | capture each packet, it requires two if you want to get packet's timestamp | 26 | to capture each packet, it requires two if you want to get packet's |
27 | (like libpcap always does). | 27 | timestamp (like libpcap always does). |
28 | 28 | ||
29 | In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size | 29 | In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size |
30 | configurable circular buffer mapped in user space that can be used to either | 30 | configurable circular buffer mapped in user space that can be used to either |
31 | send or receive packets. This way reading packets just needs to wait for them, | 31 | send or receive packets. This way reading packets just needs to wait for them, |
32 | most of the time there is no need to issue a single system call. Concerning | 32 | most of the time there is no need to issue a single system call. Concerning |
33 | transmission, multiple packets can be sent through one system call to get the | 33 | transmission, multiple packets can be sent through one system call to get the |
34 | highest bandwidth. By using a shared buffer between the kernel and the user | 34 | highest bandwidth. |
35 | also has the benefit of minimizing packet copies. | 35 | By using a shared buffer between the kernel and the user also has the benefit |
36 | of minimizing packet copies. | ||
36 | 37 | ||
37 | It's fine to use PACKET_MMAP to improve the performance of the capture and | 38 | It's fine to use PACKET_MMAP to improve the performance of the capture and |
38 | transmission process, but it isn't everything. At least, if you are capturing | 39 | transmission process, but it isn't everything. At least, if you are capturing |
@@ -40,8 +41,7 @@ at high speeds (this is relative to the cpu speed), you should check if the | |||
40 | device driver of your network interface card supports some sort of interrupt | 41 | device driver of your network interface card supports some sort of interrupt |
41 | load mitigation or (even better) if it supports NAPI, also make sure it is | 42 | load mitigation or (even better) if it supports NAPI, also make sure it is |
42 | enabled. For transmission, check the MTU (Maximum Transmission Unit) used and | 43 | enabled. For transmission, check the MTU (Maximum Transmission Unit) used and |
43 | supported by devices of your network. CPU IRQ pinning of your network interface | 44 | supported by devices of your network. |
44 | card can also be an advantage. | ||
45 | 45 | ||
46 | -------------------------------------------------------------------------------- | 46 | -------------------------------------------------------------------------------- |
47 | + How to use mmap() to improve capture process | 47 | + How to use mmap() to improve capture process |
@@ -87,7 +87,9 @@ the following process: | |||
87 | socket creation and destruction is straight forward, and is done | 87 | socket creation and destruction is straight forward, and is done |
88 | the same way with or without PACKET_MMAP: | 88 | the same way with or without PACKET_MMAP: |
89 | 89 | ||
90 | int fd = socket(PF_PACKET, mode, htons(ETH_P_ALL)); | 90 | int fd; |
91 | |||
92 | fd= socket(PF_PACKET, mode, htons(ETH_P_ALL)) | ||
91 | 93 | ||
92 | where mode is SOCK_RAW for the raw interface were link level | 94 | where mode is SOCK_RAW for the raw interface were link level |
93 | information can be captured or SOCK_DGRAM for the cooked | 95 | information can be captured or SOCK_DGRAM for the cooked |
@@ -153,7 +155,7 @@ As capture, each frame contains two parts: | |||
153 | 155 | ||
154 | /* fill sockaddr_ll struct to prepare binding */ | 156 | /* fill sockaddr_ll struct to prepare binding */ |
155 | my_addr.sll_family = AF_PACKET; | 157 | my_addr.sll_family = AF_PACKET; |
156 | my_addr.sll_protocol = htons(ETH_P_ALL); | 158 | my_addr.sll_protocol = ETH_P_ALL; |
157 | my_addr.sll_ifindex = s_ifr.ifr_ifindex; | 159 | my_addr.sll_ifindex = s_ifr.ifr_ifindex; |
158 | 160 | ||
159 | /* bind socket to eth0 */ | 161 | /* bind socket to eth0 */ |
@@ -161,23 +163,11 @@ As capture, each frame contains two parts: | |||
161 | 163 | ||
162 | A complete tutorial is available at: http://wiki.gnu-log.net/ | 164 | A complete tutorial is available at: http://wiki.gnu-log.net/ |
163 | 165 | ||
164 | By default, the user should put data at : | ||
165 | frame base + TPACKET_HDRLEN - sizeof(struct sockaddr_ll) | ||
166 | |||
167 | So, whatever you choose for the socket mode (SOCK_DGRAM or SOCK_RAW), | ||
168 | the beginning of the user data will be at : | ||
169 | frame base + TPACKET_ALIGN(sizeof(struct tpacket_hdr)) | ||
170 | |||
171 | If you wish to put user data at a custom offset from the beginning of | ||
172 | the frame (for payload alignment with SOCK_RAW mode for instance) you | ||
173 | can set tp_net (with SOCK_DGRAM) or tp_mac (with SOCK_RAW). In order | ||
174 | to make this work it must be enabled previously with setsockopt() | ||
175 | and the PACKET_TX_HAS_OFF option. | ||
176 | |||
177 | -------------------------------------------------------------------------------- | 166 | -------------------------------------------------------------------------------- |
178 | + PACKET_MMAP settings | 167 | + PACKET_MMAP settings |
179 | -------------------------------------------------------------------------------- | 168 | -------------------------------------------------------------------------------- |
180 | 169 | ||
170 | |||
181 | To setup PACKET_MMAP from user level code is done with a call like | 171 | To setup PACKET_MMAP from user level code is done with a call like |
182 | 172 | ||
183 | - Capture process | 173 | - Capture process |
@@ -211,6 +201,7 @@ indeed, packet_set_ring checks that the following condition is true | |||
211 | 201 | ||
212 | frames_per_block * tp_block_nr == tp_frame_nr | 202 | frames_per_block * tp_block_nr == tp_frame_nr |
213 | 203 | ||
204 | |||
214 | Lets see an example, with the following values: | 205 | Lets see an example, with the following values: |
215 | 206 | ||
216 | tp_block_size= 4096 | 207 | tp_block_size= 4096 |
@@ -236,6 +227,7 @@ be spawned across two blocks, so there are some details you have to take into | |||
236 | account when choosing the frame_size. See "Mapping and use of the circular | 227 | account when choosing the frame_size. See "Mapping and use of the circular |
237 | buffer (ring)". | 228 | buffer (ring)". |
238 | 229 | ||
230 | |||
239 | -------------------------------------------------------------------------------- | 231 | -------------------------------------------------------------------------------- |
240 | + PACKET_MMAP setting constraints | 232 | + PACKET_MMAP setting constraints |
241 | -------------------------------------------------------------------------------- | 233 | -------------------------------------------------------------------------------- |
@@ -272,6 +264,7 @@ User space programs can include /usr/include/sys/user.h and | |||
272 | The pagesize can also be determined dynamically with the getpagesize (2) | 264 | The pagesize can also be determined dynamically with the getpagesize (2) |
273 | system call. | 265 | system call. |
274 | 266 | ||
267 | |||
275 | Block number limit | 268 | Block number limit |
276 | -------------------- | 269 | -------------------- |
277 | 270 | ||
@@ -291,6 +284,7 @@ called pg_vec, its size limits the number of blocks that can be allocated. | |||
291 | v block #2 | 284 | v block #2 |
292 | block #1 | 285 | block #1 |
293 | 286 | ||
287 | |||
294 | kmalloc allocates any number of bytes of physically contiguous memory from | 288 | kmalloc allocates any number of bytes of physically contiguous memory from |
295 | a pool of pre-determined sizes. This pool of memory is maintained by the slab | 289 | a pool of pre-determined sizes. This pool of memory is maintained by the slab |
296 | allocator which is at the end the responsible for doing the allocation and | 290 | allocator which is at the end the responsible for doing the allocation and |
@@ -305,6 +299,7 @@ pointers to blocks is | |||
305 | 299 | ||
306 | 131072/4 = 32768 blocks | 300 | 131072/4 = 32768 blocks |
307 | 301 | ||
302 | |||
308 | PACKET_MMAP buffer size calculator | 303 | PACKET_MMAP buffer size calculator |
309 | ------------------------------------ | 304 | ------------------------------------ |
310 | 305 | ||
@@ -345,6 +340,7 @@ and a value for <frame size> of 2048 bytes. These parameters will yield | |||
345 | and hence the buffer will have a 262144 MiB size. So it can hold | 340 | and hence the buffer will have a 262144 MiB size. So it can hold |
346 | 262144 MiB / 2048 bytes = 134217728 frames | 341 | 262144 MiB / 2048 bytes = 134217728 frames |
347 | 342 | ||
343 | |||
348 | Actually, this buffer size is not possible with an i386 architecture. | 344 | Actually, this buffer size is not possible with an i386 architecture. |
349 | Remember that the memory is allocated in kernel space, in the case of | 345 | Remember that the memory is allocated in kernel space, in the case of |
350 | an i386 kernel's memory size is limited to 1GiB. | 346 | an i386 kernel's memory size is limited to 1GiB. |
@@ -376,6 +372,7 @@ the following (from include/linux/if_packet.h): | |||
376 | - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. | 372 | - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. |
377 | - Pad to align to TPACKET_ALIGNMENT=16 | 373 | - Pad to align to TPACKET_ALIGNMENT=16 |
378 | */ | 374 | */ |
375 | |||
379 | 376 | ||
380 | The following are conditions that are checked in packet_set_ring | 377 | The following are conditions that are checked in packet_set_ring |
381 | 378 | ||
@@ -416,6 +413,7 @@ and the following flags apply: | |||
416 | #define TP_STATUS_LOSING 4 | 413 | #define TP_STATUS_LOSING 4 |
417 | #define TP_STATUS_CSUMNOTREADY 8 | 414 | #define TP_STATUS_CSUMNOTREADY 8 |
418 | 415 | ||
416 | |||
419 | TP_STATUS_COPY : This flag indicates that the frame (and associated | 417 | TP_STATUS_COPY : This flag indicates that the frame (and associated |
420 | meta information) has been truncated because it's | 418 | meta information) has been truncated because it's |
421 | larger than tp_frame_size. This packet can be | 419 | larger than tp_frame_size. This packet can be |
@@ -464,6 +462,7 @@ packets are in the ring: | |||
464 | It doesn't incur in a race condition to first check the status value and | 462 | It doesn't incur in a race condition to first check the status value and |
465 | then poll for frames. | 463 | then poll for frames. |
466 | 464 | ||
465 | |||
467 | ++ Transmission process | 466 | ++ Transmission process |
468 | Those defines are also used for transmission: | 467 | Those defines are also used for transmission: |
469 | 468 | ||
@@ -495,196 +494,6 @@ The user can also use poll() to check if a buffer is available: | |||
495 | retval = poll(&pfd, 1, timeout); | 494 | retval = poll(&pfd, 1, timeout); |
496 | 495 | ||
497 | ------------------------------------------------------------------------------- | 496 | ------------------------------------------------------------------------------- |
498 | + What TPACKET versions are available and when to use them? | ||
499 | ------------------------------------------------------------------------------- | ||
500 | |||
501 | int val = tpacket_version; | ||
502 | setsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val)); | ||
503 | getsockopt(fd, SOL_PACKET, PACKET_VERSION, &val, sizeof(val)); | ||
504 | |||
505 | where 'tpacket_version' can be TPACKET_V1 (default), TPACKET_V2, TPACKET_V3. | ||
506 | |||
507 | TPACKET_V1: | ||
508 | - Default if not otherwise specified by setsockopt(2) | ||
509 | - RX_RING, TX_RING available | ||
510 | - VLAN metadata information available for packets | ||
511 | (TP_STATUS_VLAN_VALID) | ||
512 | |||
513 | TPACKET_V1 --> TPACKET_V2: | ||
514 | - Made 64 bit clean due to unsigned long usage in TPACKET_V1 | ||
515 | structures, thus this also works on 64 bit kernel with 32 bit | ||
516 | userspace and the like | ||
517 | - Timestamp resolution in nanoseconds instead of microseconds | ||
518 | - RX_RING, TX_RING available | ||
519 | - How to switch to TPACKET_V2: | ||
520 | 1. Replace struct tpacket_hdr by struct tpacket2_hdr | ||
521 | 2. Query header len and save | ||
522 | 3. Set protocol version to 2, set up ring as usual | ||
523 | 4. For getting the sockaddr_ll, | ||
524 | use (void *)hdr + TPACKET_ALIGN(hdrlen) instead of | ||
525 | (void *)hdr + TPACKET_ALIGN(sizeof(struct tpacket_hdr)) | ||
526 | |||
527 | TPACKET_V2 --> TPACKET_V3: | ||
528 | - Flexible buffer implementation: | ||
529 | 1. Blocks can be configured with non-static frame-size | ||
530 | 2. Read/poll is at a block-level (as opposed to packet-level) | ||
531 | 3. Added poll timeout to avoid indefinite user-space wait | ||
532 | on idle links | ||
533 | 4. Added user-configurable knobs: | ||
534 | 4.1 block::timeout | ||
535 | 4.2 tpkt_hdr::sk_rxhash | ||
536 | - RX Hash data available in user space | ||
537 | - Currently only RX_RING available | ||
538 | |||
539 | ------------------------------------------------------------------------------- | ||
540 | + AF_PACKET fanout mode | ||
541 | ------------------------------------------------------------------------------- | ||
542 | |||
543 | In the AF_PACKET fanout mode, packet reception can be load balanced among | ||
544 | processes. This also works in combination with mmap(2) on packet sockets. | ||
545 | |||
546 | Minimal example code by David S. Miller (try things like "./test eth0 hash", | ||
547 | "./test eth0 lb", etc.): | ||
548 | |||
549 | #include <stddef.h> | ||
550 | #include <stdlib.h> | ||
551 | #include <stdio.h> | ||
552 | #include <string.h> | ||
553 | |||
554 | #include <sys/types.h> | ||
555 | #include <sys/wait.h> | ||
556 | #include <sys/socket.h> | ||
557 | #include <sys/ioctl.h> | ||
558 | |||
559 | #include <unistd.h> | ||
560 | |||
561 | #include <linux/if_ether.h> | ||
562 | #include <linux/if_packet.h> | ||
563 | |||
564 | #include <net/if.h> | ||
565 | |||
566 | static const char *device_name; | ||
567 | static int fanout_type; | ||
568 | static int fanout_id; | ||
569 | |||
570 | #ifndef PACKET_FANOUT | ||
571 | # define PACKET_FANOUT 18 | ||
572 | # define PACKET_FANOUT_HASH 0 | ||
573 | # define PACKET_FANOUT_LB 1 | ||
574 | #endif | ||
575 | |||
576 | static int setup_socket(void) | ||
577 | { | ||
578 | int err, fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP)); | ||
579 | struct sockaddr_ll ll; | ||
580 | struct ifreq ifr; | ||
581 | int fanout_arg; | ||
582 | |||
583 | if (fd < 0) { | ||
584 | perror("socket"); | ||
585 | return EXIT_FAILURE; | ||
586 | } | ||
587 | |||
588 | memset(&ifr, 0, sizeof(ifr)); | ||
589 | strcpy(ifr.ifr_name, device_name); | ||
590 | err = ioctl(fd, SIOCGIFINDEX, &ifr); | ||
591 | if (err < 0) { | ||
592 | perror("SIOCGIFINDEX"); | ||
593 | return EXIT_FAILURE; | ||
594 | } | ||
595 | |||
596 | memset(&ll, 0, sizeof(ll)); | ||
597 | ll.sll_family = AF_PACKET; | ||
598 | ll.sll_ifindex = ifr.ifr_ifindex; | ||
599 | err = bind(fd, (struct sockaddr *) &ll, sizeof(ll)); | ||
600 | if (err < 0) { | ||
601 | perror("bind"); | ||
602 | return EXIT_FAILURE; | ||
603 | } | ||
604 | |||
605 | fanout_arg = (fanout_id | (fanout_type << 16)); | ||
606 | err = setsockopt(fd, SOL_PACKET, PACKET_FANOUT, | ||
607 | &fanout_arg, sizeof(fanout_arg)); | ||
608 | if (err) { | ||
609 | perror("setsockopt"); | ||
610 | return EXIT_FAILURE; | ||
611 | } | ||
612 | |||
613 | return fd; | ||
614 | } | ||
615 | |||
616 | static void fanout_thread(void) | ||
617 | { | ||
618 | int fd = setup_socket(); | ||
619 | int limit = 10000; | ||
620 | |||
621 | if (fd < 0) | ||
622 | exit(fd); | ||
623 | |||
624 | while (limit-- > 0) { | ||
625 | char buf[1600]; | ||
626 | int err; | ||
627 | |||
628 | err = read(fd, buf, sizeof(buf)); | ||
629 | if (err < 0) { | ||
630 | perror("read"); | ||
631 | exit(EXIT_FAILURE); | ||
632 | } | ||
633 | if ((limit % 10) == 0) | ||
634 | fprintf(stdout, "(%d) \n", getpid()); | ||
635 | } | ||
636 | |||
637 | fprintf(stdout, "%d: Received 10000 packets\n", getpid()); | ||
638 | |||
639 | close(fd); | ||
640 | exit(0); | ||
641 | } | ||
642 | |||
643 | int main(int argc, char **argp) | ||
644 | { | ||
645 | int fd, err; | ||
646 | int i; | ||
647 | |||
648 | if (argc != 3) { | ||
649 | fprintf(stderr, "Usage: %s INTERFACE {hash|lb}\n", argp[0]); | ||
650 | return EXIT_FAILURE; | ||
651 | } | ||
652 | |||
653 | if (!strcmp(argp[2], "hash")) | ||
654 | fanout_type = PACKET_FANOUT_HASH; | ||
655 | else if (!strcmp(argp[2], "lb")) | ||
656 | fanout_type = PACKET_FANOUT_LB; | ||
657 | else { | ||
658 | fprintf(stderr, "Unknown fanout type [%s]\n", argp[2]); | ||
659 | exit(EXIT_FAILURE); | ||
660 | } | ||
661 | |||
662 | device_name = argp[1]; | ||
663 | fanout_id = getpid() & 0xffff; | ||
664 | |||
665 | for (i = 0; i < 4; i++) { | ||
666 | pid_t pid = fork(); | ||
667 | |||
668 | switch (pid) { | ||
669 | case 0: | ||
670 | fanout_thread(); | ||
671 | |||
672 | case -1: | ||
673 | perror("fork"); | ||
674 | exit(EXIT_FAILURE); | ||
675 | } | ||
676 | } | ||
677 | |||
678 | for (i = 0; i < 4; i++) { | ||
679 | int status; | ||
680 | |||
681 | wait(&status); | ||
682 | } | ||
683 | |||
684 | return 0; | ||
685 | } | ||
686 | |||
687 | ------------------------------------------------------------------------------- | ||
688 | + PACKET_TIMESTAMP | 497 | + PACKET_TIMESTAMP |
689 | ------------------------------------------------------------------------------- | 498 | ------------------------------------------------------------------------------- |
690 | 499 | ||
@@ -710,13 +519,6 @@ the networking stack is used (the behavior before this setting was added). | |||
710 | See include/linux/net_tstamp.h and Documentation/networking/timestamping | 519 | See include/linux/net_tstamp.h and Documentation/networking/timestamping |
711 | for more information on hardware timestamps. | 520 | for more information on hardware timestamps. |
712 | 521 | ||
713 | ------------------------------------------------------------------------------- | ||
714 | + Miscellaneous bits | ||
715 | ------------------------------------------------------------------------------- | ||
716 | |||
717 | - Packet sockets work well together with Linux socket filters, thus you also | ||
718 | might want to have a look at Documentation/networking/filter.txt | ||
719 | |||
720 | -------------------------------------------------------------------------------- | 522 | -------------------------------------------------------------------------------- |
721 | + THANKS | 523 | + THANKS |
722 | -------------------------------------------------------------------------------- | 524 | -------------------------------------------------------------------------------- |
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt index 95e5f5985a2..9eb1ba52013 100644 --- a/Documentation/networking/phy.txt +++ b/Documentation/networking/phy.txt | |||
@@ -62,8 +62,7 @@ The MDIO bus | |||
62 | 5) The bus must also be declared somewhere as a device, and registered. | 62 | 5) The bus must also be declared somewhere as a device, and registered. |
63 | 63 | ||
64 | As an example for how one driver implemented an mdio bus driver, see | 64 | As an example for how one driver implemented an mdio bus driver, see |
65 | drivers/net/ethernet/freescale/fsl_pq_mdio.c and an associated DTS file | 65 | drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c |
66 | for one of the users. (e.g. "git grep fsl,.*-mdio arch/powerpc/boot/dts/") | ||
67 | 66 | ||
68 | Connecting to a PHY | 67 | Connecting to a PHY |
69 | 68 | ||
diff --git a/Documentation/networking/ppp_generic.txt b/Documentation/networking/ppp_generic.txt index 091d20273dc..15b5172fbb9 100644 --- a/Documentation/networking/ppp_generic.txt +++ b/Documentation/networking/ppp_generic.txt | |||
@@ -342,7 +342,7 @@ an interface unit are: | |||
342 | numbers on received multilink fragments | 342 | numbers on received multilink fragments |
343 | SC_MP_XSHORTSEQ transmit short multilink sequence nos. | 343 | SC_MP_XSHORTSEQ transmit short multilink sequence nos. |
344 | 344 | ||
345 | The values of these flags are defined in <linux/ppp-ioctl.h>. Note | 345 | The values of these flags are defined in <linux/if_ppp.h>. Note |
346 | that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and | 346 | that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and |
347 | SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option | 347 | SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option |
348 | is not selected. | 348 | is not selected. |
@@ -358,7 +358,7 @@ an interface unit are: | |||
358 | 358 | ||
359 | * PPPIOCSCOMPRESS sets the parameters for packet compression or | 359 | * PPPIOCSCOMPRESS sets the parameters for packet compression or |
360 | decompression. The argument should point to a ppp_option_data | 360 | decompression. The argument should point to a ppp_option_data |
361 | structure (defined in <linux/ppp-ioctl.h>), which contains a | 361 | structure (defined in <linux/if_ppp.h>), which contains a |
362 | pointer/length pair which should describe a block of memory | 362 | pointer/length pair which should describe a block of memory |
363 | containing a CCP option specifying a compression method and its | 363 | containing a CCP option specifying a compression method and its |
364 | parameters. The ppp_option_data struct also contains a `transmit' | 364 | parameters. The ppp_option_data struct also contains a `transmit' |
@@ -395,7 +395,7 @@ an interface unit are: | |||
395 | 395 | ||
396 | * PPPIOCSNPMODE sets the network-protocol mode for a given network | 396 | * PPPIOCSNPMODE sets the network-protocol mode for a given network |
397 | protocol. The argument should point to an npioctl struct (defined | 397 | protocol. The argument should point to an npioctl struct (defined |
398 | in <linux/ppp-ioctl.h>). The `protocol' field gives the PPP protocol | 398 | in <linux/if_ppp.h>). The `protocol' field gives the PPP protocol |
399 | number for the protocol to be affected, and the `mode' field | 399 | number for the protocol to be affected, and the `mode' field |
400 | specifies what to do with packets for that protocol: | 400 | specifies what to do with packets for that protocol: |
401 | 401 | ||
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index d2a9f43b554..4be0c039edb 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
@@ -136,6 +136,16 @@ For more information, please review the AMD8131 errata at | |||
136 | http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/ | 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 | 26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf |
138 | 138 | ||
139 | 6. Support | 139 | 6. Available Downloads |
140 | Neterion "s2io" driver in Red Hat and Suse 2.6-based distributions is kept up | ||
141 | to date, also the latest "s2io" code (including support for 2.4 kernels) is | ||
142 | available via "Support" link on the Neterion site: http://www.neterion.com. | ||
143 | |||
144 | For Xframe User Guide (Programming manual), visit ftp site ns1.s2io.com, | ||
145 | user: linuxdocs password: HALdocs | ||
146 | |||
147 | 7. Support | ||
140 | For further support please contact either your 10GbE Xframe NIC vendor (IBM, | 148 | For further support please contact either your 10GbE Xframe NIC vendor (IBM, |
141 | HP, SGI etc.) | 149 | HP, SGI etc.) or click on the "Support" link on the Neterion site: |
150 | http://www.neterion.com. | ||
151 | |||
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt index 579994afbe0..fe67b5c79f0 100644 --- a/Documentation/networking/scaling.txt +++ b/Documentation/networking/scaling.txt | |||
@@ -73,7 +73,7 @@ of queues to IRQs can be determined from /proc/interrupts. By default, | |||
73 | an IRQ may be handled on any CPU. Because a non-negligible part of packet | 73 | an IRQ may be handled on any CPU. Because a non-negligible part of packet |
74 | processing takes place in receive interrupt handling, it is advantageous | 74 | processing takes place in receive interrupt handling, it is advantageous |
75 | to spread receive interrupts between CPUs. To manually adjust the IRQ | 75 | to spread receive interrupts between CPUs. To manually adjust the IRQ |
76 | affinity of each interrupt see Documentation/IRQ-affinity.txt. Some systems | 76 | affinity of each interrupt see Documentation/IRQ-affinity. Some systems |
77 | will be running irqbalance, a daemon that dynamically optimizes IRQ | 77 | will be running irqbalance, a daemon that dynamically optimizes IRQ |
78 | assignments and as a result may override any manual settings. | 78 | assignments and as a result may override any manual settings. |
79 | 79 | ||
@@ -208,7 +208,7 @@ The counter in rps_dev_flow_table values records the length of the current | |||
208 | CPU's backlog when a packet in this flow was last enqueued. Each backlog | 208 | CPU's backlog when a packet in this flow was last enqueued. Each backlog |
209 | queue has a head counter that is incremented on dequeue. A tail counter | 209 | queue has a head counter that is incremented on dequeue. A tail counter |
210 | is computed as head counter + queue length. In other words, the counter | 210 | is computed as head counter + queue length. In other words, the counter |
211 | in rps_dev_flow[i] records the last element in flow i that has | 211 | in rps_dev_flow_table[i] records the last element in flow i that has |
212 | been enqueued onto the currently designated CPU for flow i (of course, | 212 | been enqueued onto the currently designated CPU for flow i (of course, |
213 | entry i is actually selected by hash and multiple flows may hash to the | 213 | entry i is actually selected by hash and multiple flows may hash to the |
214 | same entry i). | 214 | same entry i). |
@@ -224,7 +224,7 @@ following is true: | |||
224 | 224 | ||
225 | - The current CPU's queue head counter >= the recorded tail counter | 225 | - The current CPU's queue head counter >= the recorded tail counter |
226 | value in rps_dev_flow[i] | 226 | value in rps_dev_flow[i] |
227 | - The current CPU is unset (equal to RPS_NO_CPU) | 227 | - The current CPU is unset (equal to NR_CPUS) |
228 | - The current CPU is offline | 228 | - The current CPU is offline |
229 | 229 | ||
230 | After this check, the packet is sent to the (possibly updated) current | 230 | After this check, the packet is sent to the (possibly updated) current |
@@ -235,7 +235,7 @@ CPU. | |||
235 | 235 | ||
236 | ==== RFS Configuration | 236 | ==== RFS Configuration |
237 | 237 | ||
238 | RFS is only available if the kconfig symbol CONFIG_RPS is enabled (on | 238 | RFS is only available if the kconfig symbol CONFIG_RFS is enabled (on |
239 | by default for SMP). The functionality remains disabled until explicitly | 239 | by default for SMP). The functionality remains disabled until explicitly |
240 | configured. The number of entries in the global flow table is set through: | 240 | configured. The number of entries in the global flow table is set through: |
241 | 241 | ||
@@ -258,7 +258,7 @@ For a single queue device, the rps_flow_cnt value for the single queue | |||
258 | would normally be configured to the same value as rps_sock_flow_entries. | 258 | would normally be configured to the same value as rps_sock_flow_entries. |
259 | For a multi-queue device, the rps_flow_cnt for each queue might be | 259 | For a multi-queue device, the rps_flow_cnt for each queue might be |
260 | configured as rps_sock_flow_entries / N, where N is the number of | 260 | configured as rps_sock_flow_entries / N, where N is the number of |
261 | queues. So for instance, if rps_sock_flow_entries is set to 32768 and there | 261 | queues. So for instance, if rps_flow_entries is set to 32768 and there |
262 | are 16 configured receive queues, rps_flow_cnt for each queue might be | 262 | are 16 configured receive queues, rps_flow_cnt for each queue might be |
263 | configured as 2048. | 263 | configured as 2048. |
264 | 264 | ||
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index f9fa6db40a5..57a24108b84 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -4,16 +4,14 @@ Copyright (C) 2007-2010 STMicroelectronics Ltd | |||
4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | 4 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> |
5 | 5 | ||
6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | 6 | This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers |
7 | (Synopsys IP blocks). | 7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. |
8 | 8 | ||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | 9 | Currently this network device driver is for all STM embedded MAC/GMAC |
10 | (i.e. 7xxx/5xxx SoCs), SPEAr (arm), Loongson1B (mips) and XLINX XC2V3000 | 10 | (i.e. 7xxx/5xxx SoCs) and it's known working on other platforms i.e. ARM SPEAr. |
11 | FF1152AMT0221 D1215994A VIRTEX FPGA board. | ||
12 | 11 | ||
13 | DWC Ether MAC 10/100/1000 Universal version 3.60a (and older) and DWC Ether | 12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 |
14 | MAC 10/100 Universal version 4.0 have been used for developing this driver. | 13 | Universal version 4.0 have been used for developing the first code |
15 | 14 | implementation. | |
16 | This driver supports both the platform bus and PCI. | ||
17 | 15 | ||
18 | Please, for more information also visit: www.stlinux.com | 16 | Please, for more information also visit: www.stlinux.com |
19 | 17 | ||
@@ -29,9 +27,11 @@ The kernel configuration option is STMMAC_ETH: | |||
29 | dma_txsize: DMA tx ring size; | 27 | dma_txsize: DMA tx ring size; |
30 | buf_sz: DMA buffer size; | 28 | buf_sz: DMA buffer size; |
31 | tc: control the HW FIFO threshold; | 29 | tc: control the HW FIFO threshold; |
30 | tx_coe: Enable/Disable Tx Checksum Offload engine; | ||
32 | watchdog: transmit timeout (in milliseconds); | 31 | watchdog: transmit timeout (in milliseconds); |
33 | flow_ctrl: Flow control ability [on/off]; | 32 | flow_ctrl: Flow control ability [on/off]; |
34 | pause: Flow Control Pause Time; | 33 | pause: Flow Control Pause Time; |
34 | tmrate: timer period (only if timer optimisation is configured). | ||
35 | 35 | ||
36 | 3) Command line options | 36 | 3) Command line options |
37 | Driver parameters can be also passed in command line by using: | 37 | Driver parameters can be also passed in command line by using: |
@@ -52,42 +52,31 @@ net_device structure enabling the scatter/gather feature. | |||
52 | When one or more packets are received, an interrupt happens. The interrupts | 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 | 53 | are not queued so the driver has to scan all the descriptors in the ring during |
54 | the receive process. | 54 | the receive process. |
55 | This is based on NAPI so the interrupt handler signals only if there is work | 55 | This is based on NAPI so the interrupt handler signals only if there is work to be |
56 | to be done, and it exits. | 56 | done, and it exits. |
57 | Then the poll method will be scheduled at some future point. | 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 | 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). | 59 | buffers in order to avoid the memcpy (Zero-copy). |
60 | 60 | ||
61 | 4.3) Interrupt Mitigation | 61 | 4.3) Timer-Driver Interrupt |
62 | The driver is able to mitigate the number of its DMA interrupts | 62 | Instead of having the device that asynchronously notifies the frame receptions, the |
63 | using NAPI for the reception on chips older than the 3.50. | 63 | driver configures a timer to generate an interrupt at regular intervals. |
64 | New chips have an HW RX-Watchdog used for this mitigation. | 64 | Based on the granularity of the timer, the frames that are received by the device |
65 | 65 | will experience different levels of latency. Some NICs have dedicated timer | |
66 | On Tx-side, the mitigation schema is based on a SW timer that calls the | 66 | device to perform this task. STMMAC can use either the RTC device or the TMU |
67 | tx function (stmmac_tx) to reclaim the resource after transmitting the | 67 | channel 2 on STLinux platforms. |
68 | frames. | 68 | The timers frequency can be passed to the driver as parameter; when change it, |
69 | Also there is another parameter (like a threshold) used to program | 69 | take care of both hardware capability and network stability/performance impact. |
70 | the descriptors avoiding to set the interrupt on completion bit in | 70 | Several performance tests on STM platforms showed this optimisation allows to spare |
71 | when the frame is sent (xmit). | 71 | the CPU while having the maximum throughput. |
72 | |||
73 | Mitigation parameters can be tuned by ethtool. | ||
74 | 72 | ||
75 | 4.4) WOL | 73 | 4.4) WOL |
76 | Wake up on Lan feature through Magic and Unicast frames are supported for the | 74 | Wake up on Lan feature through Magic and Unicast frames are supported for the GMAC |
77 | GMAC core. | 75 | core. |
78 | 76 | ||
79 | 4.5) DMA descriptors | 77 | 4.5) DMA descriptors |
80 | Driver handles both normal and enhanced descriptors. The latter has been only | 78 | Driver handles both normal and enhanced descriptors. The latter has been only |
81 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a and later. | 79 | tested on DWC Ether MAC 10/100/1000 Universal version 3.41a. |
82 | |||
83 | STMMAC supports DMA descriptor to operate both in dual buffer (RING) | ||
84 | and linked-list(CHAINED) mode. In RING each descriptor points to two | ||
85 | data buffer pointers whereas in CHAINED mode they point to only one data | ||
86 | buffer pointer. RING mode is the default. | ||
87 | |||
88 | In CHAINED mode each descriptor will have pointer to next descriptor in | ||
89 | the list, hence creating the explicit chaining in the descriptor itself, | ||
90 | whereas such explicit chaining is not possible in RING mode. | ||
91 | 80 | ||
92 | 4.6) Ethtool support | 81 | 4.6) Ethtool support |
93 | Ethtool is supported. Driver statistics and internal errors can be taken using: | 82 | Ethtool is supported. Driver statistics and internal errors can be taken using: |
@@ -106,50 +95,40 @@ Several driver's information can be passed through the platform | |||
106 | These are included in the include/linux/stmmac.h header file | 95 | These are included in the include/linux/stmmac.h header file |
107 | and detailed below as well: | 96 | and detailed below as well: |
108 | 97 | ||
109 | struct plat_stmmacenet_data { | 98 | struct plat_stmmacenet_data { |
110 | char *phy_bus_name; | ||
111 | int bus_id; | 99 | int bus_id; |
112 | int phy_addr; | 100 | int phy_addr; |
113 | int interface; | 101 | int interface; |
114 | struct stmmac_mdio_bus_data *mdio_bus_data; | 102 | struct stmmac_mdio_bus_data *mdio_bus_data; |
115 | struct stmmac_dma_cfg *dma_cfg; | 103 | int pbl; |
116 | int clk_csr; | 104 | int clk_csr; |
117 | int has_gmac; | 105 | int has_gmac; |
118 | int enh_desc; | 106 | int enh_desc; |
119 | int tx_coe; | 107 | int tx_coe; |
120 | int rx_coe; | ||
121 | int bugged_jumbo; | 108 | int bugged_jumbo; |
122 | int pmt; | 109 | int pmt; |
123 | int force_sf_dma_mode; | 110 | int force_sf_dma_mode; |
124 | int riwt_off; | ||
125 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 111 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
126 | void (*bus_setup)(void __iomem *ioaddr); | 112 | void (*bus_setup)(void __iomem *ioaddr); |
127 | int (*init)(struct platform_device *pdev); | 113 | int (*init)(struct platform_device *pdev); |
128 | void (*exit)(struct platform_device *pdev); | 114 | void (*exit)(struct platform_device *pdev); |
129 | void *custom_cfg; | ||
130 | void *custom_data; | ||
131 | void *bsp_priv; | 115 | void *bsp_priv; |
132 | }; | 116 | }; |
133 | 117 | ||
134 | Where: | 118 | Where: |
135 | o phy_bus_name: phy bus name to attach to the stmmac. | ||
136 | o bus_id: bus identifier. | 119 | o bus_id: bus identifier. |
137 | o phy_addr: the physical address can be passed from the platform. | 120 | o phy_addr: the physical address can be passed from the platform. |
138 | If it is set to -1 the driver will automatically | 121 | If it is set to -1 the driver will automatically |
139 | detect it at run-time by probing all the 32 addresses. | 122 | detect it at run-time by probing all the 32 addresses. |
140 | o interface: PHY device's interface. | 123 | o interface: PHY device's interface. |
141 | o mdio_bus_data: specific platform fields for the MDIO bus. | 124 | o mdio_bus_data: specific platform fields for the MDIO bus. |
142 | o dma_cfg: internal DMA parameters | 125 | o pbl: the Programmable Burst Length is maximum number of beats to |
143 | o pbl: the Programmable Burst Length is maximum number of beats to | ||
144 | be transferred in one DMA transaction. | 126 | be transferred in one DMA transaction. |
145 | GMAC also enables the 4xPBL by default. | 127 | GMAC also enables the 4xPBL by default. |
146 | o fixed_burst/mixed_burst/burst_len | 128 | o clk_csr: CSR Clock range selection. |
147 | o clk_csr: fixed CSR Clock range selection. | ||
148 | o has_gmac: uses the GMAC core. | 129 | o has_gmac: uses the GMAC core. |
149 | o enh_desc: if sets the MAC will use the enhanced descriptor structure. | 130 | o enh_desc: if sets the MAC will use the enhanced descriptor structure. |
150 | o tx_coe: core is able to perform the tx csum in HW. | 131 | o tx_coe: core is able to perform the tx csum in HW. |
151 | o rx_coe: the supports three check sum offloading engine types: | ||
152 | type_1, type_2 (full csum) and no RX coe. | ||
153 | o bugged_jumbo: some HWs are not able to perform the csum in HW for | 132 | o bugged_jumbo: some HWs are not able to perform the csum in HW for |
154 | over-sized frames due to limited buffer sizes. | 133 | over-sized frames due to limited buffer sizes. |
155 | Setting this flag the csum will be done in SW on | 134 | Setting this flag the csum will be done in SW on |
@@ -157,7 +136,6 @@ Where: | |||
157 | o pmt: core has the embedded power module (optional). | 136 | o pmt: core has the embedded power module (optional). |
158 | o force_sf_dma_mode: force DMA to use the Store and Forward mode | 137 | o force_sf_dma_mode: force DMA to use the Store and Forward mode |
159 | instead of the Threshold. | 138 | instead of the Threshold. |
160 | o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode. | ||
161 | o fix_mac_speed: this callback is used for modifying some syscfg registers | 139 | o fix_mac_speed: this callback is used for modifying some syscfg registers |
162 | (on ST SoCs) according to the link speed negotiated by the | 140 | (on ST SoCs) according to the link speed negotiated by the |
163 | physical layer . | 141 | physical layer . |
@@ -168,13 +146,13 @@ Where: | |||
168 | this is sometime necessary on some platforms (e.g. ST boxes) | 146 | this is sometime necessary on some platforms (e.g. ST boxes) |
169 | where the HW needs to have set some PIO lines or system cfg | 147 | where the HW needs to have set some PIO lines or system cfg |
170 | registers. | 148 | registers. |
171 | o custom_cfg/custom_data: this is a custom configuration that can be passed | 149 | o custom_cfg: this is a custom configuration that can be passed while |
172 | while initialising the resources. | 150 | initialising the resources. |
173 | o bsp_priv: another private poiter. | ||
174 | 151 | ||
175 | For MDIO bus The we have: | 152 | The we have: |
176 | 153 | ||
177 | struct stmmac_mdio_bus_data { | 154 | struct stmmac_mdio_bus_data { |
155 | int bus_id; | ||
178 | int (*phy_reset)(void *priv); | 156 | int (*phy_reset)(void *priv); |
179 | unsigned int phy_mask; | 157 | unsigned int phy_mask; |
180 | int *irqs; | 158 | int *irqs; |
@@ -182,32 +160,16 @@ For MDIO bus The we have: | |||
182 | }; | 160 | }; |
183 | 161 | ||
184 | Where: | 162 | Where: |
163 | o bus_id: bus identifier; | ||
185 | o phy_reset: hook to reset the phy device attached to the bus. | 164 | o phy_reset: hook to reset the phy device attached to the bus. |
186 | o phy_mask: phy mask passed when register the MDIO bus within the driver. | 165 | o phy_mask: phy mask passed when register the MDIO bus within the driver. |
187 | o irqs: list of IRQs, one per PHY. | 166 | o irqs: list of IRQs, one per PHY. |
188 | o probed_phy_irq: if irqs is NULL, use this for probed PHY. | 167 | o probed_phy_irq: if irqs is NULL, use this for probed PHY. |
189 | 168 | ||
190 | For DMA engine we have the following internal fields that should be | ||
191 | tuned according to the HW capabilities. | ||
192 | |||
193 | struct stmmac_dma_cfg { | ||
194 | int pbl; | ||
195 | int fixed_burst; | ||
196 | int burst_len_supported; | ||
197 | }; | ||
198 | |||
199 | Where: | ||
200 | o pbl: Programmable Burst Length | ||
201 | o fixed_burst: program the DMA to use the fixed burst mode | ||
202 | o burst_len: this is the value we put in the register | ||
203 | supported values are provided as macros in | ||
204 | linux/stmmac.h header file. | ||
205 | |||
206 | --- | ||
207 | |||
208 | Below an example how the structures above are using on ST platforms. | 169 | Below an example how the structures above are using on ST platforms. |
209 | 170 | ||
210 | static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = { | 171 | static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = { |
172 | .pbl = 32, | ||
211 | .has_gmac = 0, | 173 | .has_gmac = 0, |
212 | .enh_desc = 0, | 174 | .enh_desc = 0, |
213 | .fix_mac_speed = stxYYY_ethernet_fix_mac_speed, | 175 | .fix_mac_speed = stxYYY_ethernet_fix_mac_speed, |
@@ -230,6 +192,9 @@ there are two MAC cores: one MAC is for MDIO Bus/PHY emulation | |||
230 | with fixed_link support. | 192 | with fixed_link support. |
231 | 193 | ||
232 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { | 194 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { |
195 | .bus_id = 1, | ||
196 | | | ||
197 | |-> phy device on the bus_id 1 | ||
233 | .phy_reset = phy_reset; | 198 | .phy_reset = phy_reset; |
234 | | | 199 | | |
235 | |-> function to provide the phy_reset on this board | 200 | |-> function to provide the phy_reset on this board |
@@ -254,11 +219,9 @@ reset procedure etc). | |||
254 | o Makefile | 219 | o Makefile |
255 | o stmmac_main.c: main network device driver; | 220 | o stmmac_main.c: main network device driver; |
256 | o stmmac_mdio.c: mdio functions; | 221 | o stmmac_mdio.c: mdio functions; |
257 | o stmmac_pci: PCI driver; | ||
258 | o stmmac_platform.c: platform driver | ||
259 | o stmmac_ethtool.c: ethtool support; | 222 | o stmmac_ethtool.c: ethtool support; |
260 | o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts | 223 | o stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts |
261 | (only tested on ST40 platforms based); | 224 | Only tested on ST40 platforms based. |
262 | o stmmac.h: private driver structure; | 225 | o stmmac.h: private driver structure; |
263 | o common.h: common definitions and VFTs; | 226 | o common.h: common definitions and VFTs; |
264 | o descs.h: descriptor structure definitions; | 227 | o descs.h: descriptor structure definitions; |
@@ -268,64 +231,11 @@ reset procedure etc). | |||
268 | o dwmac100_core: MAC 100 core and dma code; | 231 | o dwmac100_core: MAC 100 core and dma code; |
269 | o dwmac100_dma.c: dma funtions for the MAC chip; | 232 | o dwmac100_dma.c: dma funtions for the MAC chip; |
270 | o dwmac1000.h: specific header file for the MAC; | 233 | o dwmac1000.h: specific header file for the MAC; |
271 | o dwmac_lib.c: generic DMA functions shared among chips; | 234 | o dwmac_lib.c: generic DMA functions shared among chips |
272 | o enh_desc.c: functions for handling enhanced descriptors; | 235 | o enh_desc.c: functions for handling enhanced descriptors |
273 | o norm_desc.c: functions for handling normal descriptors; | 236 | o norm_desc.c: functions for handling normal descriptors |
274 | o chain_mode.c/ring_mode.c:: functions to manage RING/CHAINED modes; | ||
275 | o mmc_core.c/mmc.h: Management MAC Counters; | ||
276 | |||
277 | 5) Debug Information | ||
278 | |||
279 | The driver exports many information i.e. internal statistics, | ||
280 | debug information, MAC and DMA registers etc. | ||
281 | |||
282 | These can be read in several ways depending on the | ||
283 | type of the information actually needed. | ||
284 | |||
285 | For example a user can be use the ethtool support | ||
286 | to get statistics: e.g. using: ethtool -S ethX | ||
287 | (that shows the Management counters (MMC) if supported) | ||
288 | or sees the MAC/DMA registers: e.g. using: ethtool -d ethX | ||
289 | |||
290 | Compiling the Kernel with CONFIG_DEBUG_FS and enabling the | ||
291 | STMMAC_DEBUG_FS option the driver will export the following | ||
292 | debugfs entries: | ||
293 | |||
294 | /sys/kernel/debug/stmmaceth/descriptors_status | ||
295 | To show the DMA TX/RX descriptor rings | ||
296 | |||
297 | Developer can also use the "debug" module parameter to get | ||
298 | further debug information. | ||
299 | |||
300 | In the end, there are other macros (that cannot be enabled | ||
301 | via menuconfig) to turn-on the RX/TX DMA debugging, | ||
302 | specific MAC core debug printk etc. Others to enable the | ||
303 | debug in the TX and RX processes. | ||
304 | All these are only useful during the developing stage | ||
305 | and should never enabled inside the code for general usage. | ||
306 | In fact, these can generate an huge amount of debug messages. | ||
307 | |||
308 | 6) Energy Efficient Ethernet | ||
309 | |||
310 | Energy Efficient Ethernet(EEE) enables IEEE 802.3 MAC sublayer along | ||
311 | with a family of Physical layer to operate in the Low power Idle(LPI) | ||
312 | mode. The EEE mode supports the IEEE 802.3 MAC operation at 100Mbps, | ||
313 | 1000Mbps & 10Gbps. | ||
314 | |||
315 | The LPI mode allows power saving by switching off parts of the | ||
316 | communication device functionality when there is no data to be | ||
317 | transmitted & received. The system on both the side of the link can | ||
318 | disable some functionalities & save power during the period of low-link | ||
319 | utilization. The MAC controls whether the system should enter or exit | ||
320 | the LPI mode & communicate this to PHY. | ||
321 | |||
322 | As soon as the interface is opened, the driver verifies if the EEE can | ||
323 | be supported. This is done by looking at both the DMA HW capability | ||
324 | register and the PHY devices MCD registers. | ||
325 | To enter in Tx LPI mode the driver needs to have a software timer | ||
326 | that enable and disable the LPI mode when there is nothing to be | ||
327 | transmitted. | ||
328 | 237 | ||
329 | 7) TODO: | 238 | 5) TODO: |
330 | o XGMAC is not supported. | 239 | o XGMAC is not supported. |
331 | o Add the PTP - precision time protocol | 240 | o Review the timer optimisation code to use an embedded device that will be |
241 | available in new chip generations. | ||
diff --git a/Documentation/networking/team.txt b/Documentation/networking/team.txt deleted file mode 100644 index 5a013686b9e..00000000000 --- a/Documentation/networking/team.txt +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | Team devices are driven from userspace via libteam library which is here: | ||
2 | https://github.com/jpirko/libteam | ||
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index b4038ffb3bc..bd70976b816 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -67,8 +67,8 @@ Module parameters | |||
67 | ================= | 67 | ================= |
68 | 68 | ||
69 | There are several parameters which may be provided to the driver when | 69 | There are several parameters which may be provided to the driver when |
70 | its module is loaded. These are usually placed in /etc/modprobe.d/*.conf | 70 | its module is loaded. These are usually placed in /etc/modprobe.conf |
71 | configuretion files. Example: | 71 | (/etc/modules.conf in 2.4). Example: |
72 | 72 | ||
73 | options 3c59x debug=3 rx_copybreak=300 | 73 | options 3c59x debug=3 rx_copybreak=300 |
74 | 74 | ||
@@ -425,7 +425,7 @@ steps you should take: | |||
425 | 1) Increase the debug level. Usually this is done via: | 425 | 1) Increase the debug level. Usually this is done via: |
426 | 426 | ||
427 | a) modprobe driver debug=7 | 427 | a) modprobe driver debug=7 |
428 | b) In /etc/modprobe.d/driver.conf: | 428 | b) In /etc/modprobe.conf (or /etc/modules.conf for 2.4): |
429 | options driver debug=7 | 429 | options driver debug=7 |
430 | 430 | ||
431 | 2) Recreate the problem with the higher debug level, | 431 | 2) Recreate the problem with the higher debug level, |
diff --git a/Documentation/networking/vxge.txt b/Documentation/networking/vxge.txt index bb76c667a47..d2e2997e6fa 100644 --- a/Documentation/networking/vxge.txt +++ b/Documentation/networking/vxge.txt | |||
@@ -91,3 +91,10 @@ v) addr_learn_en | |||
91 | virtualization environment. | 91 | virtualization environment. |
92 | Valid range: 0,1 (disabled, enabled respectively) | 92 | Valid range: 0,1 (disabled, enabled respectively) |
93 | Default: 0 | 93 | Default: 0 |
94 | |||
95 | 4) Troubleshooting: | ||
96 | ------------------- | ||
97 | |||
98 | To resolve an issue with the source code or X3100 series adapter, please collect | ||
99 | the statistics, register dumps using ethool, relevant logs and email them to | ||
100 | support@neterion.com. | ||
diff --git a/Documentation/networking/vxlan.txt b/Documentation/networking/vxlan.txt deleted file mode 100644 index 6d993510f09..00000000000 --- a/Documentation/networking/vxlan.txt +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | Virtual eXtensible Local Area Networking documentation | ||
2 | ====================================================== | ||
3 | |||
4 | The VXLAN protocol is a tunnelling protocol that is designed to | ||
5 | solve the problem of limited number of available VLAN's (4096). | ||
6 | With VXLAN identifier is expanded to 24 bits. | ||
7 | |||
8 | It is a draft RFC standard, that is implemented by Cisco Nexus, | ||
9 | Vmware and Brocade. The protocol runs over UDP using a single | ||
10 | destination port (still not standardized by IANA). | ||
11 | This document describes the Linux kernel tunnel device, | ||
12 | there is also an implantation of VXLAN for Openvswitch. | ||
13 | |||
14 | Unlike most tunnels, a VXLAN is a 1 to N network, not just point | ||
15 | to point. A VXLAN device can either dynamically learn the IP address | ||
16 | of the other end, in a manner similar to a learning bridge, or the | ||
17 | forwarding entries can be configured statically. | ||
18 | |||
19 | The management of vxlan is done in a similar fashion to it's | ||
20 | too closest neighbors GRE and VLAN. Configuring VXLAN requires | ||
21 | the version of iproute2 that matches the kernel release | ||
22 | where VXLAN was first merged upstream. | ||
23 | |||
24 | 1. Create vxlan device | ||
25 | # ip li add vxlan0 type vxlan id 42 group 239.1.1.1 dev eth1 | ||
26 | |||
27 | This creates a new device (vxlan0). The device uses the | ||
28 | the multicast group 239.1.1.1 over eth1 to handle packets where | ||
29 | no entry is in the forwarding table. | ||
30 | |||
31 | 2. Delete vxlan device | ||
32 | # ip link delete vxlan0 | ||
33 | |||
34 | 3. Show vxlan info | ||
35 | # ip -d link show vxlan0 | ||
36 | |||
37 | It is possible to create, destroy and display the vxlan | ||
38 | forwarding table using the new bridge command. | ||
39 | |||
40 | 1. Create forwarding table entry | ||
41 | # bridge fdb add to 00:17:42:8a:b4:05 dst 192.19.0.2 dev vxlan0 | ||
42 | |||
43 | 2. Delete forwarding table entry | ||
44 | # bridge fdb delete 00:17:42:8a:b4:05 dev vxlan0 | ||
45 | |||
46 | 3. Show forwarding table | ||
47 | # bridge fdb show dev vxlan0 | ||