diff options
Diffstat (limited to 'Documentation/networking')
83 files changed, 21285 insertions, 0 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX new file mode 100644 index 000000000000..834993d26730 --- /dev/null +++ b/Documentation/networking/00-INDEX | |||
@@ -0,0 +1,127 @@ | |||
1 | 00-INDEX | ||
2 | - this file | ||
3 | 3c505.txt | ||
4 | - information on the 3Com EtherLink Plus (3c505) driver. | ||
5 | 6pack.txt | ||
6 | - info on the 6pack protocol, an alternative to KISS for AX.25 | ||
7 | Configurable | ||
8 | - info on some of the configurable network parameters | ||
9 | DLINK.txt | ||
10 | - info on the D-Link DE-600/DE-620 parallel port pocket adapters | ||
11 | PLIP.txt | ||
12 | - PLIP: The Parallel Line Internet Protocol device driver | ||
13 | README.sb1000 | ||
14 | - info on General Instrument/NextLevel SURFboard1000 cable modem. | ||
15 | alias.txt | ||
16 | - info on using alias network devices | ||
17 | arcnet-hardware.txt | ||
18 | - tons of info on ARCnet, hubs, jumper settings for ARCnet cards, etc. | ||
19 | arcnet.txt | ||
20 | - info on the using the ARCnet driver itself. | ||
21 | atm.txt | ||
22 | - info on where to get ATM programs and support for Linux. | ||
23 | ax25.txt | ||
24 | - info on using AX.25 and NET/ROM code for Linux | ||
25 | baycom.txt | ||
26 | - info on the driver for Baycom style amateur radio modems | ||
27 | bridge.txt | ||
28 | - where to get user space programs for ethernet bridging with Linux. | ||
29 | comx.txt | ||
30 | - info on drivers for COMX line of synchronous serial adapters. | ||
31 | cops.txt | ||
32 | - info on the COPS LocalTalk Linux driver | ||
33 | cs89x0.txt | ||
34 | - the Crystal LAN (CS8900/20-based) Ethernet ISA adapter driver | ||
35 | de4x5.txt | ||
36 | - the Digital EtherWORKS DE4?? and DE5?? PCI Ethernet driver | ||
37 | decnet.txt | ||
38 | - info on using the DECnet networking layer in Linux. | ||
39 | depca.txt | ||
40 | - the Digital DEPCA/EtherWORKS DE1?? and DE2?? LANCE Ethernet driver | ||
41 | dgrs.txt | ||
42 | - the Digi International RightSwitch SE-X Ethernet driver | ||
43 | dmfe.txt | ||
44 | - info on the Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver. | ||
45 | e100.txt | ||
46 | - info on Intel's EtherExpress PRO/100 line of 10/100 boards | ||
47 | e1000.txt | ||
48 | - info on Intel's E1000 line of gigabit ethernet boards | ||
49 | eql.txt | ||
50 | - serial IP load balancing | ||
51 | ethertap.txt | ||
52 | - the Ethertap user space packet reception and transmission driver | ||
53 | ewrk3.txt | ||
54 | - the Digital EtherWORKS 3 DE203/4/5 Ethernet driver | ||
55 | filter.txt | ||
56 | - Linux Socket Filtering | ||
57 | fore200e.txt | ||
58 | - FORE Systems PCA-200E/SBA-200E ATM NIC driver info. | ||
59 | framerelay.txt | ||
60 | - info on using Frame Relay/Data Link Connection Identifier (DLCI). | ||
61 | ip-sysctl.txt | ||
62 | - /proc/sys/net/ipv4/* variables | ||
63 | ip_dynaddr.txt | ||
64 | - IP dynamic address hack e.g. for auto-dialup links | ||
65 | ipddp.txt | ||
66 | - AppleTalk-IP Decapsulation and AppleTalk-IP Encapsulation | ||
67 | iphase.txt | ||
68 | - Interphase PCI ATM (i)Chip IA Linux driver info. | ||
69 | irda.txt | ||
70 | - where to get IrDA (infrared) utilities and info for Linux. | ||
71 | lapb-module.txt | ||
72 | - programming information of the LAPB module. | ||
73 | ltpc.txt | ||
74 | - the Apple or Farallon LocalTalk PC card driver | ||
75 | multicast.txt | ||
76 | - Behaviour of cards under Multicast | ||
77 | ncsa-telnet | ||
78 | - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled. | ||
79 | net-modules.txt | ||
80 | - info and "insmod" parameters for all network driver modules. | ||
81 | netdevices.txt | ||
82 | - info on network device driver functions exported to the kernel. | ||
83 | olympic.txt | ||
84 | - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info. | ||
85 | policy-routing.txt | ||
86 | - IP policy-based routing | ||
87 | pt.txt | ||
88 | - the Gracilis Packetwin AX.25 device driver | ||
89 | ray_cs.txt | ||
90 | - Raylink Wireless LAN card driver info. | ||
91 | routing.txt | ||
92 | - the new routing mechanism | ||
93 | shaper.txt | ||
94 | - info on the module that can shape/limit transmitted traffic. | ||
95 | sis900.txt | ||
96 | - SiS 900/7016 Fast Ethernet device driver info. | ||
97 | sk98lin.txt | ||
98 | - Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit | ||
99 | Ethernet Adapter family driver info | ||
100 | skfp.txt | ||
101 | - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. | ||
102 | smc9.txt | ||
103 | - the driver for SMC's 9000 series of Ethernet cards | ||
104 | smctr.txt | ||
105 | - SMC TokenCard TokenRing Linux driver info. | ||
106 | tcp.txt | ||
107 | - short blurb on how TCP output takes place. | ||
108 | tlan.txt | ||
109 | - ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info. | ||
110 | tms380tr.txt | ||
111 | - SysKonnect Token Ring ISA/PCI adapter driver info. | ||
112 | tuntap.txt | ||
113 | - TUN/TAP device driver, allowing user space Rx/Tx of packets. | ||
114 | vortex.txt | ||
115 | - info on using 3Com Vortex (3c590, 3c592, 3c595, 3c597) Ethernet cards. | ||
116 | wan-router.txt | ||
117 | - Wan router documentation | ||
118 | wanpipe.txt | ||
119 | - WANPIPE(tm) Multiprotocol WAN Driver for Linux WAN Router | ||
120 | wavelan.txt | ||
121 | - AT&T GIS (nee NCR) WaveLAN card: An Ethernet-like radio transceiver | ||
122 | x25.txt | ||
123 | - general info on X.25 development. | ||
124 | x25-iface.txt | ||
125 | - description of the X.25 Packet Layer to LAPB device interface. | ||
126 | z8530drv.txt | ||
127 | - info about Linux driver for Z8530 based HDLC cards for AX.25 | ||
diff --git a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt new file mode 100644 index 000000000000..4af8071a6d18 --- /dev/null +++ b/Documentation/networking/3c359.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | |||
2 | 3COM PCI TOKEN LINK VELOCITY XL TOKEN RING CARDS README | ||
3 | |||
4 | Release 0.9.0 - Release | ||
5 | Jul 17th 2000 Mike Phillips | ||
6 | |||
7 | 1.2.0 - Final | ||
8 | Feb 17th 2002 Mike Phillips | ||
9 | Updated for submission to the 2.4.x kernel. | ||
10 | |||
11 | Thanks: | ||
12 | Terry Murphy from 3Com for tech docs and support, | ||
13 | Adam D. Ligas for testing the driver. | ||
14 | |||
15 | Note: | ||
16 | This driver will NOT work with the 3C339 Token Ring cards, you need | ||
17 | to use the tms380 driver instead. | ||
18 | |||
19 | Options: | ||
20 | |||
21 | The driver accepts three options: ringspeed, pkt_buf_sz and message_level. | ||
22 | |||
23 | These options can be specified differently for each card found. | ||
24 | |||
25 | ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will | ||
26 | make the card autosense the ringspeed and join at the appropriate speed, | ||
27 | this will be the default option for most people. 4 or 16 allow you to | ||
28 | explicitly force the card to operate at a certain speed. The card will fail | ||
29 | if you try to insert it at the wrong speed. (Although some hubs will allow | ||
30 | this so be *very* careful). The main purpose for explicitly setting the ring | ||
31 | speed is for when the card is first on the ring. In autosense mode, if the card | ||
32 | cannot detect any active monitors on the ring it will open at the same speed as | ||
33 | its last opening. This can be hazardous if this speed does not match the speed | ||
34 | you want the ring to operate at. | ||
35 | |||
36 | pkt_buf_sz: This is this initial receive buffer allocation size. This will | ||
37 | default to 4096 if no value is entered. You may increase performance of the | ||
38 | driver by setting this to a value larger than the network packet size, although | ||
39 | the driver now re-sizes buffers based on MTU settings as well. | ||
40 | |||
41 | message_level: Controls level of messages created by the driver. Defaults to 0: | ||
42 | which only displays start-up and critical messages. Presently any non-zero | ||
43 | value will display all soft messages as well. NB This does not turn | ||
44 | debugging messages on, that must be done by modified the source code. | ||
45 | |||
46 | Variable MTU size: | ||
47 | |||
48 | The driver can handle a MTU size upto either 4500 or 18000 depending upon | ||
49 | ring speed. The driver also changes the size of the receive buffers as part | ||
50 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able | ||
51 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring | ||
52 | position = 296,000 bytes of memory space, plus of course anything | ||
53 | necessary for the tx sk_buff's. Remember this is per card, so if you are | ||
54 | building routers, gateway's etc, you could start to use a lot of memory | ||
55 | real fast. | ||
56 | |||
57 | 2/17/02 Mike Phillips | ||
58 | |||
diff --git a/Documentation/networking/3c505.txt b/Documentation/networking/3c505.txt new file mode 100644 index 000000000000..b9d5b7230118 --- /dev/null +++ b/Documentation/networking/3c505.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | The 3Com Etherlink Plus (3c505) driver. | ||
2 | |||
3 | This driver now uses DMA. There is currently no support for PIO operation. | ||
4 | The default DMA channel is 6; this is _not_ autoprobed, so you must | ||
5 | make sure you configure it correctly. If loading the driver as a | ||
6 | module, you can do this with "modprobe 3c505 dma=n". If the driver is | ||
7 | linked statically into the kernel, you must either use an "ether=" | ||
8 | statement on the command line, or change the definition of ELP_DMA in 3c505.h. | ||
9 | |||
10 | The driver will warn you if it has to fall back on the compiled in | ||
11 | default DMA channel. | ||
12 | |||
13 | If no base address is given at boot time, the driver will autoprobe | ||
14 | ports 0x300, 0x280 and 0x310 (in that order). If no IRQ is given, the driver | ||
15 | will try to probe for it. | ||
16 | |||
17 | The driver can be used as a loadable module. See net-modules.txt for details | ||
18 | of the parameters it can take. | ||
19 | |||
20 | Theoretically, one instance of the driver can now run multiple cards, | ||
21 | in the standard way (when loading a module, say "modprobe 3c505 | ||
22 | io=0x300,0x340 irq=10,11 dma=6,7" or whatever). I have not tested | ||
23 | this, though. | ||
24 | |||
25 | The driver may now support revision 2 hardware; the dependency on | ||
26 | being able to read the host control register has been removed. This | ||
27 | is also untested, since I don't have a suitable card. | ||
28 | |||
29 | Known problems: | ||
30 | I still see "DMA upload timed out" messages from time to time. These | ||
31 | seem to be fairly non-fatal though. | ||
32 | The card is old and slow. | ||
33 | |||
34 | To do: | ||
35 | Improve probe/setup code | ||
36 | Test multicast and promiscuous operation | ||
37 | |||
38 | Authors: | ||
39 | The driver is mainly written by Craig Southeren, email | ||
40 | <craigs@ineluki.apana.org.au>. | ||
41 | Parts of the driver (adapting the driver to 1.1.4+ kernels, | ||
42 | IRQ/address detection, some changes) and this README by | ||
43 | Juha Laiho <jlaiho@ichaos.nullnet.fi>. | ||
44 | DMA mode, more fixes, etc, by Philip Blundell <pjb27@cam.ac.uk> | ||
45 | Multicard support, Software configurable DMA, etc., by | ||
46 | Christopher Collins <ccollins@pcug.org.au> | ||
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt new file mode 100644 index 000000000000..867a99f88c68 --- /dev/null +++ b/Documentation/networking/3c509.txt | |||
@@ -0,0 +1,210 @@ | |||
1 | Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher) | ||
2 | ---------------------------------------------------------------------------- | ||
3 | |||
4 | This file contains the instructions and caveats for v1.18c and higher versions | ||
5 | of the 3c509 driver. You should not use the driver without reading this file. | ||
6 | |||
7 | release 1.0 | ||
8 | 28 February 2002 | ||
9 | Current maintainer (corrections to): | ||
10 | David Ruggiero <jdr@farfalle.com> | ||
11 | |||
12 | ---------------------------------------------------------------------------- | ||
13 | |||
14 | (0) Introduction | ||
15 | |||
16 | The following are notes and information on using the 3Com EtherLink III series | ||
17 | ethercards in Linux. These cards are commonly known by the most widely-used | ||
18 | card's 3Com model number, 3c509. They are all 10mb/s ISA-bus cards and shouldn't | ||
19 | be (but sometimes are) confused with the similarly-numbered PCI-bus "3c905" | ||
20 | (aka "Vortex" or "Boomerang") series. Kernel support for the 3c509 family is | ||
21 | provided by the module 3c509.c, which has code to support all of the following | ||
22 | models: | ||
23 | |||
24 | 3c509 (original ISA card) | ||
25 | 3c509B (later revision of the ISA card; supports full-duplex) | ||
26 | 3c589 (PCMCIA) | ||
27 | 3c589B (later revision of the 3c589; supports full-duplex) | ||
28 | 3c529 (MCA) | ||
29 | 3c579 (EISA) | ||
30 | |||
31 | Large portions of this documentation were heavily borrowed from the guide | ||
32 | written the original author of the 3c509 driver, Donald Becker. The master | ||
33 | copy of that document, which contains notes on older versions of the driver, | ||
34 | currently resides on Scyld web server: http://www.scyld.com/network/3c509.html. | ||
35 | |||
36 | |||
37 | (1) Special Driver Features | ||
38 | |||
39 | Overriding card settings | ||
40 | |||
41 | The driver allows boot- or load-time overriding of the card's detected IOADDR, | ||
42 | IRQ, and transceiver settings, although this capability shouldn't generally be | ||
43 | needed except to enable full-duplex mode (see below). An example of the syntax | ||
44 | for LILO parameters for doing this: | ||
45 | |||
46 | ether=10,0x310,3,0x3c509,eth0 | ||
47 | |||
48 | This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and | ||
49 | transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts | ||
50 | with other card types when overriding the I/O address. When the driver is | ||
51 | loaded as a module, only the IRQ and transceiver setting may be overridden. | ||
52 | For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using | ||
53 | the xcvr and irq module options: | ||
54 | |||
55 | options 3c509 xcvr=3,1 irq=10,11 | ||
56 | |||
57 | |||
58 | (2) Full-duplex mode | ||
59 | |||
60 | The v1.18c driver added support for the 3c509B's full-duplex capabilities. | ||
61 | In order to enable and successfully use full-duplex mode, three conditions | ||
62 | must be met: | ||
63 | |||
64 | (a) You must have a Etherlink III card model whose hardware supports full- | ||
65 | duplex operations. Currently, the only members of the 3c509 family that are | ||
66 | positively known to support full-duplex are the 3c509B (ISA bus) and 3c589B | ||
67 | (PCMCIA) cards. Cards without the "B" model designation do *not* support | ||
68 | full-duplex mode; these include the original 3c509 (no "B"), the original | ||
69 | 3c589, the 3c529 (MCA bus), and the 3c579 (EISA bus). | ||
70 | |||
71 | (b) You must be using your card's 10baseT transceiver (i.e., the RJ-45 | ||
72 | connector), not its AUI (thick-net) or 10base2 (thin-net/coax) interfaces. | ||
73 | AUI and 10base2 network cabling is physically incapable of full-duplex | ||
74 | operation. | ||
75 | |||
76 | (c) Most importantly, your 3c509B must be connected to a link partner that is | ||
77 | itself full-duplex capable. This is almost certainly one of two things: a full- | ||
78 | duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on | ||
79 | another system that's connected directly to the 3c509B via a crossover cable. | ||
80 | |||
81 | /////Extremely important caution concerning full-duplex mode///// | ||
82 | Understand that the 3c509B's hardware's full-duplex support is much more | ||
83 | limited than that provide by more modern network interface cards. Although | ||
84 | at the physical layer of the network it fully supports full-duplex operation, | ||
85 | the card was designed before the current Ethernet auto-negotiation (N-way) | ||
86 | spec was written. This means that the 3c509B family ***cannot and will not | ||
87 | auto-negotiate a full-duplex connection with its link partner under any | ||
88 | circumstances, no matter how it is initialized***. If the full-duplex mode | ||
89 | of the 3c509B is enabled, its link partner will very likely need to be | ||
90 | independently _forced_ into full-duplex mode as well; otherwise various nasty | ||
91 | failures will occur - at the very least, you'll see massive numbers of packet | ||
92 | collisions. This is one of very rare circumstances where disabling auto- | ||
93 | negotiation and forcing the duplex mode of a network interface card or switch | ||
94 | would ever be necessary or desirable. | ||
95 | |||
96 | |||
97 | (3) Available Transceiver Types | ||
98 | |||
99 | For versions of the driver v1.18c and above, the available transceiver types are: | ||
100 | |||
101 | 0 transceiver type from EEPROM config (normally 10baseT); force half-duplex | ||
102 | 1 AUI (thick-net / DB15 connector) | ||
103 | 2 (undefined) | ||
104 | 3 10base2 (thin-net == coax / BNC connector) | ||
105 | 4 10baseT (RJ-45 connector); force half-duplex mode | ||
106 | 8 transceiver type and duplex mode taken from card's EEPROM config settings | ||
107 | 12 10baseT (RJ-45 connector); force full-duplex mode | ||
108 | |||
109 | Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note | ||
110 | that the new transceiver codes 8 and 12 are the *only* ones that will enable | ||
111 | full-duplex mode, no matter what the card's detected EEPROM settings might be. | ||
112 | This insured that merely upgrading the driver from an earlier version would | ||
113 | never automatically enable full-duplex mode in an existing installation; | ||
114 | it must always be explicitly enabled via one of these code in order to be | ||
115 | activated. | ||
116 | |||
117 | |||
118 | (4a) Interpretation of error messages and common problems | ||
119 | |||
120 | Error Messages | ||
121 | |||
122 | eth0: Infinite loop in interrupt, status 2011. | ||
123 | These are "mostly harmless" message indicating that the driver had too much | ||
124 | work during that interrupt cycle. With a status of 0x2011 you are receiving | ||
125 | packets faster than they can be removed from the card. This should be rare | ||
126 | or impossible in normal operation. Possible causes of this error report are: | ||
127 | |||
128 | - a "green" mode enabled that slows the processor down when there is no | ||
129 | keyboard activitiy. | ||
130 | |||
131 | - some other device or device driver hogging the bus or disabling interrupts. | ||
132 | Check /proc/interrupts for excessive interrupt counts. The timer tick | ||
133 | interrupt should always be incrementing faster than the others. | ||
134 | |||
135 | No received packets | ||
136 | If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never | ||
137 | receives packets (as reported by /proc/net/dev or 'ifconfig') you likely | ||
138 | have an interrupt line problem. Check /proc/interrupts to verify that the | ||
139 | card is actually generating interrupts. If the interrupt count is not | ||
140 | increasing you likely have a physical conflict with two devices trying to | ||
141 | use the same ISA IRQ line. The common conflict is with a sound card on IRQ10 | ||
142 | or IRQ5, and the easiest solution is to move the 3c509 to a different | ||
143 | interrupt line. If the device is receiving packets but 'ping' doesn't work, | ||
144 | you have a routing problem. | ||
145 | |||
146 | Tx Carrier Errors Reported in /proc/net/dev | ||
147 | If an EtherLink III appears to transmit packets, but the "Tx carrier errors" | ||
148 | field in /proc/net/dev increments as quickly as the Tx packet count, you | ||
149 | likely have an unterminated network or the incorrect media transceiver selected. | ||
150 | |||
151 | 3c509B card is not detected on machines with an ISA PnP BIOS. | ||
152 | While the updated driver works with most PnP BIOS programs, it does not work | ||
153 | with all. This can be fixed by disabling PnP support using the 3Com-supplied | ||
154 | setup program. | ||
155 | |||
156 | 3c509 card is not detected on overclocked machines | ||
157 | Increase the delay time in id_read_eeprom() from the current value, 500, | ||
158 | to an absurdly high value, such as 5000. | ||
159 | |||
160 | |||
161 | (4b) Decoding Status and Error Messages | ||
162 | |||
163 | The bits in the main status register are: | ||
164 | |||
165 | value description | ||
166 | 0x01 Interrupt latch | ||
167 | 0x02 Tx overrun, or Rx underrun | ||
168 | 0x04 Tx complete | ||
169 | 0x08 Tx FIFO room available | ||
170 | 0x10 A complete Rx packet has arrived | ||
171 | 0x20 A Rx packet has started to arrive | ||
172 | 0x40 The driver has requested an interrupt | ||
173 | 0x80 Statistics counter nearly full | ||
174 | |||
175 | The bits in the transmit (Tx) status word are: | ||
176 | |||
177 | value description | ||
178 | 0x02 Out-of-window collision. | ||
179 | 0x04 Status stack overflow (normally impossible). | ||
180 | 0x08 16 collisions. | ||
181 | 0x10 Tx underrun (not enough PCI bus bandwidth). | ||
182 | 0x20 Tx jabber. | ||
183 | 0x40 Tx interrupt requested. | ||
184 | 0x80 Status is valid (this should always be set). | ||
185 | |||
186 | |||
187 | When a transmit error occurs the driver produces a status message such as | ||
188 | |||
189 | eth0: Transmit error, Tx status register 82 | ||
190 | |||
191 | The two values typically seen here are: | ||
192 | |||
193 | 0x82 | ||
194 | Out of window collision. This typically occurs when some other Ethernet | ||
195 | host is incorrectly set to full duplex on a half duplex network. | ||
196 | |||
197 | 0x88 | ||
198 | 16 collisions. This typically occurs when the network is exceptionally busy | ||
199 | or when another host doesn't correctly back off after a collision. If this | ||
200 | error is mixed with 0x82 errors it is the result of a host incorrectly set | ||
201 | to full duplex (see above). | ||
202 | |||
203 | Both of these errors are the result of network problems that should be | ||
204 | corrected. They do not represent driver malfunction. | ||
205 | |||
206 | |||
207 | (5) Revision history (this file) | ||
208 | |||
209 | 28Feb02 v1.0 DR New; major portions based on Becker original 3c509 docs | ||
210 | |||
diff --git a/Documentation/networking/6pack.txt b/Documentation/networking/6pack.txt new file mode 100644 index 000000000000..48ed2b711bd2 --- /dev/null +++ b/Documentation/networking/6pack.txt | |||
@@ -0,0 +1,175 @@ | |||
1 | This is the 6pack-mini-HOWTO, written by | ||
2 | |||
3 | Andreas Könsgen DG3KQ | ||
4 | Internet: ajk@iehk.rwth-aachen.de | ||
5 | AMPR-net: dg3kq@db0pra.ampr.org | ||
6 | AX.25: dg3kq@db0ach.#nrw.deu.eu | ||
7 | |||
8 | Last update: April 7, 1998 | ||
9 | |||
10 | 1. What is 6pack, and what are the advantages to KISS? | ||
11 | |||
12 | 6pack is a transmission protocol for data exchange between the PC and | ||
13 | the TNC over a serial line. It can be used as an alternative to KISS. | ||
14 | |||
15 | 6pack has two major advantages: | ||
16 | - The PC is given full control over the radio | ||
17 | channel. Special control data is exchanged between the PC and the TNC so | ||
18 | that the PC knows at any time if the TNC is receiving data, if a TNC | ||
19 | buffer underrun or overrun has occurred, if the PTT is | ||
20 | set and so on. This control data is processed at a higher priority than | ||
21 | normal data, so a data stream can be interrupted at any time to issue an | ||
22 | important event. This helps to improve the channel access and timing | ||
23 | algorithms as everything is computed in the PC. It would even be possible | ||
24 | to experiment with something completely different from the known CSMA and | ||
25 | DAMA channel access methods. | ||
26 | This kind of real-time control is especially important to supply several | ||
27 | TNCs that are connected between each other and the PC by a daisy chain | ||
28 | (however, this feature is not supported yet by the Linux 6pack driver). | ||
29 | |||
30 | - Each packet transferred over the serial line is supplied with a checksum, | ||
31 | so it is easy to detect errors due to problems on the serial line. | ||
32 | Received packets that are corrupt are not passed on to the AX.25 layer. | ||
33 | Damaged packets that the TNC has received from the PC are not transmitted. | ||
34 | |||
35 | More details about 6pack are described in the file 6pack.ps that is located | ||
36 | in the doc directory of the AX.25 utilities package. | ||
37 | |||
38 | 2. Who has developed the 6pack protocol? | ||
39 | |||
40 | The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech | ||
41 | DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and | ||
42 | Matthias Welwarsky DG2FEF, comes along with the PC version of FlexNet. | ||
43 | They have also written a firmware for TNCs to perform the 6pack | ||
44 | protocol (see section 4 below). | ||
45 | |||
46 | 3. Where can I get the latest version of 6pack for LinuX? | ||
47 | |||
48 | At the moment, the 6pack stuff can obtained via anonymous ftp from | ||
49 | db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq, | ||
50 | there is a file named 6pack.tgz. | ||
51 | |||
52 | 4. Preparing the TNC for 6pack operation | ||
53 | |||
54 | To be able to use 6pack, a special firmware for the TNC is needed. The EPROM | ||
55 | of a newly bought TNC does not contain 6pack, so you will have to | ||
56 | program an EPROM yourself. The image file for 6pack EPROMs should be | ||
57 | available on any packet radio box where PC/FlexNet can be found. The name of | ||
58 | the file is 6pack.bin. This file is copyrighted and maintained by the FlexNet | ||
59 | team. It can be used under the terms of the license that comes along | ||
60 | with PC/FlexNet. Please do not ask me about the internals of this file as I | ||
61 | don't know anything about it. I used a textual description of the 6pack | ||
62 | protocol to program the Linux driver. | ||
63 | |||
64 | TNCs contain a 64kByte EPROM, the lower half of which is used for | ||
65 | the firmware/KISS. The upper half is either empty or is sometimes | ||
66 | programmed with software called TAPR. In the latter case, the TNC | ||
67 | is supplied with a DIP switch so you can easily change between the | ||
68 | two systems. When programming a new EPROM, one of the systems is replaced | ||
69 | by 6pack. It is useful to replace TAPR, as this software is rarely used | ||
70 | nowadays. If your TNC is not equipped with the switch mentioned above, you | ||
71 | can build in one yourself that switches over the highest address pin | ||
72 | of the EPROM between HIGH and LOW level. After having inserted the new EPROM | ||
73 | and switched to 6pack, apply power to the TNC for a first test. The connect | ||
74 | and the status LED are lit for about a second if the firmware initialises | ||
75 | the TNC correctly. | ||
76 | |||
77 | 5. Building and installing the 6pack driver | ||
78 | |||
79 | The driver has been tested with kernel version 2.1.90. Use with older | ||
80 | kernels may lead to a compilation error because the interface to a kernel | ||
81 | function has been changed in the 2.1.8x kernels. | ||
82 | |||
83 | How to turn on 6pack support: | ||
84 | |||
85 | - In the linux kernel configuration program, select the code maturity level | ||
86 | options menu and turn on the prompting for development drivers. | ||
87 | |||
88 | - Select the amateur radio support menu and turn on the serial port 6pack | ||
89 | driver. | ||
90 | |||
91 | - Compile and install the kernel and the modules. | ||
92 | |||
93 | To use the driver, the kissattach program delivered with the AX.25 utilities | ||
94 | has to be modified. | ||
95 | |||
96 | - Do a cd to the directory that holds the kissattach sources. Edit the | ||
97 | kissattach.c file. At the top, insert the following lines: | ||
98 | |||
99 | #ifndef N_6PACK | ||
100 | #define N_6PACK (N_AX25+1) | ||
101 | #endif | ||
102 | |||
103 | Then find the line | ||
104 | |||
105 | int disc = N_AX25; | ||
106 | |||
107 | and replace N_AX25 by N_6PACK. | ||
108 | |||
109 | - Recompile kissattach. Rename it to spattach to avoid confusions. | ||
110 | |||
111 | Installing the driver: | ||
112 | |||
113 | - Do an insmod 6pack. Look at your /var/log/messages file to check if the | ||
114 | module has printed its initialization message. | ||
115 | |||
116 | - Do a spattach as you would launch kissattach when starting a KISS port. | ||
117 | Check if the kernel prints the message '6pack: TNC found'. | ||
118 | |||
119 | - From here, everything should work as if you were setting up a KISS port. | ||
120 | The only difference is that the network device that represents | ||
121 | the 6pack port is called sp instead of sl or ax. So, sp0 would be the | ||
122 | first 6pack port. | ||
123 | |||
124 | Although the driver has been tested on various platforms, I still declare it | ||
125 | ALPHA. BE CAREFUL! Sync your disks before insmoding the 6pack module | ||
126 | and spattaching. Watch out if your computer behaves strangely. Read section | ||
127 | 6 of this file about known problems. | ||
128 | |||
129 | Note that the connect and status LEDs of the TNC are controlled in a | ||
130 | different way than they are when the TNC is used with PC/FlexNet. When using | ||
131 | FlexNet, the connect LED is on if there is a connection; the status LED is | ||
132 | on if there is data in the buffer of the PC's AX.25 engine that has to be | ||
133 | transmitted. Under Linux, the 6pack layer is beyond the AX.25 layer, | ||
134 | so the 6pack driver doesn't know anything about connects or data that | ||
135 | has not yet been transmitted. Therefore the LEDs are controlled | ||
136 | as they are in KISS mode: The connect LED is turned on if data is transferred | ||
137 | from the PC to the TNC over the serial line, the status LED if data is | ||
138 | sent to the PC. | ||
139 | |||
140 | 6. Known problems | ||
141 | |||
142 | When testing the driver with 2.0.3x kernels and | ||
143 | operating with data rates on the radio channel of 9600 Baud or higher, | ||
144 | the driver may, on certain systems, sometimes print the message '6pack: | ||
145 | bad checksum', which is due to data loss if the other station sends two | ||
146 | or more subsequent packets. I have been told that this is due to a problem | ||
147 | with the serial driver of 2.0.3x kernels. I don't know yet if the problem | ||
148 | still exists with 2.1.x kernels, as I have heard that the serial driver | ||
149 | code has been changed with 2.1.x. | ||
150 | |||
151 | When shutting down the sp interface with ifconfig, the kernel crashes if | ||
152 | there is still an AX.25 connection left over which an IP connection was | ||
153 | running, even if that IP connection is already closed. The problem does not | ||
154 | occur when there is a bare AX.25 connection still running. I don't know if | ||
155 | this is a problem of the 6pack driver or something else in the kernel. | ||
156 | |||
157 | The driver has been tested as a module, not yet as a kernel-builtin driver. | ||
158 | |||
159 | The 6pack protocol supports daisy-chaining of TNCs in a token ring, which is | ||
160 | connected to one serial port of the PC. This feature is not implemented | ||
161 | and at least at the moment I won't be able to do it because I do not have | ||
162 | the opportunity to build a TNC daisy-chain and test it. | ||
163 | |||
164 | Some of the comments in the source code are inaccurate. They are left from | ||
165 | the SLIP/KISS driver, from which the 6pack driver has been derived. | ||
166 | I haven't modified or removed them yet -- sorry! The code itself needs | ||
167 | some cleaning and optimizing. This will be done in a later release. | ||
168 | |||
169 | If you encounter a bug or if you have a question or suggestion concerning the | ||
170 | driver, feel free to mail me, using the addresses given at the beginning of | ||
171 | this file. | ||
172 | |||
173 | Have fun! | ||
174 | |||
175 | Andreas | ||
diff --git a/Documentation/networking/Configurable b/Documentation/networking/Configurable new file mode 100644 index 000000000000..69c0dd466ead --- /dev/null +++ b/Documentation/networking/Configurable | |||
@@ -0,0 +1,34 @@ | |||
1 | |||
2 | There are a few network parameters that can be tuned to better match | ||
3 | the kernel to your system hardware and intended usage. The defaults | ||
4 | are usually a good choice for 99% of the people 99% of the time, but | ||
5 | you should be aware they do exist and can be changed. | ||
6 | |||
7 | The current list of parameters can be found in the files: | ||
8 | |||
9 | linux/net/TUNABLE | ||
10 | Documentation/networking/ip-sysctl.txt | ||
11 | |||
12 | Some of these are accessible via the sysctl interface, and many more are | ||
13 | scheduled to be added in this way. For example, some parameters related | ||
14 | to Address Resolution Protocol (ARP) are very easily viewed and altered. | ||
15 | |||
16 | # cat /proc/sys/net/ipv4/arp_timeout | ||
17 | 6000 | ||
18 | # echo 7000 > /proc/sys/net/ipv4/arp_timeout | ||
19 | # cat /proc/sys/net/ipv4/arp_timeout | ||
20 | 7000 | ||
21 | |||
22 | Others are already accessible via the related user space programs. | ||
23 | For example, MAX_WINDOW has a default of 32 k which is a good choice for | ||
24 | modern hardware, but if you have a slow (8 bit) Ethernet card and/or a slow | ||
25 | machine, then this will be far too big for the card to keep up with fast | ||
26 | machines transmitting on the same net, resulting in overruns and receive errors. | ||
27 | A value of about 4 k would be more appropriate, which can be set via: | ||
28 | |||
29 | # route add -net 192.168.3.0 window 4096 | ||
30 | |||
31 | The remainder of these can only be presently changed by altering a #define | ||
32 | in the related header file. This means an edit and recompile cycle. | ||
33 | |||
34 | Paul Gortmaker 06/96 | ||
diff --git a/Documentation/networking/DLINK.txt b/Documentation/networking/DLINK.txt new file mode 100644 index 000000000000..083d24752b83 --- /dev/null +++ b/Documentation/networking/DLINK.txt | |||
@@ -0,0 +1,204 @@ | |||
1 | Released 1994-06-13 | ||
2 | |||
3 | |||
4 | CONTENTS: | ||
5 | |||
6 | 1. Introduction. | ||
7 | 2. License. | ||
8 | 3. Files in this release. | ||
9 | 4. Installation. | ||
10 | 5. Problems and tuning. | ||
11 | 6. Using the drivers with earlier releases. | ||
12 | 7. Acknowledgments. | ||
13 | |||
14 | |||
15 | 1. INTRODUCTION. | ||
16 | |||
17 | This is a set of Ethernet drivers for the D-Link DE-600/DE-620 | ||
18 | pocket adapters, for the parallel port on a Linux based machine. | ||
19 | Some adapter "clones" will also work. Xircom is _not_ a clone... | ||
20 | These drivers _can_ be used as loadable modules, | ||
21 | and were developed for use on Linux 1.1.13 and above. | ||
22 | For use on Linux 1.0.X, or earlier releases, see below. | ||
23 | |||
24 | I have used these drivers for NFS, ftp, telnet and X-clients on | ||
25 | remote machines. Transmissions with ftp seems to work as | ||
26 | good as can be expected (i.e. > 80k bytes/sec) from a | ||
27 | parallel port...:-) Receive speeds will be about 60-80% of this. | ||
28 | Depending on your machine, somewhat higher speeds can be achieved. | ||
29 | |||
30 | All comments/fixes to Bjorn Ekwall (bj0rn@blox.se). | ||
31 | |||
32 | |||
33 | 2. LICENSE. | ||
34 | |||
35 | This program is free software; you can redistribute it | ||
36 | and/or modify it under the terms of the GNU General Public | ||
37 | License as published by the Free Software Foundation; either | ||
38 | version 2, or (at your option) any later version. | ||
39 | |||
40 | This program is distributed in the hope that it will be | ||
41 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
42 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
43 | PURPOSE. See the GNU General Public License for more | ||
44 | details. | ||
45 | |||
46 | You should have received a copy of the GNU General Public | ||
47 | License along with this program; if not, write to the Free | ||
48 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA | ||
49 | 02139, USA. | ||
50 | |||
51 | |||
52 | 3. FILES IN THIS RELEASE. | ||
53 | |||
54 | README.DLINK This file. | ||
55 | de600.c The Source (may it be with You :-) for the DE-600 | ||
56 | de620.c ditto for the DE-620 | ||
57 | de620.h Macros for de620.c | ||
58 | |||
59 | If you are upgrading from the d-link tar release, there will | ||
60 | also be a "dlink-patches" file that will patch Linux 1.1.18: | ||
61 | linux/drivers/net/Makefile | ||
62 | linux/drivers/net/CONFIG | ||
63 | linux/drivers/net/MODULES | ||
64 | linux/drivers/net/Space.c | ||
65 | linux/config.in | ||
66 | Apply the patch by: | ||
67 | "cd /usr/src; patch -p0 < linux/drivers/net/dlink-patches" | ||
68 | The old source, "linux/drivers/net/d_link.c", can be removed. | ||
69 | |||
70 | |||
71 | 4. INSTALLATION. | ||
72 | |||
73 | o Get the latest net binaries, according to current net.wisdom. | ||
74 | |||
75 | o Read the NET-2 and Ethernet HOWTOs and modify your setup. | ||
76 | |||
77 | o If your parallel port has a strange address or irq, | ||
78 | modify "linux/drivers/net/CONFIG" accordingly, or adjust | ||
79 | the parameters in the "tuning" section in the sources. | ||
80 | |||
81 | If you are going to use the drivers as loadable modules, do _not_ | ||
82 | enable them while doing "make config", but instead make sure that | ||
83 | the drivers are included in "linux/drivers/net/MODULES". | ||
84 | |||
85 | If you are _not_ going to use the driver(s) as loadable modules, | ||
86 | but instead have them included in the kernel, remember to enable | ||
87 | the drivers while doing "make config". | ||
88 | |||
89 | o To include networking and DE600/DE620 support in your kernel: | ||
90 | # cd /linux | ||
91 | (as modules:) | ||
92 | # make config (answer yes on CONFIG_NET and CONFIG_INET) | ||
93 | (else included in the kernel:) | ||
94 | # make config (answer yes on CONFIG _NET, _INET and _DE600 or _DE620) | ||
95 | # make clean | ||
96 | # make zImage (or whatever magic you usually do) | ||
97 | |||
98 | o I use lilo to boot multiple kernels, so that I at least | ||
99 | can have one working kernel :-). If you do too, append | ||
100 | these lines to /etc/lilo/config: | ||
101 | |||
102 | image = /linux/zImage | ||
103 | label = newlinux | ||
104 | root = /dev/hda2 (or whatever YOU have...) | ||
105 | |||
106 | # /etc/lilo/install | ||
107 | |||
108 | o Do "sync" and reboot the new kernel with a D-Link | ||
109 | DE-600/DE-620 pocket adapter connected. | ||
110 | |||
111 | o The adapter can be configured with ifconfig eth? | ||
112 | where the actual number is decided by the kernel | ||
113 | when the drivers are initialized. | ||
114 | |||
115 | |||
116 | 5. "PROBLEMS" AND TUNING, | ||
117 | |||
118 | o If you see error messages from the driver, and if the traffic | ||
119 | stops on the adapter, try to do "ifconfig" and "route" once | ||
120 | more, just as in "rc.inet1". This should take care of most | ||
121 | problems, including effects from power loss, or adapters that | ||
122 | aren't connected to the printer port in some way or another. | ||
123 | You can somewhat change the behaviour by enabling/disabling | ||
124 | the macro SHUTDOWN_WHEN_LOST in the "tuning" section. | ||
125 | For the DE-600 there is another macro, CHECK_LOST_DE600, | ||
126 | that you might want to read about in the "tuning" section. | ||
127 | |||
128 | o Some machines have trouble handling the parallel port and | ||
129 | the adapter at high speed. If you experience problems: | ||
130 | |||
131 | DE-600: | ||
132 | - The adapter is not recognized at boot, i.e. an Ethernet | ||
133 | address of 00:80:c8:... is not shown, try to add another | ||
134 | "; SLOW_DOWN_IO" | ||
135 | at DE600_SLOW_DOWN in the "tuning" section. As a last resort, | ||
136 | uncomment: "#define REALLY_SLOW_IO" (see <asm/io.h> for hints). | ||
137 | |||
138 | - You experience "timeout" messages: first try to add another | ||
139 | "; SLOW_DOWN_IO" | ||
140 | at DE600_SLOW_DOWN in the "tuning" section, _then_ try to | ||
141 | increase the value (original value: 5) at | ||
142 | "if (tickssofar < 5)" near line 422. | ||
143 | |||
144 | DE-620: | ||
145 | - Your parallel port might be "sluggish". To cater for | ||
146 | this, there are the macros LOWSPEED and READ_DELAY/WRITE_DELAY | ||
147 | in the "tuning" section. Your first step should be to enable | ||
148 | LOWSPEED, and after that you can "tune" the XXX_DELAY values. | ||
149 | |||
150 | o If the adapter _is_ recognized at boot but you get messages | ||
151 | about "Network Unreachable", then the problem is probably | ||
152 | _not_ with the driver. Check your net configuration instead | ||
153 | (ifconfig and route) in "rc.inet1". | ||
154 | |||
155 | o There is some rudimentary support for debugging, look at | ||
156 | the source. Use "-DDE600_DEBUG=3" or "-DDE620_DEBUG=3" | ||
157 | when compiling, or include it in "linux/drivers/net/CONFIG". | ||
158 | IF YOU HAVE PROBLEMS YOU CAN'T SOLVE: PLEASE COMPILE THE DRIVER | ||
159 | WITH DEBUGGING ENABLED, AND SEND ME THE RESULTING OUTPUT! | ||
160 | |||
161 | |||
162 | 6. USING THE DRIVERS WITH EARLIER RELEASES. | ||
163 | |||
164 | The later 1.1.X releases of the Linux kernel include some | ||
165 | changes in the networking layer (a.k.a. NET3). This affects | ||
166 | these drivers in a few places. The hints that follow are | ||
167 | _not_ tested by me, since I don't have the disk space to keep | ||
168 | all releases on-line. | ||
169 | Known needed changes to date: | ||
170 | - release patchfile: some patches will fail, but they should | ||
171 | be easy to apply "by hand", since they are trivial. | ||
172 | (Space.c: d_link_init() is now called de600_probe()) | ||
173 | - de600.c: change "mark_bh(NET_BH)" to "mark_bh(INET_BH)". | ||
174 | - de620.c: (maybe) change the code around "netif_rx(skb);" to be | ||
175 | similar to the code around "dev_rint(...)" in de600.c | ||
176 | |||
177 | |||
178 | 7. ACKNOWLEDGMENTS. | ||
179 | |||
180 | These drivers wouldn't have been done without the base | ||
181 | (and support) from Ross Biro <bir7@leland.stanford.edu>, | ||
182 | and D-Link Systems Inc. The driver relies upon GPL-ed | ||
183 | source from D-Link Systems Inc. and from Russel Nelson at | ||
184 | Crynwr Software <nelson@crynwr.com>. | ||
185 | |||
186 | Additional input also from: | ||
187 | Donald Becker <becker@super.org>, Alan Cox <A.Cox@swansea.ac.uk> | ||
188 | and Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG> | ||
189 | |||
190 | DE-600 alpha release primary victim^H^H^H^H^H^Htester: | ||
191 | - Erik Proper <erikp@cs.kun.nl>. | ||
192 | Good input also from several users, most notably | ||
193 | - Mark Burton <markb@ordern.demon.co.uk>. | ||
194 | |||
195 | DE-620 alpha release victims^H^H^H^H^H^H^Htesters: | ||
196 | - J. Joshua Kopper <kopper@rtsg.mot.com> | ||
197 | - Olav Kvittem <Olav.Kvittem@uninett.no> | ||
198 | - Germano Caronni <caronni@nessie.cs.id.ethz.ch> | ||
199 | - Jeremy Fitzhardinge <jeremy@suite.sw.oz.au> | ||
200 | |||
201 | |||
202 | Happy hacking! | ||
203 | |||
204 | Bjorn Ekwall == bj0rn@blox.se | ||
diff --git a/Documentation/networking/NAPI_HOWTO.txt b/Documentation/networking/NAPI_HOWTO.txt new file mode 100644 index 000000000000..54376e8249c1 --- /dev/null +++ b/Documentation/networking/NAPI_HOWTO.txt | |||
@@ -0,0 +1,766 @@ | |||
1 | HISTORY: | ||
2 | February 16/2002 -- revision 0.2.1: | ||
3 | COR typo corrected | ||
4 | February 10/2002 -- revision 0.2: | ||
5 | some spell checking ;-> | ||
6 | January 12/2002 -- revision 0.1 | ||
7 | This is still work in progress so may change. | ||
8 | To keep up to date please watch this space. | ||
9 | |||
10 | Introduction to NAPI | ||
11 | ==================== | ||
12 | |||
13 | NAPI is a proven (www.cyberus.ca/~hadi/usenix-paper.tgz) technique | ||
14 | to improve network performance on Linux. For more details please | ||
15 | read that paper. | ||
16 | NAPI provides a "inherent mitigation" which is bound by system capacity | ||
17 | as can be seen from the following data collected by Robert on Gigabit | ||
18 | ethernet (e1000): | ||
19 | |||
20 | Psize Ipps Tput Rxint Txint Done Ndone | ||
21 | --------------------------------------------------------------- | ||
22 | 60 890000 409362 17 27622 7 6823 | ||
23 | 128 758150 464364 21 9301 10 7738 | ||
24 | 256 445632 774646 42 15507 21 12906 | ||
25 | 512 232666 994445 241292 19147 241192 1062 | ||
26 | 1024 119061 1000003 872519 19258 872511 0 | ||
27 | 1440 85193 1000003 946576 19505 946569 0 | ||
28 | |||
29 | |||
30 | Legend: | ||
31 | "Ipps" stands for input packets per second. | ||
32 | "Tput" == packets out of total 1M that made it out. | ||
33 | "txint" == transmit completion interrupts seen | ||
34 | "Done" == The number of times that the poll() managed to pull all | ||
35 | packets out of the rx ring. Note from this that the lower the | ||
36 | load the more we could clean up the rxring | ||
37 | "Ndone" == is the converse of "Done". Note again, that the higher | ||
38 | the load the more times we couldnt clean up the rxring. | ||
39 | |||
40 | Observe that: | ||
41 | when the NIC receives 890Kpackets/sec only 17 rx interrupts are generated. | ||
42 | The system cant handle the processing at 1 interrupt/packet at that load level. | ||
43 | At lower rates on the other hand, rx interrupts go up and therefore the | ||
44 | interrupt/packet ratio goes up (as observable from that table). So there is | ||
45 | possibility that under low enough input, you get one poll call for each | ||
46 | input packet caused by a single interrupt each time. And if the system | ||
47 | cant handle interrupt per packet ratio of 1, then it will just have to | ||
48 | chug along .... | ||
49 | |||
50 | |||
51 | 0) Prerequisites: | ||
52 | ================== | ||
53 | A driver MAY continue using the old 2.4 technique for interfacing | ||
54 | to the network stack and not benefit from the NAPI changes. | ||
55 | NAPI additions to the kernel do not break backward compatibility. | ||
56 | NAPI, however, requires the following features to be available: | ||
57 | |||
58 | A) DMA ring or enough RAM to store packets in software devices. | ||
59 | |||
60 | B) Ability to turn off interrupts or maybe events that send packets up | ||
61 | the stack. | ||
62 | |||
63 | NAPI processes packet events in what is known as dev->poll() method. | ||
64 | Typically, only packet receive events are processed in dev->poll(). | ||
65 | The rest of the events MAY be processed by the regular interrupt handler | ||
66 | to reduce processing latency (justified also because there are not that | ||
67 | many of them). | ||
68 | Note, however, NAPI does not enforce that dev->poll() only processes | ||
69 | receive events. | ||
70 | Tests with the tulip driver indicated slightly increased latency if | ||
71 | all of the interrupt handler is moved to dev->poll(). Also MII handling | ||
72 | gets a little trickier. | ||
73 | The example used in this document is to move the receive processing only | ||
74 | to dev->poll(); this is shown with the patch for the tulip driver. | ||
75 | For an example of code that moves all the interrupt driver to | ||
76 | dev->poll() look at the ported e1000 code. | ||
77 | |||
78 | There are caveats that might force you to go with moving everything to | ||
79 | dev->poll(). Different NICs work differently depending on their status/event | ||
80 | acknowledgement setup. | ||
81 | There are two types of event register ACK mechanisms. | ||
82 | I) what is known as Clear-on-read (COR). | ||
83 | when you read the status/event register, it clears everything! | ||
84 | The natsemi and sunbmac NICs are known to do this. | ||
85 | In this case your only choice is to move all to dev->poll() | ||
86 | |||
87 | II) Clear-on-write (COW) | ||
88 | i) you clear the status by writing a 1 in the bit-location you want. | ||
89 | These are the majority of the NICs and work the best with NAPI. | ||
90 | Put only receive events in dev->poll(); leave the rest in | ||
91 | the old interrupt handler. | ||
92 | ii) whatever you write in the status register clears every thing ;-> | ||
93 | Cant seem to find any supported by Linux which do this. If | ||
94 | someone knows such a chip email us please. | ||
95 | Move all to dev->poll() | ||
96 | |||
97 | C) Ability to detect new work correctly. | ||
98 | NAPI works by shutting down event interrupts when theres work and | ||
99 | turning them on when theres none. | ||
100 | New packets might show up in the small window while interrupts were being | ||
101 | re-enabled (refer to appendix 2). A packet might sneak in during the period | ||
102 | we are enabling interrupts. We only get to know about such a packet when the | ||
103 | next new packet arrives and generates an interrupt. | ||
104 | Essentially, there is a small window of opportunity for a race condition | ||
105 | which for clarity we'll refer to as the "rotting packet". | ||
106 | |||
107 | This is a very important topic and appendix 2 is dedicated for more | ||
108 | discussion. | ||
109 | |||
110 | Locking rules and environmental guarantees | ||
111 | ========================================== | ||
112 | |||
113 | -Guarantee: Only one CPU at any time can call dev->poll(); this is because | ||
114 | only one CPU can pick the initial interrupt and hence the initial | ||
115 | netif_rx_schedule(dev); | ||
116 | - The core layer invokes devices to send packets in a round robin format. | ||
117 | This implies receive is totaly lockless because of the guarantee only that | ||
118 | one CPU is executing it. | ||
119 | - contention can only be the result of some other CPU accessing the rx | ||
120 | ring. This happens only in close() and suspend() (when these methods | ||
121 | try to clean the rx ring); | ||
122 | ****guarantee: driver authors need not worry about this; synchronization | ||
123 | is taken care for them by the top net layer. | ||
124 | -local interrupts are enabled (if you dont move all to dev->poll()). For | ||
125 | example link/MII and txcomplete continue functioning just same old way. | ||
126 | This improves the latency of processing these events. It is also assumed that | ||
127 | the receive interrupt is the largest cause of noise. Note this might not | ||
128 | always be true. | ||
129 | [according to Manfred Spraul, the winbond insists on sending one | ||
130 | txmitcomplete interrupt for each packet (although this can be mitigated)]. | ||
131 | For these broken drivers, move all to dev->poll(). | ||
132 | |||
133 | For the rest of this text, we'll assume that dev->poll() only | ||
134 | processes receive events. | ||
135 | |||
136 | new methods introduce by NAPI | ||
137 | ============================= | ||
138 | |||
139 | a) netif_rx_schedule(dev) | ||
140 | Called by an IRQ handler to schedule a poll for device | ||
141 | |||
142 | b) netif_rx_schedule_prep(dev) | ||
143 | puts the device in a state which allows for it to be added to the | ||
144 | CPU polling list if it is up and running. You can look at this as | ||
145 | the first half of netif_rx_schedule(dev) above; the second half | ||
146 | being c) below. | ||
147 | |||
148 | c) __netif_rx_schedule(dev) | ||
149 | Add device to the poll list for this CPU; assuming that _prep above | ||
150 | has already been called and returned 1. | ||
151 | |||
152 | d) netif_rx_reschedule(dev, undo) | ||
153 | Called to reschedule polling for device specifically for some | ||
154 | deficient hardware. Read Appendix 2 for more details. | ||
155 | |||
156 | e) netif_rx_complete(dev) | ||
157 | |||
158 | Remove interface from the CPU poll list: it must be in the poll list | ||
159 | on current cpu. This primitive is called by dev->poll(), when | ||
160 | it completes its work. The device cannot be out of poll list at this | ||
161 | call, if it is then clearly it is a BUG(). You'll know ;-> | ||
162 | |||
163 | All these above nethods are used below. So keep reading for clarity. | ||
164 | |||
165 | Device driver changes to be made when porting NAPI | ||
166 | ================================================== | ||
167 | |||
168 | Below we describe what kind of changes are required for NAPI to work. | ||
169 | |||
170 | 1) introduction of dev->poll() method | ||
171 | ===================================== | ||
172 | |||
173 | This is the method that is invoked by the network core when it requests | ||
174 | for new packets from the driver. A driver is allowed to send upto | ||
175 | dev->quota packets by the current CPU before yielding to the network | ||
176 | subsystem (so other devices can also get opportunity to send to the stack). | ||
177 | |||
178 | dev->poll() prototype looks as follows: | ||
179 | int my_poll(struct net_device *dev, int *budget) | ||
180 | |||
181 | budget is the remaining number of packets the network subsystem on the | ||
182 | current CPU can send up the stack before yielding to other system tasks. | ||
183 | *Each driver is responsible for decrementing budget by the total number of | ||
184 | packets sent. | ||
185 | Total number of packets cannot exceed dev->quota. | ||
186 | |||
187 | dev->poll() method is invoked by the top layer, the driver just sends if it | ||
188 | can to the stack the packet quantity requested. | ||
189 | |||
190 | more on dev->poll() below after the interrupt changes are explained. | ||
191 | |||
192 | 2) registering dev->poll() method | ||
193 | =================================== | ||
194 | |||
195 | dev->poll should be set in the dev->probe() method. | ||
196 | e.g: | ||
197 | dev->open = my_open; | ||
198 | . | ||
199 | . | ||
200 | /* two new additions */ | ||
201 | /* first register my poll method */ | ||
202 | dev->poll = my_poll; | ||
203 | /* next register my weight/quanta; can be overridden in /proc */ | ||
204 | dev->weight = 16; | ||
205 | . | ||
206 | . | ||
207 | dev->stop = my_close; | ||
208 | |||
209 | |||
210 | |||
211 | 3) scheduling dev->poll() | ||
212 | ============================= | ||
213 | This involves modifying the interrupt handler and the code | ||
214 | path which takes the packet off the NIC and sends them to the | ||
215 | stack. | ||
216 | |||
217 | it's important at this point to introduce the classical D Becker | ||
218 | interrupt processor: | ||
219 | |||
220 | ------------------ | ||
221 | static irqreturn_t | ||
222 | netdevice_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
223 | { | ||
224 | |||
225 | struct net_device *dev = (struct net_device *)dev_instance; | ||
226 | struct my_private *tp = (struct my_private *)dev->priv; | ||
227 | |||
228 | int work_count = my_work_count; | ||
229 | status = read_interrupt_status_reg(); | ||
230 | if (status == 0) | ||
231 | return IRQ_NONE; /* Shared IRQ: not us */ | ||
232 | if (status == 0xffff) | ||
233 | return IRQ_HANDLED; /* Hot unplug */ | ||
234 | if (status & error) | ||
235 | do_some_error_handling() | ||
236 | |||
237 | do { | ||
238 | acknowledge_ints_ASAP(); | ||
239 | |||
240 | if (status & link_interrupt) { | ||
241 | spin_lock(&tp->link_lock); | ||
242 | do_some_link_stat_stuff(); | ||
243 | spin_lock(&tp->link_lock); | ||
244 | } | ||
245 | |||
246 | if (status & rx_interrupt) { | ||
247 | receive_packets(dev); | ||
248 | } | ||
249 | |||
250 | if (status & rx_nobufs) { | ||
251 | make_rx_buffs_avail(); | ||
252 | } | ||
253 | |||
254 | if (status & tx_related) { | ||
255 | spin_lock(&tp->lock); | ||
256 | tx_ring_free(dev); | ||
257 | if (tx_died) | ||
258 | restart_tx(); | ||
259 | spin_unlock(&tp->lock); | ||
260 | } | ||
261 | |||
262 | status = read_interrupt_status_reg(); | ||
263 | |||
264 | } while (!(status & error) || more_work_to_be_done); | ||
265 | return IRQ_HANDLED; | ||
266 | } | ||
267 | |||
268 | ---------------------------------------------------------------------- | ||
269 | |||
270 | We now change this to what is shown below to NAPI-enable it: | ||
271 | |||
272 | ---------------------------------------------------------------------- | ||
273 | static irqreturn_t | ||
274 | netdevice_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
275 | { | ||
276 | struct net_device *dev = (struct net_device *)dev_instance; | ||
277 | struct my_private *tp = (struct my_private *)dev->priv; | ||
278 | |||
279 | status = read_interrupt_status_reg(); | ||
280 | if (status == 0) | ||
281 | return IRQ_NONE; /* Shared IRQ: not us */ | ||
282 | if (status == 0xffff) | ||
283 | return IRQ_HANDLED; /* Hot unplug */ | ||
284 | if (status & error) | ||
285 | do_some_error_handling(); | ||
286 | |||
287 | do { | ||
288 | /************************ start note *********************************/ | ||
289 | acknowledge_ints_ASAP(); // dont ack rx and rxnobuff here | ||
290 | /************************ end note *********************************/ | ||
291 | |||
292 | if (status & link_interrupt) { | ||
293 | spin_lock(&tp->link_lock); | ||
294 | do_some_link_stat_stuff(); | ||
295 | spin_unlock(&tp->link_lock); | ||
296 | } | ||
297 | /************************ start note *********************************/ | ||
298 | if (status & rx_interrupt || (status & rx_nobuffs)) { | ||
299 | if (netif_rx_schedule_prep(dev)) { | ||
300 | |||
301 | /* disable interrupts caused | ||
302 | * by arriving packets */ | ||
303 | disable_rx_and_rxnobuff_ints(); | ||
304 | /* tell system we have work to be done. */ | ||
305 | __netif_rx_schedule(dev); | ||
306 | } else { | ||
307 | printk("driver bug! interrupt while in poll\n"); | ||
308 | /* FIX by disabling interrupts */ | ||
309 | disable_rx_and_rxnobuff_ints(); | ||
310 | } | ||
311 | } | ||
312 | /************************ end note note *********************************/ | ||
313 | |||
314 | if (status & tx_related) { | ||
315 | spin_lock(&tp->lock); | ||
316 | tx_ring_free(dev); | ||
317 | |||
318 | if (tx_died) | ||
319 | restart_tx(); | ||
320 | spin_unlock(&tp->lock); | ||
321 | } | ||
322 | |||
323 | status = read_interrupt_status_reg(); | ||
324 | |||
325 | /************************ start note *********************************/ | ||
326 | } while (!(status & error) || more_work_to_be_done(status)); | ||
327 | /************************ end note note *********************************/ | ||
328 | return IRQ_HANDLED; | ||
329 | } | ||
330 | |||
331 | --------------------------------------------------------------------- | ||
332 | |||
333 | |||
334 | We note several things from above: | ||
335 | |||
336 | I) Any interrupt source which is caused by arriving packets is now | ||
337 | turned off when it occurs. Depending on the hardware, there could be | ||
338 | several reasons that arriving packets would cause interrupts; these are the | ||
339 | interrupt sources we wish to avoid. The two common ones are a) a packet | ||
340 | arriving (rxint) b) a packet arriving and finding no DMA buffers available | ||
341 | (rxnobuff) . | ||
342 | This means also acknowledge_ints_ASAP() will not clear the status | ||
343 | register for those two items above; clearing is done in the place where | ||
344 | proper work is done within NAPI; at the poll() and refill_rx_ring() | ||
345 | discussed further below. | ||
346 | netif_rx_schedule_prep() returns 1 if device is in running state and | ||
347 | gets successfully added to the core poll list. If we get a zero value | ||
348 | we can _almost_ assume are already added to the list (instead of not running. | ||
349 | Logic based on the fact that you shouldn't get interrupt if not running) | ||
350 | We rectify this by disabling rx and rxnobuf interrupts. | ||
351 | |||
352 | II) that receive_packets(dev) and make_rx_buffs_avail() may have disappeared. | ||
353 | These functionalities are still around actually...... | ||
354 | |||
355 | infact, receive_packets(dev) is very close to my_poll() and | ||
356 | make_rx_buffs_avail() is invoked from my_poll() | ||
357 | |||
358 | 4) converting receive_packets() to dev->poll() | ||
359 | =============================================== | ||
360 | |||
361 | We need to convert the classical D Becker receive_packets(dev) to my_poll() | ||
362 | |||
363 | First the typical receive_packets() below: | ||
364 | ------------------------------------------------------------------- | ||
365 | |||
366 | /* this is called by interrupt handler */ | ||
367 | static void receive_packets (struct net_device *dev) | ||
368 | { | ||
369 | |||
370 | struct my_private *tp = (struct my_private *)dev->priv; | ||
371 | rx_ring = tp->rx_ring; | ||
372 | cur_rx = tp->cur_rx; | ||
373 | int entry = cur_rx % RX_RING_SIZE; | ||
374 | int received = 0; | ||
375 | int rx_work_limit = tp->dirty_rx + RX_RING_SIZE - tp->cur_rx; | ||
376 | |||
377 | while (rx_ring_not_empty) { | ||
378 | u32 rx_status; | ||
379 | unsigned int rx_size; | ||
380 | unsigned int pkt_size; | ||
381 | struct sk_buff *skb; | ||
382 | /* read size+status of next frame from DMA ring buffer */ | ||
383 | /* the number 16 and 4 are just examples */ | ||
384 | rx_status = le32_to_cpu (*(u32 *) (rx_ring + ring_offset)); | ||
385 | rx_size = rx_status >> 16; | ||
386 | pkt_size = rx_size - 4; | ||
387 | |||
388 | /* process errors */ | ||
389 | if ((rx_size > (MAX_ETH_FRAME_SIZE+4)) || | ||
390 | (!(rx_status & RxStatusOK))) { | ||
391 | netdrv_rx_err (rx_status, dev, tp, ioaddr); | ||
392 | return; | ||
393 | } | ||
394 | |||
395 | if (--rx_work_limit < 0) | ||
396 | break; | ||
397 | |||
398 | /* grab a skb */ | ||
399 | skb = dev_alloc_skb (pkt_size + 2); | ||
400 | if (skb) { | ||
401 | . | ||
402 | . | ||
403 | netif_rx (skb); | ||
404 | . | ||
405 | . | ||
406 | } else { /* OOM */ | ||
407 | /*seems very driver specific ... some just pass | ||
408 | whatever is on the ring already. */ | ||
409 | } | ||
410 | |||
411 | /* move to the next skb on the ring */ | ||
412 | entry = (++tp->cur_rx) % RX_RING_SIZE; | ||
413 | received++ ; | ||
414 | |||
415 | } | ||
416 | |||
417 | /* store current ring pointer state */ | ||
418 | tp->cur_rx = cur_rx; | ||
419 | |||
420 | /* Refill the Rx ring buffers if they are needed */ | ||
421 | refill_rx_ring(); | ||
422 | . | ||
423 | . | ||
424 | |||
425 | } | ||
426 | ------------------------------------------------------------------- | ||
427 | We change it to a new one below; note the additional parameter in | ||
428 | the call. | ||
429 | |||
430 | ------------------------------------------------------------------- | ||
431 | |||
432 | /* this is called by the network core */ | ||
433 | static int my_poll (struct net_device *dev, int *budget) | ||
434 | { | ||
435 | |||
436 | struct my_private *tp = (struct my_private *)dev->priv; | ||
437 | rx_ring = tp->rx_ring; | ||
438 | cur_rx = tp->cur_rx; | ||
439 | int entry = cur_rx % RX_BUF_LEN; | ||
440 | /* maximum packets to send to the stack */ | ||
441 | /************************ note note *********************************/ | ||
442 | int rx_work_limit = dev->quota; | ||
443 | |||
444 | /************************ end note note *********************************/ | ||
445 | do { // outer beginning loop starts here | ||
446 | |||
447 | clear_rx_status_register_bit(); | ||
448 | |||
449 | while (rx_ring_not_empty) { | ||
450 | u32 rx_status; | ||
451 | unsigned int rx_size; | ||
452 | unsigned int pkt_size; | ||
453 | struct sk_buff *skb; | ||
454 | /* read size+status of next frame from DMA ring buffer */ | ||
455 | /* the number 16 and 4 are just examples */ | ||
456 | rx_status = le32_to_cpu (*(u32 *) (rx_ring + ring_offset)); | ||
457 | rx_size = rx_status >> 16; | ||
458 | pkt_size = rx_size - 4; | ||
459 | |||
460 | /* process errors */ | ||
461 | if ((rx_size > (MAX_ETH_FRAME_SIZE+4)) || | ||
462 | (!(rx_status & RxStatusOK))) { | ||
463 | netdrv_rx_err (rx_status, dev, tp, ioaddr); | ||
464 | return 1; | ||
465 | } | ||
466 | |||
467 | /************************ note note *********************************/ | ||
468 | if (--rx_work_limit < 0) { /* we got packets, but no quota */ | ||
469 | /* store current ring pointer state */ | ||
470 | tp->cur_rx = cur_rx; | ||
471 | |||
472 | /* Refill the Rx ring buffers if they are needed */ | ||
473 | refill_rx_ring(dev); | ||
474 | goto not_done; | ||
475 | } | ||
476 | /********************** end note **********************************/ | ||
477 | |||
478 | /* grab a skb */ | ||
479 | skb = dev_alloc_skb (pkt_size + 2); | ||
480 | if (skb) { | ||
481 | . | ||
482 | . | ||
483 | /************************ note note *********************************/ | ||
484 | netif_receive_skb (skb); | ||
485 | /********************** end note **********************************/ | ||
486 | . | ||
487 | . | ||
488 | } else { /* OOM */ | ||
489 | /*seems very driver specific ... common is just pass | ||
490 | whatever is on the ring already. */ | ||
491 | } | ||
492 | |||
493 | /* move to the next skb on the ring */ | ||
494 | entry = (++tp->cur_rx) % RX_RING_SIZE; | ||
495 | received++ ; | ||
496 | |||
497 | } | ||
498 | |||
499 | /* store current ring pointer state */ | ||
500 | tp->cur_rx = cur_rx; | ||
501 | |||
502 | /* Refill the Rx ring buffers if they are needed */ | ||
503 | refill_rx_ring(dev); | ||
504 | |||
505 | /* no packets on ring; but new ones can arrive since we last | ||
506 | checked */ | ||
507 | status = read_interrupt_status_reg(); | ||
508 | if (rx status is not set) { | ||
509 | /* If something arrives in this narrow window, | ||
510 | an interrupt will be generated */ | ||
511 | goto done; | ||
512 | } | ||
513 | /* done! at least thats what it looks like ;-> | ||
514 | if new packets came in after our last check on status bits | ||
515 | they'll be caught by the while check and we go back and clear them | ||
516 | since we havent exceeded our quota */ | ||
517 | } while (rx_status_is_set); | ||
518 | |||
519 | done: | ||
520 | |||
521 | /************************ note note *********************************/ | ||
522 | dev->quota -= received; | ||
523 | *budget -= received; | ||
524 | |||
525 | /* If RX ring is not full we are out of memory. */ | ||
526 | if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) | ||
527 | goto oom; | ||
528 | |||
529 | /* we are happy/done, no more packets on ring; put us back | ||
530 | to where we can start processing interrupts again */ | ||
531 | netif_rx_complete(dev); | ||
532 | enable_rx_and_rxnobuf_ints(); | ||
533 | |||
534 | /* The last op happens after poll completion. Which means the following: | ||
535 | * 1. it can race with disabling irqs in irq handler (which are done to | ||
536 | * schedule polls) | ||
537 | * 2. it can race with dis/enabling irqs in other poll threads | ||
538 | * 3. if an irq raised after the begining of the outer beginning | ||
539 | * loop(marked in the code above), it will be immediately | ||
540 | * triggered here. | ||
541 | * | ||
542 | * Summarizing: the logic may results in some redundant irqs both | ||
543 | * due to races in masking and due to too late acking of already | ||
544 | * processed irqs. The good news: no events are ever lost. | ||
545 | */ | ||
546 | |||
547 | return 0; /* done */ | ||
548 | |||
549 | not_done: | ||
550 | if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/2 || | ||
551 | tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) | ||
552 | refill_rx_ring(dev); | ||
553 | |||
554 | if (!received) { | ||
555 | printk("received==0\n"); | ||
556 | received = 1; | ||
557 | } | ||
558 | dev->quota -= received; | ||
559 | *budget -= received; | ||
560 | return 1; /* not_done */ | ||
561 | |||
562 | oom: | ||
563 | /* Start timer, stop polling, but do not enable rx interrupts. */ | ||
564 | start_poll_timer(dev); | ||
565 | return 0; /* we'll take it from here so tell core "done"*/ | ||
566 | |||
567 | /************************ End note note *********************************/ | ||
568 | } | ||
569 | ------------------------------------------------------------------- | ||
570 | |||
571 | From above we note that: | ||
572 | 0) rx_work_limit = dev->quota | ||
573 | 1) refill_rx_ring() is in charge of clearing the bit for rxnobuff when | ||
574 | it does the work. | ||
575 | 2) We have a done and not_done state. | ||
576 | 3) instead of netif_rx() we call netif_receive_skb() to pass the skb. | ||
577 | 4) we have a new way of handling oom condition | ||
578 | 5) A new outer for (;;) loop has been added. This serves the purpose of | ||
579 | ensuring that if a new packet has come in, after we are all set and done, | ||
580 | and we have not exceeded our quota that we continue sending packets up. | ||
581 | |||
582 | |||
583 | ----------------------------------------------------------- | ||
584 | Poll timer code will need to do the following: | ||
585 | |||
586 | a) | ||
587 | |||
588 | if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/2 || | ||
589 | tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) | ||
590 | refill_rx_ring(dev); | ||
591 | |||
592 | /* If RX ring is not full we are still out of memory. | ||
593 | Restart the timer again. Else we re-add ourselves | ||
594 | to the master poll list. | ||
595 | */ | ||
596 | |||
597 | if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) | ||
598 | restart_timer(); | ||
599 | |||
600 | else netif_rx_schedule(dev); /* we are back on the poll list */ | ||
601 | |||
602 | 5) dev->close() and dev->suspend() issues | ||
603 | ========================================== | ||
604 | The driver writter neednt worry about this. The top net layer takes | ||
605 | care of it. | ||
606 | |||
607 | 6) Adding new Stats to /proc | ||
608 | ============================= | ||
609 | In order to debug some of the new features, we introduce new stats | ||
610 | that need to be collected. | ||
611 | TODO: Fill this later. | ||
612 | |||
613 | APPENDIX 1: discussion on using ethernet HW FC | ||
614 | ============================================== | ||
615 | Most chips with FC only send a pause packet when they run out of Rx buffers. | ||
616 | Since packets are pulled off the DMA ring by a softirq in NAPI, | ||
617 | if the system is slow in grabbing them and we have a high input | ||
618 | rate (faster than the system's capacity to remove packets), then theoretically | ||
619 | there will only be one rx interrupt for all packets during a given packetstorm. | ||
620 | Under low load, we might have a single interrupt per packet. | ||
621 | FC should be programmed to apply in the case when the system cant pull out | ||
622 | packets fast enough i.e send a pause only when you run out of rx buffers. | ||
623 | Note FC in itself is a good solution but we have found it to not be | ||
624 | much of a commodity feature (both in NICs and switches) and hence falls | ||
625 | under the same category as using NIC based mitigation. Also experiments | ||
626 | indicate that its much harder to resolve the resource allocation | ||
627 | issue (aka lazy receiving that NAPI offers) and hence quantify its usefullness | ||
628 | proved harder. In any case, FC works even better with NAPI but is not | ||
629 | necessary. | ||
630 | |||
631 | |||
632 | APPENDIX 2: the "rotting packet" race-window avoidance scheme | ||
633 | ============================================================= | ||
634 | |||
635 | There are two types of associations seen here | ||
636 | |||
637 | 1) status/int which honors level triggered IRQ | ||
638 | |||
639 | If a status bit for receive or rxnobuff is set and the corresponding | ||
640 | interrupt-enable bit is not on, then no interrupts will be generated. However, | ||
641 | as soon as the "interrupt-enable" bit is unmasked, an immediate interrupt is | ||
642 | generated. [assuming the status bit was not turned off]. | ||
643 | Generally the concept of level triggered IRQs in association with a status and | ||
644 | interrupt-enable CSR register set is used to avoid the race. | ||
645 | |||
646 | If we take the example of the tulip: | ||
647 | "pending work" is indicated by the status bit(CSR5 in tulip). | ||
648 | the corresponding interrupt bit (CSR7 in tulip) might be turned off (but | ||
649 | the CSR5 will continue to be turned on with new packet arrivals even if | ||
650 | we clear it the first time) | ||
651 | Very important is the fact that if we turn on the interrupt bit on when | ||
652 | status is set that an immediate irq is triggered. | ||
653 | |||
654 | If we cleared the rx ring and proclaimed there was "no more work | ||
655 | to be done" and then went on to do a few other things; then when we enable | ||
656 | interrupts, there is a possibility that a new packet might sneak in during | ||
657 | this phase. It helps to look at the pseudo code for the tulip poll | ||
658 | routine: | ||
659 | |||
660 | -------------------------- | ||
661 | do { | ||
662 | ACK; | ||
663 | while (ring_is_not_empty()) { | ||
664 | work-work-work | ||
665 | if quota is exceeded: exit, no touching irq status/mask | ||
666 | } | ||
667 | /* No packets, but new can arrive while we are doing this*/ | ||
668 | CSR5 := read | ||
669 | if (CSR5 is not set) { | ||
670 | /* If something arrives in this narrow window here, | ||
671 | * where the comments are ;-> irq will be generated */ | ||
672 | unmask irqs; | ||
673 | exit poll; | ||
674 | } | ||
675 | } while (rx_status_is_set); | ||
676 | ------------------------ | ||
677 | |||
678 | CSR5 bit of interest is only the rx status. | ||
679 | If you look at the last if statement: | ||
680 | you just finished grabbing all the packets from the rx ring .. you check if | ||
681 | status bit says theres more packets just in ... it says none; you then | ||
682 | enable rx interrupts again; if a new packet just came in during this check, | ||
683 | we are counting that CSR5 will be set in that small window of opportunity | ||
684 | and that by re-enabling interrupts, we would actually triger an interrupt | ||
685 | to register the new packet for processing. | ||
686 | |||
687 | [The above description nay be very verbose, if you have better wording | ||
688 | that will make this more understandable, please suggest it.] | ||
689 | |||
690 | 2) non-capable hardware | ||
691 | |||
692 | These do not generally respect level triggered IRQs. Normally, | ||
693 | irqs may be lost while being masked and the only way to leave poll is to do | ||
694 | a double check for new input after netif_rx_complete() is invoked | ||
695 | and re-enable polling (after seeing this new input). | ||
696 | |||
697 | Sample code: | ||
698 | |||
699 | --------- | ||
700 | . | ||
701 | . | ||
702 | restart_poll: | ||
703 | while (ring_is_not_empty()) { | ||
704 | work-work-work | ||
705 | if quota is exceeded: exit, not touching irq status/mask | ||
706 | } | ||
707 | . | ||
708 | . | ||
709 | . | ||
710 | enable_rx_interrupts() | ||
711 | netif_rx_complete(dev); | ||
712 | if (ring_has_new_packet() && netif_rx_reschedule(dev, received)) { | ||
713 | disable_rx_and_rxnobufs() | ||
714 | goto restart_poll | ||
715 | } while (rx_status_is_set); | ||
716 | --------- | ||
717 | |||
718 | Basically netif_rx_complete() removes us from the poll list, but because a | ||
719 | new packet which will never be caught due to the possibility of a race | ||
720 | might come in, we attempt to re-add ourselves to the poll list. | ||
721 | |||
722 | |||
723 | |||
724 | |||
725 | APPENDIX 3: Scheduling issues. | ||
726 | ============================== | ||
727 | As seen NAPI moves processing to softirq level. Linux uses the ksoftirqd as the | ||
728 | general solution to schedule softirq's to run before next interrupt and by putting | ||
729 | them under scheduler control. Also this prevents consecutive softirq's from | ||
730 | monopolize the CPU. This also have the effect that the priority of ksoftirq needs | ||
731 | to be considered when running very CPU-intensive applications and networking to | ||
732 | get the proper balance of softirq/user balance. Increasing ksoftirq priority to 0 | ||
733 | (eventually more) is reported cure problems with low network performance at high | ||
734 | CPU load. | ||
735 | |||
736 | Most used processes in a GIGE router: | ||
737 | USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND | ||
738 | root 3 0.2 0.0 0 0 ? RWN Aug 15 602:00 (ksoftirqd_CPU0) | ||
739 | root 232 0.0 7.9 41400 40884 ? S Aug 15 74:12 gated | ||
740 | |||
741 | -------------------------------------------------------------------- | ||
742 | |||
743 | relevant sites: | ||
744 | ================== | ||
745 | ftp://robur.slu.se/pub/Linux/net-development/NAPI/ | ||
746 | |||
747 | |||
748 | -------------------------------------------------------------------- | ||
749 | TODO: Write net-skeleton.c driver. | ||
750 | ------------------------------------------------------------- | ||
751 | |||
752 | Authors: | ||
753 | ======== | ||
754 | Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | ||
755 | Jamal Hadi Salim <hadi@cyberus.ca> | ||
756 | Robert Olsson <Robert.Olsson@data.slu.se> | ||
757 | |||
758 | Acknowledgements: | ||
759 | ================ | ||
760 | People who made this document better: | ||
761 | |||
762 | Lennert Buytenhek <buytenh@gnu.org> | ||
763 | Andrew Morton <akpm@zip.com.au> | ||
764 | Manfred Spraul <manfred@colorfullife.com> | ||
765 | Donald Becker <becker@scyld.com> | ||
766 | Jeff Garzik <jgarzik@pobox.com> | ||
diff --git a/Documentation/networking/PLIP.txt b/Documentation/networking/PLIP.txt new file mode 100644 index 000000000000..ad7e3f7c3bbf --- /dev/null +++ b/Documentation/networking/PLIP.txt | |||
@@ -0,0 +1,215 @@ | |||
1 | PLIP: The Parallel Line Internet Protocol Device | ||
2 | |||
3 | Donald Becker (becker@super.org) | ||
4 | I.D.A. Supercomputing Research Center, Bowie MD 20715 | ||
5 | |||
6 | At some point T. Thorn will probably contribute text, | ||
7 | Tommy Thorn (tthorn@daimi.aau.dk) | ||
8 | |||
9 | PLIP Introduction | ||
10 | ----------------- | ||
11 | |||
12 | This document describes the parallel port packet pusher for Net/LGX. | ||
13 | This device interface allows a point-to-point connection between two | ||
14 | parallel ports to appear as a IP network interface. | ||
15 | |||
16 | What is PLIP? | ||
17 | ============= | ||
18 | |||
19 | PLIP is Parallel Line IP, that is, the transportation of IP packages | ||
20 | over a parallel port. In the case of a PC, the obvious choice is the | ||
21 | printer port. PLIP is a non-standard, but [can use] uses the standard | ||
22 | LapLink null-printer cable [can also work in turbo mode, with a PLIP | ||
23 | cable]. [The protocol used to pack IP packages, is a simple one | ||
24 | initiated by Crynwr.] | ||
25 | |||
26 | Advantages of PLIP | ||
27 | ================== | ||
28 | |||
29 | It's cheap, it's available everywhere, and it's easy. | ||
30 | |||
31 | The PLIP cable is all that's needed to connect two Linux boxes, and it | ||
32 | can be built for very few bucks. | ||
33 | |||
34 | Connecting two Linux boxes takes only a second's decision and a few | ||
35 | minutes' work, no need to search for a [supported] netcard. This might | ||
36 | even be especially important in the case of notebooks, where netcards | ||
37 | are not easily available. | ||
38 | |||
39 | Not requiring a netcard also means that apart from connecting the | ||
40 | cables, everything else is software configuration [which in principle | ||
41 | could be made very easy.] | ||
42 | |||
43 | Disadvantages of PLIP | ||
44 | ===================== | ||
45 | |||
46 | Doesn't work over a modem, like SLIP and PPP. Limited range, 15 m. | ||
47 | Can only be used to connect three (?) Linux boxes. Doesn't connect to | ||
48 | an existing Ethernet. Isn't standard (not even de facto standard, like | ||
49 | SLIP). | ||
50 | |||
51 | Performance | ||
52 | =========== | ||
53 | |||
54 | PLIP easily outperforms Ethernet cards....(ups, I was dreaming, but | ||
55 | it *is* getting late. EOB) | ||
56 | |||
57 | PLIP driver details | ||
58 | ------------------- | ||
59 | |||
60 | The Linux PLIP driver is an implementation of the original Crynwr protocol, | ||
61 | that uses the parallel port subsystem of the kernel in order to properly | ||
62 | share parallel ports between PLIP and other services. | ||
63 | |||
64 | IRQs and trigger timeouts | ||
65 | ========================= | ||
66 | |||
67 | When a parallel port used for a PLIP driver has an IRQ configured to it, the | ||
68 | PLIP driver is signaled whenever data is sent to it via the cable, such that | ||
69 | when no data is available, the driver isn't being used. | ||
70 | |||
71 | However, on some machines it is hard, if not impossible, to configure an IRQ | ||
72 | to a certain parallel port, mainly because it is used by some other device. | ||
73 | On these machines, the PLIP driver can be used in IRQ-less mode, where | ||
74 | the PLIP driver would constantly poll the parallel port for data waiting, | ||
75 | and if such data is available, process it. This mode is less efficient than | ||
76 | the IRQ mode, because the driver has to check the parallel port many times | ||
77 | per second, even when no data at all is sent. Some rough measurements | ||
78 | indicate that there isn't a noticeable performance drop when using IRQ-less | ||
79 | mode as compared to IRQ mode as far as the data transfer speed is involved. | ||
80 | There is a performance drop on the machine hosting the driver. | ||
81 | |||
82 | When the PLIP driver is used in IRQ mode, the timeout used for triggering a | ||
83 | data transfer (the maximal time the PLIP driver would allow the other side | ||
84 | before announcing a timeout, when trying to handshake a transfer of some | ||
85 | data) is, by default, 500usec. As IRQ delivery is more or less immediate, | ||
86 | this timeout is quite sufficient. | ||
87 | |||
88 | When in IRQ-less mode, the PLIP driver polls the parallel port HZ times | ||
89 | per second (where HZ is typically 100 on most platforms, and 1024 on an | ||
90 | Alpha, as of this writing). Between two such polls, there are 10^6/HZ usecs. | ||
91 | On an i386, for example, 10^6/100 = 10000usec. It is easy to see that it is | ||
92 | quite possible for the trigger timeout to expire between two such polls, as | ||
93 | the timeout is only 500usec long. As a result, it is required to change the | ||
94 | trigger timeout on the *other* side of a PLIP connection, to about | ||
95 | 10^6/HZ usecs. If both sides of a PLIP connection are used in IRQ-less mode, | ||
96 | this timeout is required on both sides. | ||
97 | |||
98 | It appears that in practice, the trigger timeout can be shorter than in the | ||
99 | above calculation. It isn't an important issue, unless the wire is faulty, | ||
100 | in which case a long timeout would stall the machine when, for whatever | ||
101 | reason, bits are dropped. | ||
102 | |||
103 | A utility that can perform this change in Linux is plipconfig, which is part | ||
104 | of the net-tools package (its location can be found in the | ||
105 | Documentation/Changes file). An example command would be | ||
106 | 'plipconfig plipX trigger 10000', where plipX is the appropriate | ||
107 | PLIP device. | ||
108 | |||
109 | PLIP hardware interconnection | ||
110 | ----------------------------- | ||
111 | |||
112 | PLIP uses several different data transfer methods. The first (and the | ||
113 | only one implemented in the early version of the code) uses a standard | ||
114 | printer "null" cable to transfer data four bits at a time using | ||
115 | data bit outputs connected to status bit inputs. | ||
116 | |||
117 | The second data transfer method relies on both machines having | ||
118 | bi-directional parallel ports, rather than output-only ``printer'' | ||
119 | ports. This allows byte-wide transfers and avoids reconstructing | ||
120 | nibbles into bytes, leading to much faster transfers. | ||
121 | |||
122 | Parallel Transfer Mode 0 Cable | ||
123 | ============================== | ||
124 | |||
125 | The cable for the first transfer mode is a standard | ||
126 | printer "null" cable which transfers data four bits at a time using | ||
127 | data bit outputs of the first port (machine T) connected to the | ||
128 | status bit inputs of the second port (machine R). There are five | ||
129 | status inputs, and they are used as four data inputs and a clock (data | ||
130 | strobe) input, arranged so that the data input bits appear as contiguous | ||
131 | bits with standard status register implementation. | ||
132 | |||
133 | A cable that implements this protocol is available commercially as a | ||
134 | "Null Printer" or "Turbo Laplink" cable. It can be constructed with | ||
135 | two DB-25 male connectors symmetrically connected as follows: | ||
136 | |||
137 | STROBE output 1* | ||
138 | D0->ERROR 2 - 15 15 - 2 | ||
139 | D1->SLCT 3 - 13 13 - 3 | ||
140 | D2->PAPOUT 4 - 12 12 - 4 | ||
141 | D3->ACK 5 - 10 10 - 5 | ||
142 | D4->BUSY 6 - 11 11 - 6 | ||
143 | D5,D6,D7 are 7*, 8*, 9* | ||
144 | AUTOFD output 14* | ||
145 | INIT output 16* | ||
146 | SLCTIN 17 - 17 | ||
147 | extra grounds are 18*,19*,20*,21*,22*,23*,24* | ||
148 | GROUND 25 - 25 | ||
149 | * Do not connect these pins on either end | ||
150 | |||
151 | If the cable you are using has a metallic shield it should be | ||
152 | connected to the metallic DB-25 shell at one end only. | ||
153 | |||
154 | Parallel Transfer Mode 1 | ||
155 | ======================== | ||
156 | |||
157 | The second data transfer method relies on both machines having | ||
158 | bi-directional parallel ports, rather than output-only ``printer'' | ||
159 | ports. This allows byte-wide transfers, and avoids reconstructing | ||
160 | nibbles into bytes. This cable should not be used on unidirectional | ||
161 | ``printer'' (as opposed to ``parallel'') ports or when the machine | ||
162 | isn't configured for PLIP, as it will result in output driver | ||
163 | conflicts and the (unlikely) possibility of damage. | ||
164 | |||
165 | The cable for this transfer mode should be constructed as follows: | ||
166 | |||
167 | STROBE->BUSY 1 - 11 | ||
168 | D0->D0 2 - 2 | ||
169 | D1->D1 3 - 3 | ||
170 | D2->D2 4 - 4 | ||
171 | D3->D3 5 - 5 | ||
172 | D4->D4 6 - 6 | ||
173 | D5->D5 7 - 7 | ||
174 | D6->D6 8 - 8 | ||
175 | D7->D7 9 - 9 | ||
176 | INIT -> ACK 16 - 10 | ||
177 | AUTOFD->PAPOUT 14 - 12 | ||
178 | SLCT->SLCTIN 13 - 17 | ||
179 | GND->ERROR 18 - 15 | ||
180 | extra grounds are 19*,20*,21*,22*,23*,24* | ||
181 | GROUND 25 - 25 | ||
182 | * Do not connect these pins on either end | ||
183 | |||
184 | Once again, if the cable you are using has a metallic shield it should | ||
185 | be connected to the metallic DB-25 shell at one end only. | ||
186 | |||
187 | PLIP Mode 0 transfer protocol | ||
188 | ============================= | ||
189 | |||
190 | The PLIP driver is compatible with the "Crynwr" parallel port transfer | ||
191 | standard in Mode 0. That standard specifies the following protocol: | ||
192 | |||
193 | send header nibble '0x8' | ||
194 | count-low octet | ||
195 | count-high octet | ||
196 | ... data octets | ||
197 | checksum octet | ||
198 | |||
199 | Each octet is sent as | ||
200 | <wait for rx. '0x1?'> <send 0x10+(octet&0x0F)> | ||
201 | <wait for rx. '0x0?'> <send 0x00+((octet>>4)&0x0F)> | ||
202 | |||
203 | To start a transfer the transmitting machine outputs a nibble 0x08. | ||
204 | That raises the ACK line, triggering an interrupt in the receiving | ||
205 | machine. The receiving machine disables interrupts and raises its own ACK | ||
206 | line. | ||
207 | |||
208 | Restated: | ||
209 | |||
210 | (OUT is bit 0-4, OUT.j is bit j from OUT. IN likewise) | ||
211 | Send_Byte: | ||
212 | OUT := low nibble, OUT.4 := 1 | ||
213 | WAIT FOR IN.4 = 1 | ||
214 | OUT := high nibble, OUT.4 := 0 | ||
215 | WAIT FOR IN.4 = 0 | ||
diff --git a/Documentation/networking/README.sb1000 b/Documentation/networking/README.sb1000 new file mode 100644 index 000000000000..f82d42584e98 --- /dev/null +++ b/Documentation/networking/README.sb1000 | |||
@@ -0,0 +1,207 @@ | |||
1 | sb1000 is a module network device driver for the General Instrument (also known | ||
2 | as NextLevel) SURFboard1000 internal cable modem board. This is an ISA card | ||
3 | which is used by a number of cable TV companies to provide cable modem access. | ||
4 | It's a one-way downstream-only cable modem, meaning that your upstream net link | ||
5 | is provided by your regular phone modem. | ||
6 | |||
7 | This driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves | ||
8 | a great deal of thanks for this wonderful piece of code! | ||
9 | |||
10 | ----------------------------------------------------------------------------- | ||
11 | |||
12 | Support for this device is now a part of the standard Linux kernel. The | ||
13 | driver source code file is drivers/net/sb1000.c. In addition to this | ||
14 | you will need: | ||
15 | |||
16 | 1.) The "cmconfig" program. This is a utility which supplements "ifconfig" | ||
17 | to configure the cable modem and network interface (usually called "cm0"); | ||
18 | and | ||
19 | |||
20 | 2.) Several PPP scripts which live in /etc/ppp to make connecting via your | ||
21 | cable modem easy. | ||
22 | |||
23 | These utilities can be obtained from: | ||
24 | |||
25 | http://www.jacksonville.net/~fventuri/ | ||
26 | |||
27 | in Franco's original source code distribution .tar.gz file. Support for | ||
28 | the sb1000 driver can be found at: | ||
29 | |||
30 | http://home.adelphia.net/~siglercm/sb1000.html | ||
31 | http://linuxpower.cx/~cable/ | ||
32 | |||
33 | along with these utilities. | ||
34 | |||
35 | 3.) The standard isapnp tools. These are necessary to configure your SB1000 | ||
36 | card at boot time (or afterwards by hand) since it's a PnP card. | ||
37 | |||
38 | If you don't have these installed as a standard part of your Linux | ||
39 | distribution, you can find them at: | ||
40 | |||
41 | http://www.roestock.demon.co.uk/isapnptools/ | ||
42 | |||
43 | or check your Linux distribution binary CD or their web site. For help with | ||
44 | isapnp, pnpdump, or /etc/isapnp.conf, go to: | ||
45 | |||
46 | http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html | ||
47 | |||
48 | ----------------------------------------------------------------------------- | ||
49 | |||
50 | To make the SB1000 card work, follow these steps: | ||
51 | |||
52 | 1.) Run `make config', or `make menuconfig', or `make xconfig', whichever | ||
53 | you prefer, in the top kernel tree directory to set up your kernel | ||
54 | configuration. Make sure to say "Y" to "Prompt for development drivers" | ||
55 | and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard | ||
56 | networking questions to get TCP/IP and PPP networking support. | ||
57 | |||
58 | 2.) *BEFORE* you build the kernel, edit drivers/net/sb1000.c. Make sure | ||
59 | to redefine the value of READ_DATA_PORT to match the I/O address used | ||
60 | by isapnp to access your PnP cards. This is the value of READPORT in | ||
61 | /etc/isapnp.conf or given by the output of pnpdump. | ||
62 | |||
63 | 3.) Build and install the kernel and modules as usual. | ||
64 | |||
65 | 4.) Boot your new kernel following the usual procedures. | ||
66 | |||
67 | 5.) Set up to configure the new SB1000 PnP card by capturing the output | ||
68 | of "pnpdump" to a file and editing this file to set the correct I/O ports, | ||
69 | IRQ, and DMA settings for all your PnP cards. Make sure none of the settings | ||
70 | conflict with one another. Then test this configuration by running the | ||
71 | "isapnp" command with your new config file as the input. Check for | ||
72 | errors and fix as necessary. (As an aside, I use I/O ports 0x110 and | ||
73 | 0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.) | ||
74 | Then save the finished config file as /etc/isapnp.conf for proper configuration | ||
75 | on subsequent reboots. | ||
76 | |||
77 | 6.) Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of | ||
78 | the others referenced above. As root, unpack it into a temporary directory and | ||
79 | do a `make cmconfig' and then `install -c cmconfig /usr/local/sbin'. Don't do | ||
80 | `make install' because it expects to find all the utilities built and ready for | ||
81 | installation, not just cmconfig. | ||
82 | |||
83 | 7.) As root, copy all the files under the ppp/ subdirectory in Franco's | ||
84 | tar file into /etc/ppp, being careful not to overwrite any files that are | ||
85 | already in there. Then modify ppp@gi-on to set the correct login name, | ||
86 | phone number, and frequency for the cable modem. Also edit pap-secrets | ||
87 | to specify your login name and password and any site-specific information | ||
88 | you need. | ||
89 | |||
90 | 8.) Be sure to modify /etc/ppp/firewall to use ipchains instead of | ||
91 | the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to | ||
92 | convert ipfwadm commands to ipchains commands: | ||
93 | |||
94 | http://users.dhp.com/~whisper/ipfwadm2ipchains/ | ||
95 | |||
96 | You may also wish to modify the firewall script to implement a different | ||
97 | firewalling scheme. | ||
98 | |||
99 | 9.) Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be | ||
100 | root to do this. It's better to use a utility like sudo to execute | ||
101 | frequently used commands like this with root permissions if possible. If you | ||
102 | connect successfully the cable modem interface will come up and you'll see a | ||
103 | driver message like this at the console: | ||
104 | |||
105 | cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11. | ||
106 | sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net) | ||
107 | |||
108 | The "ifconfig" command should show two new interfaces, ppp0 and cm0. | ||
109 | The command "cmconfig cm0" will give you information about the cable modem | ||
110 | interface. | ||
111 | |||
112 | 10.) Try pinging a site via `ping -c 5 www.yahoo.com', for example. You should | ||
113 | see packets received. | ||
114 | |||
115 | 11.) If you can't get site names (like www.yahoo.com) to resolve into | ||
116 | IP addresses (like 204.71.200.67), be sure your /etc/resolv.conf file | ||
117 | has no syntax errors and has the right nameserver IP addresses in it. | ||
118 | If this doesn't help, try something like `ping -c 5 204.71.200.67' to | ||
119 | see if the networking is running but the DNS resolution is where the | ||
120 | problem lies. | ||
121 | |||
122 | 12.) If you still have problems, go to the support web sites mentioned above | ||
123 | and read the information and documentation there. | ||
124 | |||
125 | ----------------------------------------------------------------------------- | ||
126 | |||
127 | Common problems: | ||
128 | |||
129 | 1.) Packets go out on the ppp0 interface but don't come back on the cm0 | ||
130 | interface. It looks like I'm connected but I can't even ping any | ||
131 | numerical IP addresses. (This happens predominantly on Debian systems due | ||
132 | to a default boot-time configuration script.) | ||
133 | |||
134 | Solution -- As root `echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter' so it | ||
135 | can share the same IP address as the ppp0 interface. Note that this | ||
136 | command should probably be added to the /etc/ppp/cablemodem script | ||
137 | *right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands. | ||
138 | You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well. | ||
139 | If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot | ||
140 | (in rc.local or some such) then any interfaces can share the same IP | ||
141 | addresses. | ||
142 | |||
143 | 2.) I get "unresolved symbol" error messages on executing `insmod sb1000.o'. | ||
144 | |||
145 | Solution -- You probably have a non-matching kernel source tree and | ||
146 | /usr/include/linux and /usr/include/asm header files. Make sure you | ||
147 | install the correct versions of the header files in these two directories. | ||
148 | Then rebuild and reinstall the kernel. | ||
149 | |||
150 | 3.) When isapnp runs it reports an error, and my SB1000 card isn't working. | ||
151 | |||
152 | Solution -- There's a problem with later versions of isapnp using the "(CHECK)" | ||
153 | option in the lines that allocate the two I/O addresses for the SB1000 card. | ||
154 | This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses. | ||
155 | Make sure they don't conflict with any other pieces of hardware first! Then | ||
156 | rerun isapnp and go from there. | ||
157 | |||
158 | 4.) I can't execute the /etc/ppp/ppp@gi-on file. | ||
159 | |||
160 | Solution -- As root do `chmod ug+x /etc/ppp/ppp@gi-on'. | ||
161 | |||
162 | 5.) The firewall script isn't working (with 2.2.x and higher kernels). | ||
163 | |||
164 | Solution -- Use the ipfwadm2ipchains script referenced above to convert the | ||
165 | /etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains. | ||
166 | |||
167 | 6.) I'm getting *tons* of firewall deny messages in the /var/kern.log, | ||
168 | /var/messages, and/or /var/syslog files, and they're filling up my /var | ||
169 | partition!!! | ||
170 | |||
171 | Solution -- First, tell your ISP that you're receiving DoS (Denial of Service) | ||
172 | and/or portscanning (UDP connection attempts) attacks! Look over the deny | ||
173 | messages to figure out what the attack is and where it's coming from. Next, | ||
174 | edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on | ||
175 | to the "cmconfig" command (uncomment that line). If you're not receiving these | ||
176 | denied packets on your broadcast interface (IP address xxx.yyy.zzz.255 | ||
177 | typically), then someone is attacking your machine in particular. Be careful | ||
178 | out there.... | ||
179 | |||
180 | 7.) Everything seems to work fine but my computer locks up after a while | ||
181 | (and typically during a lengthy download through the cable modem)! | ||
182 | |||
183 | Solution -- You may need to add a short delay in the driver to 'slow down' the | ||
184 | SURFboard because your PC might not be able to keep up with the transfer rate | ||
185 | of the SB1000. To do this, it's probably best to download Franco's | ||
186 | sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll | ||
187 | want to edit the 'Makefile' and look for the 'SB1000_DELAY' | ||
188 | define. Uncomment those 'CFLAGS' lines (and comment out the default ones) | ||
189 | and try setting the delay to something like 60 microseconds with: | ||
190 | '-DSB1000_DELAY=60'. Then do `make' and as root `make install' and try | ||
191 | it out. If it still doesn't work or you like playing with the driver, you may | ||
192 | try other numbers. Remember though that the higher the delay, the slower the | ||
193 | driver (which slows down the rest of the PC too when it is actively | ||
194 | used). Thanks to Ed Daiga for this tip! | ||
195 | |||
196 | ----------------------------------------------------------------------------- | ||
197 | |||
198 | Credits: This README came from Franco Venturi's original README file which is | ||
199 | still supplied with his driver .tar.gz archive. I and all other sb1000 users | ||
200 | owe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten | ||
201 | and Ralph Bonnell who are now managing the Linux SB1000 web site, and to | ||
202 | the SB1000 users who reported and helped debug the common problems listed | ||
203 | above. | ||
204 | |||
205 | |||
206 | Clemmitt Sigler | ||
207 | csigler@vt.edu | ||
diff --git a/Documentation/networking/TODO b/Documentation/networking/TODO new file mode 100644 index 000000000000..66d36ff14bae --- /dev/null +++ b/Documentation/networking/TODO | |||
@@ -0,0 +1,18 @@ | |||
1 | To-do items for network drivers | ||
2 | ------------------------------- | ||
3 | |||
4 | * Move ethernet crc routine to generic code | ||
5 | |||
6 | * (for 2.5) Integrate Jamal Hadi Salim's netdev Rx polling API change | ||
7 | |||
8 | * Audit all net drivers to make sure magic packet / wake-on-lan / | ||
9 | similar features are disabled in the driver by default. | ||
10 | |||
11 | * Audit all net drivers to make sure the module always prints out a | ||
12 | version string when loaded as a module, but only prints a version | ||
13 | string when built into the kernel if a device is detected. | ||
14 | |||
15 | * Add ETHTOOL_GDRVINFO ioctl support to all ethernet drivers. | ||
16 | |||
17 | * dmfe PCI DMA is totally wrong and only works on x86 | ||
18 | |||
diff --git a/Documentation/networking/alias.txt b/Documentation/networking/alias.txt new file mode 100644 index 000000000000..cd12c2ff518a --- /dev/null +++ b/Documentation/networking/alias.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | |||
2 | IP-Aliasing: | ||
3 | ============ | ||
4 | |||
5 | IP-aliases are additional IP-addresses/masks hooked up to a base | ||
6 | interface by adding a colon and a string when running ifconfig. | ||
7 | This string is usually numeric, but this is not a must. | ||
8 | |||
9 | IP-Aliases are avail if CONFIG_INET (`standard' IPv4 networking) | ||
10 | is configured in the kernel. | ||
11 | |||
12 | |||
13 | o Alias creation. | ||
14 | Alias creation is done by 'magic' interface naming: eg. to create a | ||
15 | 200.1.1.1 alias for eth0 ... | ||
16 | |||
17 | # ifconfig eth0:0 200.1.1.1 etc,etc.... | ||
18 | ~~ -> request alias #0 creation (if not yet exists) for eth0 | ||
19 | |||
20 | The corresponding route is also set up by this command. | ||
21 | Please note: The route always points to the base interface. | ||
22 | |||
23 | |||
24 | o Alias deletion. | ||
25 | The alias is removed by shutting the alias down: | ||
26 | |||
27 | # ifconfig eth0:0 down | ||
28 | ~~~~~~~~~~ -> will delete alias | ||
29 | |||
30 | |||
31 | o Alias (re-)configuring | ||
32 | |||
33 | Aliases are not real devices, but programs should be able to configure and | ||
34 | refer to them as usual (ifconfig, route, etc). | ||
35 | |||
36 | |||
37 | o Relationship with main device | ||
38 | |||
39 | If the base device is shut down the added aliases will be deleted | ||
40 | too. | ||
41 | |||
42 | |||
43 | Contact | ||
44 | ------- | ||
45 | Please finger or e-mail me: | ||
46 | Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar> | ||
47 | |||
48 | Updated by Erik Schoenfelder <schoenfr@gaertner.DE> | ||
49 | |||
50 | ; local variables: | ||
51 | ; mode: indented-text | ||
52 | ; mode: auto-fill | ||
53 | ; end: | ||
diff --git a/Documentation/networking/arcnet-hardware.txt b/Documentation/networking/arcnet-hardware.txt new file mode 100644 index 000000000000..30a5f01403d3 --- /dev/null +++ b/Documentation/networking/arcnet-hardware.txt | |||
@@ -0,0 +1,3133 @@ | |||
1 | |||
2 | ----------------------------------------------------------------------------- | ||
3 | 1) This file is a supplement to arcnet.txt. Please read that for general | ||
4 | driver configuration help. | ||
5 | ----------------------------------------------------------------------------- | ||
6 | 2) This file is no longer Linux-specific. It should probably be moved out of | ||
7 | the kernel sources. Ideas? | ||
8 | ----------------------------------------------------------------------------- | ||
9 | |||
10 | Because so many people (myself included) seem to have obtained ARCnet cards | ||
11 | without manuals, this file contains a quick introduction to ARCnet hardware, | ||
12 | some cabling tips, and a listing of all jumper settings I can find. Please | ||
13 | e-mail apenwarr@worldvisions.ca with any settings for your particular card, | ||
14 | or any other information you have! | ||
15 | |||
16 | |||
17 | INTRODUCTION TO ARCNET | ||
18 | ---------------------- | ||
19 | |||
20 | ARCnet is a network type which works in a way similar to popular Ethernet | ||
21 | networks but which is also different in some very important ways. | ||
22 | |||
23 | First of all, you can get ARCnet cards in at least two speeds: 2.5 Mbps | ||
24 | (slower than Ethernet) and 100 Mbps (faster than normal Ethernet). In fact, | ||
25 | there are others as well, but these are less common. The different hardware | ||
26 | types, as far as I'm aware, are not compatible and so you cannot wire a | ||
27 | 100 Mbps card to a 2.5 Mbps card, and so on. From what I hear, my driver does | ||
28 | work with 100 Mbps cards, but I haven't been able to verify this myself, | ||
29 | since I only have the 2.5 Mbps variety. It is probably not going to saturate | ||
30 | your 100 Mbps card. Stop complaining. :) | ||
31 | |||
32 | You also cannot connect an ARCnet card to any kind of Ethernet card and | ||
33 | expect it to work. | ||
34 | |||
35 | There are two "types" of ARCnet - STAR topology and BUS topology. This | ||
36 | refers to how the cards are meant to be wired together. According to most | ||
37 | available documentation, you can only connect STAR cards to STAR cards and | ||
38 | BUS cards to BUS cards. That makes sense, right? Well, it's not quite | ||
39 | true; see below under "Cabling." | ||
40 | |||
41 | Once you get past these little stumbling blocks, ARCnet is actually quite a | ||
42 | well-designed standard. It uses something called "modified token passing" | ||
43 | which makes it completely incompatible with so-called "Token Ring" cards, | ||
44 | but which makes transfers much more reliable than Ethernet does. In fact, | ||
45 | ARCnet will guarantee that a packet arrives safely at the destination, and | ||
46 | even if it can't possibly be delivered properly (ie. because of a cable | ||
47 | break, or because the destination computer does not exist) it will at least | ||
48 | tell the sender about it. | ||
49 | |||
50 | Because of the carefully defined action of the "token", it will always make | ||
51 | a pass around the "ring" within a maximum length of time. This makes it | ||
52 | useful for realtime networks. | ||
53 | |||
54 | In addition, all known ARCnet cards have an (almost) identical programming | ||
55 | interface. This means that with one ARCnet driver you can support any | ||
56 | card, whereas with Ethernet each manufacturer uses what is sometimes a | ||
57 | completely different programming interface, leading to a lot of different, | ||
58 | sometimes very similar, Ethernet drivers. Of course, always using the same | ||
59 | programming interface also means that when high-performance hardware | ||
60 | facilities like PCI bus mastering DMA appear, it's hard to take advantage of | ||
61 | them. Let's not go into that. | ||
62 | |||
63 | One thing that makes ARCnet cards difficult to program for, however, is the | ||
64 | limit on their packet sizes; standard ARCnet can only send packets that are | ||
65 | up to 508 bytes in length. This is smaller than the Internet "bare minimum" | ||
66 | of 576 bytes, let alone the Ethernet MTU of 1500. To compensate, an extra | ||
67 | level of encapsulation is defined by RFC1201, which I call "packet | ||
68 | splitting," that allows "virtual packets" to grow as large as 64K each, | ||
69 | although they are generally kept down to the Ethernet-style 1500 bytes. | ||
70 | |||
71 | For more information on the advantages and disadvantages (mostly the | ||
72 | advantages) of ARCnet networks, you might try the "ARCnet Trade Association" | ||
73 | WWW page: | ||
74 | http://www.arcnet.com | ||
75 | |||
76 | |||
77 | CABLING ARCNET NETWORKS | ||
78 | ----------------------- | ||
79 | |||
80 | This section was rewritten by | ||
81 | Vojtech Pavlik <vojtech@suse.cz> | ||
82 | using information from several people, including: | ||
83 | Avery Pennraun <apenwarr@worldvisions.ca> | ||
84 | Stephen A. Wood <saw@hallc1.cebaf.gov> | ||
85 | John Paul Morrison <jmorriso@bogomips.ee.ubc.ca> | ||
86 | Joachim Koenig <jojo@repas.de> | ||
87 | and Avery touched it up a bit, at Vojtech's request. | ||
88 | |||
89 | ARCnet (the classic 2.5 Mbps version) can be connected by two different | ||
90 | types of cabling: coax and twisted pair. The other ARCnet-type networks | ||
91 | (100 Mbps TCNS and 320 kbps - 32 Mbps ARCnet Plus) use different types of | ||
92 | cabling (Type1, Fiber, C1, C4, C5). | ||
93 | |||
94 | For a coax network, you "should" use 93 Ohm RG-62 cable. But other cables | ||
95 | also work fine, because ARCnet is a very stable network. I personally use 75 | ||
96 | Ohm TV antenna cable. | ||
97 | |||
98 | Cards for coax cabling are shipped in two different variants: for BUS and | ||
99 | STAR network topologies. They are mostly the same. The only difference | ||
100 | lies in the hybrid chip installed. BUS cards use high impedance output, | ||
101 | while STAR use low impedance. Low impedance card (STAR) is electrically | ||
102 | equal to a high impedance one with a terminator installed. | ||
103 | |||
104 | Usually, the ARCnet networks are built up from STAR cards and hubs. There | ||
105 | are two types of hubs - active and passive. Passive hubs are small boxes | ||
106 | with four BNC connectors containing four 47 Ohm resistors: | ||
107 | |||
108 | | | wires | ||
109 | R + junction | ||
110 | -R-+-R- R 47 Ohm resistors | ||
111 | R | ||
112 | | | ||
113 | |||
114 | The shielding is connected together. Active hubs are much more complicated; | ||
115 | they are powered and contain electronics to amplify the signal and send it | ||
116 | to other segments of the net. They usually have eight connectors. Active | ||
117 | hubs come in two variants - dumb and smart. The dumb variant just | ||
118 | amplifies, but the smart one decodes to digital and encodes back all packets | ||
119 | coming through. This is much better if you have several hubs in the net, | ||
120 | since many dumb active hubs may worsen the signal quality. | ||
121 | |||
122 | And now to the cabling. What you can connect together: | ||
123 | |||
124 | 1. A card to a card. This is the simplest way of creating a 2-computer | ||
125 | network. | ||
126 | |||
127 | 2. A card to a passive hub. Remember that all unused connectors on the hub | ||
128 | must be properly terminated with 93 Ohm (or something else if you don't | ||
129 | have the right ones) terminators. | ||
130 | (Avery's note: oops, I didn't know that. Mine (TV cable) works | ||
131 | anyway, though.) | ||
132 | |||
133 | 3. A card to an active hub. Here is no need to terminate the unused | ||
134 | connectors except some kind of aesthetic feeling. But, there may not be | ||
135 | more than eleven active hubs between any two computers. That of course | ||
136 | doesn't limit the number of active hubs on the network. | ||
137 | |||
138 | 4. An active hub to another. | ||
139 | |||
140 | 5. An active hub to passive hub. | ||
141 | |||
142 | Remember, that you can not connect two passive hubs together. The power loss | ||
143 | implied by such a connection is too high for the net to operate reliably. | ||
144 | |||
145 | An example of a typical ARCnet network: | ||
146 | |||
147 | R S - STAR type card | ||
148 | S------H--------A-------S R - Terminator | ||
149 | | | H - Hub | ||
150 | | | A - Active hub | ||
151 | | S----H----S | ||
152 | S | | ||
153 | | | ||
154 | S | ||
155 | |||
156 | The BUS topology is very similar to the one used by Ethernet. The only | ||
157 | difference is in cable and terminators: they should be 93 Ohm. Ethernet | ||
158 | uses 50 Ohm impedance. You use T connectors to put the computers on a single | ||
159 | line of cable, the bus. You have to put terminators at both ends of the | ||
160 | cable. A typical BUS ARCnet network looks like: | ||
161 | |||
162 | RT----T------T------T------T------TR | ||
163 | B B B B B B | ||
164 | |||
165 | B - BUS type card | ||
166 | R - Terminator | ||
167 | T - T connector | ||
168 | |||
169 | But that is not all! The two types can be connected together. According to | ||
170 | the official documentation the only way of connecting them is using an active | ||
171 | hub: | ||
172 | |||
173 | A------T------T------TR | ||
174 | | B B B | ||
175 | S---H---S | ||
176 | | | ||
177 | S | ||
178 | |||
179 | The official docs also state that you can use STAR cards at the ends of | ||
180 | BUS network in place of a BUS card and a terminator: | ||
181 | |||
182 | S------T------T------S | ||
183 | B B | ||
184 | |||
185 | But, according to my own experiments, you can simply hang a BUS type card | ||
186 | anywhere in middle of a cable in a STAR topology network. And more - you | ||
187 | can use the bus card in place of any star card if you use a terminator. Then | ||
188 | you can build very complicated networks fulfilling all your needs! An | ||
189 | example: | ||
190 | |||
191 | S | ||
192 | | | ||
193 | RT------T-------T------H------S | ||
194 | B B B | | ||
195 | | R | ||
196 | S------A------T-------T-------A-------H------TR | ||
197 | | B B | | B | ||
198 | | S BT | | ||
199 | | | | S----A-----S | ||
200 | S------H---A----S | | | ||
201 | | | S------T----H---S | | ||
202 | S S B R S | ||
203 | |||
204 | A basically different cabling scheme is used with Twisted Pair cabling. Each | ||
205 | of the TP cards has two RJ (phone-cord style) connectors. The cards are | ||
206 | then daisy-chained together using a cable connecting every two neighboring | ||
207 | cards. The ends are terminated with RJ 93 Ohm terminators which plug into | ||
208 | the empty connectors of cards on the ends of the chain. An example: | ||
209 | |||
210 | ___________ ___________ | ||
211 | _R_|_ _|_|_ _|_R_ | ||
212 | | | | | | | | ||
213 | |Card | |Card | |Card | | ||
214 | |_____| |_____| |_____| | ||
215 | |||
216 | |||
217 | There are also hubs for the TP topology. There is nothing difficult | ||
218 | involved in using them; you just connect a TP chain to a hub on any end or | ||
219 | even at both. This way you can create almost any network configuration. | ||
220 | The maximum of 11 hubs between any two computers on the net applies here as | ||
221 | well. An example: | ||
222 | |||
223 | RP-------P--------P--------H-----P------P-----PR | ||
224 | | | ||
225 | RP-----H--------P--------H-----P------PR | ||
226 | | | | ||
227 | PR PR | ||
228 | |||
229 | R - RJ Terminator | ||
230 | P - TP Card | ||
231 | H - TP Hub | ||
232 | |||
233 | Like any network, ARCnet has a limited cable length. These are the maximum | ||
234 | cable lengths between two active ends (an active end being an active hub or | ||
235 | a STAR card). | ||
236 | |||
237 | RG-62 93 Ohm up to 650 m | ||
238 | RG-59/U 75 Ohm up to 457 m | ||
239 | RG-11/U 75 Ohm up to 533 m | ||
240 | IBM Type 1 150 Ohm up to 200 m | ||
241 | IBM Type 3 100 Ohm up to 100 m | ||
242 | |||
243 | The maximum length of all cables connected to a passive hub is limited to 65 | ||
244 | meters for RG-62 cabling; less for others. You can see that using passive | ||
245 | hubs in a large network is a bad idea. The maximum length of a single "BUS | ||
246 | Trunk" is about 300 meters for RG-62. The maximum distance between the two | ||
247 | most distant points of the net is limited to 3000 meters. The maximum length | ||
248 | of a TP cable between two cards/hubs is 650 meters. | ||
249 | |||
250 | |||
251 | SETTING THE JUMPERS | ||
252 | ------------------- | ||
253 | |||
254 | All ARCnet cards should have a total of four or five different settings: | ||
255 | |||
256 | - the I/O address: this is the "port" your ARCnet card is on. Probed | ||
257 | values in the Linux ARCnet driver are only from 0x200 through 0x3F0. (If | ||
258 | your card has additional ones, which is possible, please tell me.) This | ||
259 | should not be the same as any other device on your system. According to | ||
260 | a doc I got from Novell, MS Windows prefers values of 0x300 or more, | ||
261 | eating net connections on my system (at least) otherwise. My guess is | ||
262 | this may be because, if your card is at 0x2E0, probing for a serial port | ||
263 | at 0x2E8 will reset the card and probably mess things up royally. | ||
264 | - Avery's favourite: 0x300. | ||
265 | |||
266 | - the IRQ: on 8-bit cards, it might be 2 (9), 3, 4, 5, or 7. | ||
267 | on 16-bit cards, it might be 2 (9), 3, 4, 5, 7, or 10-15. | ||
268 | |||
269 | Make sure this is different from any other card on your system. Note | ||
270 | that IRQ2 is the same as IRQ9, as far as Linux is concerned. You can | ||
271 | "cat /proc/interrupts" for a somewhat complete list of which ones are in | ||
272 | use at any given time. Here is a list of common usages from Vojtech | ||
273 | Pavlik <vojtech@suse.cz>: | ||
274 | ("Not on bus" means there is no way for a card to generate this | ||
275 | interrupt) | ||
276 | IRQ 0 - Timer 0 (Not on bus) | ||
277 | IRQ 1 - Keyboard (Not on bus) | ||
278 | IRQ 2 - IRQ Controller 2 (Not on bus, nor does interrupt the CPU) | ||
279 | IRQ 3 - COM2 | ||
280 | IRQ 4 - COM1 | ||
281 | IRQ 5 - FREE (LPT2 if you have it; sometimes COM3; maybe PLIP) | ||
282 | IRQ 6 - Floppy disk controller | ||
283 | IRQ 7 - FREE (LPT1 if you don't use the polling driver; PLIP) | ||
284 | IRQ 8 - Realtime Clock Interrupt (Not on bus) | ||
285 | IRQ 9 - FREE (VGA vertical sync interrupt if enabled) | ||
286 | IRQ 10 - FREE | ||
287 | IRQ 11 - FREE | ||
288 | IRQ 12 - FREE | ||
289 | IRQ 13 - Numeric Coprocessor (Not on bus) | ||
290 | IRQ 14 - Fixed Disk Controller | ||
291 | IRQ 15 - FREE (Fixed Disk Controller 2 if you have it) | ||
292 | |||
293 | Note: IRQ 9 is used on some video cards for the "vertical retrace" | ||
294 | interrupt. This interrupt would have been handy for things like | ||
295 | video games, as it occurs exactly once per screen refresh, but | ||
296 | unfortunately IBM cancelled this feature starting with the original | ||
297 | VGA and thus many VGA/SVGA cards do not support it. For this | ||
298 | reason, no modern software uses this interrupt and it can almost | ||
299 | always be safely disabled, if your video card supports it at all. | ||
300 | |||
301 | If your card for some reason CANNOT disable this IRQ (usually there | ||
302 | is a jumper), one solution would be to clip the printed circuit | ||
303 | contact on the board: it's the fourth contact from the left on the | ||
304 | back side. I take no responsibility if you try this. | ||
305 | |||
306 | - Avery's favourite: IRQ2 (actually IRQ9). Watch that VGA, though. | ||
307 | |||
308 | - the memory address: Unlike most cards, ARCnets use "shared memory" for | ||
309 | copying buffers around. Make SURE it doesn't conflict with any other | ||
310 | used memory in your system! | ||
311 | A0000 - VGA graphics memory (ok if you don't have VGA) | ||
312 | B0000 - Monochrome text mode | ||
313 | C0000 \ One of these is your VGA BIOS - usually C0000. | ||
314 | E0000 / | ||
315 | F0000 - System BIOS | ||
316 | |||
317 | Anything less than 0xA0000 is, well, a BAD idea since it isn't above | ||
318 | 640k. | ||
319 | - Avery's favourite: 0xD0000 | ||
320 | |||
321 | - the station address: Every ARCnet card has its own "unique" network | ||
322 | address from 0 to 255. Unlike Ethernet, you can set this address | ||
323 | yourself with a jumper or switch (or on some cards, with special | ||
324 | software). Since it's only 8 bits, you can only have 254 ARCnet cards | ||
325 | on a network. DON'T use 0 or 255, since these are reserved (although | ||
326 | neat stuff will probably happen if you DO use them). By the way, if you | ||
327 | haven't already guessed, don't set this the same as any other ARCnet on | ||
328 | your network! | ||
329 | - Avery's favourite: 3 and 4. Not that it matters. | ||
330 | |||
331 | - There may be ETS1 and ETS2 settings. These may or may not make a | ||
332 | difference on your card (many manuals call them "reserved"), but are | ||
333 | used to change the delays used when powering up a computer on the | ||
334 | network. This is only necessary when wiring VERY long range ARCnet | ||
335 | networks, on the order of 4km or so; in any case, the only real | ||
336 | requirement here is that all cards on the network with ETS1 and ETS2 | ||
337 | jumpers have them in the same position. Chris Hindy <chrish@io.org> | ||
338 | sent in a chart with actual values for this: | ||
339 | ET1 ET2 Response Time Reconfiguration Time | ||
340 | --- --- ------------- -------------------- | ||
341 | open open 74.7us 840us | ||
342 | open closed 283.4us 1680us | ||
343 | closed open 561.8us 1680us | ||
344 | closed closed 1118.6us 1680us | ||
345 | |||
346 | Make sure you set ETS1 and ETS2 to the SAME VALUE for all cards on your | ||
347 | network. | ||
348 | |||
349 | Also, on many cards (not mine, though) there are red and green LED's. | ||
350 | Vojtech Pavlik <vojtech@suse.cz> tells me this is what they mean: | ||
351 | GREEN RED Status | ||
352 | ----- --- ------ | ||
353 | OFF OFF Power off | ||
354 | OFF Short flashes Cabling problems (broken cable or not | ||
355 | terminated) | ||
356 | OFF (short) ON Card init | ||
357 | ON ON Normal state - everything OK, nothing | ||
358 | happens | ||
359 | ON Long flashes Data transfer | ||
360 | ON OFF Never happens (maybe when wrong ID) | ||
361 | |||
362 | |||
363 | The following is all the specific information people have sent me about | ||
364 | their own particular ARCnet cards. It is officially a mess, and contains | ||
365 | huge amounts of duplicated information. I have no time to fix it. If you | ||
366 | want to, PLEASE DO! Just send me a 'diff -u' of all your changes. | ||
367 | |||
368 | The model # is listed right above specifics for that card, so you should be | ||
369 | able to use your text viewer's "search" function to find the entry you want. | ||
370 | If you don't KNOW what kind of card you have, try looking through the | ||
371 | various diagrams to see if you can tell. | ||
372 | |||
373 | If your model isn't listed and/or has different settings, PLEASE PLEASE | ||
374 | tell me. I had to figure mine out without the manual, and it WASN'T FUN! | ||
375 | |||
376 | Even if your ARCnet model isn't listed, but has the same jumpers as another | ||
377 | model that is, please e-mail me to say so. | ||
378 | |||
379 | Cards Listed in this file (in this order, mostly): | ||
380 | |||
381 | Manufacturer Model # Bits | ||
382 | ------------ ------- ---- | ||
383 | SMC PC100 8 | ||
384 | SMC PC110 8 | ||
385 | SMC PC120 8 | ||
386 | SMC PC130 8 | ||
387 | SMC PC270E 8 | ||
388 | SMC PC500 16 | ||
389 | SMC PC500Longboard 16 | ||
390 | SMC PC550Longboard 16 | ||
391 | SMC PC600 16 | ||
392 | SMC PC710 8 | ||
393 | SMC? LCS-8830(-T) 8/16 | ||
394 | Puredata PDI507 8 | ||
395 | CNet Tech CN120-Series 8 | ||
396 | CNet Tech CN160-Series 16 | ||
397 | Lantech? UM9065L chipset 8 | ||
398 | Acer 5210-003 8 | ||
399 | Datapoint? LAN-ARC-8 8 | ||
400 | Topware TA-ARC/10 8 | ||
401 | Thomas-Conrad 500-6242-0097 REV A 8 | ||
402 | Waterloo? (C)1985 Waterloo Micro. 8 | ||
403 | No Name -- 8/16 | ||
404 | No Name Taiwan R.O.C? 8 | ||
405 | No Name Model 9058 8 | ||
406 | Tiara Tiara Lancard? 8 | ||
407 | |||
408 | |||
409 | ** SMC = Standard Microsystems Corp. | ||
410 | ** CNet Tech = CNet Technology, Inc. | ||
411 | |||
412 | |||
413 | Unclassified Stuff | ||
414 | ------------------ | ||
415 | - Please send any other information you can find. | ||
416 | |||
417 | - And some other stuff (more info is welcome!): | ||
418 | From: root@ultraworld.xs4all.nl (Timo Hilbrink) | ||
419 | To: apenwarr@foxnet.net (Avery Pennarun) | ||
420 | Date: Wed, 26 Oct 1994 02:10:32 +0000 (GMT) | ||
421 | Reply-To: timoh@xs4all.nl | ||
422 | |||
423 | [...parts deleted...] | ||
424 | |||
425 | About the jumpers: On my PC130 there is one more jumper, located near the | ||
426 | cable-connector and it's for changing to star or bus topology; | ||
427 | closed: star - open: bus | ||
428 | On the PC500 are some more jumper-pins, one block labeled with RX,PDN,TXI | ||
429 | and another with ALE,LA17,LA18,LA19 these are undocumented.. | ||
430 | |||
431 | [...more parts deleted...] | ||
432 | |||
433 | --- CUT --- | ||
434 | |||
435 | |||
436 | ** Standard Microsystems Corp (SMC) ** | ||
437 | PC100, PC110, PC120, PC130 (8-bit cards) | ||
438 | PC500, PC600 (16-bit cards) | ||
439 | --------------------------------- | ||
440 | - mainly from Avery Pennarun <apenwarr@worldvisions.ca>. Values depicted | ||
441 | are from Avery's setup. | ||
442 | - special thanks to Timo Hilbrink <timoh@xs4all.nl> for noting that PC120, | ||
443 | 130, 500, and 600 all have the same switches as Avery's PC100. | ||
444 | PC500/600 have several extra, undocumented pins though. (?) | ||
445 | - PC110 settings were verified by Stephen A. Wood <saw@cebaf.gov> | ||
446 | - Also, the JP- and S-numbers probably don't match your card exactly. Try | ||
447 | to find jumpers/switches with the same number of settings - it's | ||
448 | probably more reliable. | ||
449 | |||
450 | |||
451 | JP5 [|] : : : : | ||
452 | (IRQ Setting) IRQ2 IRQ3 IRQ4 IRQ5 IRQ7 | ||
453 | Put exactly one jumper on exactly one set of pins. | ||
454 | |||
455 | |||
456 | 1 2 3 4 5 6 7 8 9 10 | ||
457 | S1 /----------------------------------\ | ||
458 | (I/O and Memory | 1 1 * 0 0 0 0 * 1 1 0 1 | | ||
459 | addresses) \----------------------------------/ | ||
460 | |--| |--------| |--------| | ||
461 | (a) (b) (m) | ||
462 | |||
463 | WARNING. It's very important when setting these which way | ||
464 | you're holding the card, and which way you think is '1'! | ||
465 | |||
466 | If you suspect that your settings are not being made | ||
467 | correctly, try reversing the direction or inverting the | ||
468 | switch positions. | ||
469 | |||
470 | a: The first digit of the I/O address. | ||
471 | Setting Value | ||
472 | ------- ----- | ||
473 | 00 0 | ||
474 | 01 1 | ||
475 | 10 2 | ||
476 | 11 3 | ||
477 | |||
478 | b: The second digit of the I/O address. | ||
479 | Setting Value | ||
480 | ------- ----- | ||
481 | 0000 0 | ||
482 | 0001 1 | ||
483 | 0010 2 | ||
484 | ... ... | ||
485 | 1110 E | ||
486 | 1111 F | ||
487 | |||
488 | The I/O address is in the form ab0. For example, if | ||
489 | a is 0x2 and b is 0xE, the address will be 0x2E0. | ||
490 | |||
491 | DO NOT SET THIS LESS THAN 0x200!!!!! | ||
492 | |||
493 | |||
494 | m: The first digit of the memory address. | ||
495 | Setting Value | ||
496 | ------- ----- | ||
497 | 0000 0 | ||
498 | 0001 1 | ||
499 | 0010 2 | ||
500 | ... ... | ||
501 | 1110 E | ||
502 | 1111 F | ||
503 | |||
504 | The memory address is in the form m0000. For example, if | ||
505 | m is D, the address will be 0xD0000. | ||
506 | |||
507 | DO NOT SET THIS TO C0000, F0000, OR LESS THAN A0000! | ||
508 | |||
509 | 1 2 3 4 5 6 7 8 | ||
510 | S2 /--------------------------\ | ||
511 | (Station Address) | 1 1 0 0 0 0 0 0 | | ||
512 | \--------------------------/ | ||
513 | |||
514 | Setting Value | ||
515 | ------- ----- | ||
516 | 00000000 00 | ||
517 | 10000000 01 | ||
518 | 01000000 02 | ||
519 | ... | ||
520 | 01111111 FE | ||
521 | 11111111 FF | ||
522 | |||
523 | Note that this is binary with the digits reversed! | ||
524 | |||
525 | DO NOT SET THIS TO 0 OR 255 (0xFF)! | ||
526 | |||
527 | |||
528 | ***************************************************************************** | ||
529 | |||
530 | ** Standard Microsystems Corp (SMC) ** | ||
531 | PC130E/PC270E (8-bit cards) | ||
532 | --------------------------- | ||
533 | - from Juergen Seifert <seifert@htwm.de> | ||
534 | |||
535 | |||
536 | STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET(R)-PC130E/PC270E | ||
537 | =============================================================== | ||
538 | |||
539 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
540 | using information from the following Original SMC Manual | ||
541 | |||
542 | "Configuration Guide for | ||
543 | ARCNET(R)-PC130E/PC270 | ||
544 | Network Controller Boards | ||
545 | Pub. # 900.044A | ||
546 | June, 1989" | ||
547 | |||
548 | ARCNET is a registered trademark of the Datapoint Corporation | ||
549 | SMC is a registered trademark of the Standard Microsystems Corporation | ||
550 | |||
551 | The PC130E is an enhanced version of the PC130 board, is equipped with a | ||
552 | standard BNC female connector for connection to RG-62/U coax cable. | ||
553 | Since this board is designed both for point-to-point connection in star | ||
554 | networks and for connection to bus networks, it is downwardly compatible | ||
555 | with all the other standard boards designed for coax networks (that is, | ||
556 | the PC120, PC110 and PC100 star topology boards and the PC220, PC210 and | ||
557 | PC200 bus topology boards). | ||
558 | |||
559 | The PC270E is an enhanced version of the PC260 board, is equipped with two | ||
560 | modular RJ11-type jacks for connection to twisted pair wiring. | ||
561 | It can be used in a star or a daisy-chained network. | ||
562 | |||
563 | |||
564 | 8 7 6 5 4 3 2 1 | ||
565 | ________________________________________________________________ | ||
566 | | | S1 | | | ||
567 | | |_________________| | | ||
568 | | Offs|Base |I/O Addr | | ||
569 | | RAM Addr | ___| | ||
570 | | ___ ___ CR3 |___| | ||
571 | | | \/ | CR4 |___| | ||
572 | | | PROM | ___| | ||
573 | | | | N | | 8 | ||
574 | | | SOCKET | o | | 7 | ||
575 | | |________| d | | 6 | ||
576 | | ___________________ e | | 5 | ||
577 | | | | A | S | 4 | ||
578 | | |oo| EXT2 | | d | 2 | 3 | ||
579 | | |oo| EXT1 | SMC | d | | 2 | ||
580 | | |oo| ROM | 90C63 | r |___| 1 | ||
581 | | |oo| IRQ7 | | |o| _____| | ||
582 | | |oo| IRQ5 | | |o| | J1 | | ||
583 | | |oo| IRQ4 | | STAR |_____| | ||
584 | | |oo| IRQ3 | | | J2 | | ||
585 | | |oo| IRQ2 |___________________| |_____| | ||
586 | |___ ______________| | ||
587 | | | | ||
588 | |_____________________________________________| | ||
589 | |||
590 | Legend: | ||
591 | |||
592 | SMC 90C63 ARCNET Controller / Transceiver /Logic | ||
593 | S1 1-3: I/O Base Address Select | ||
594 | 4-6: Memory Base Address Select | ||
595 | 7-8: RAM Offset Select | ||
596 | S2 1-8: Node ID Select | ||
597 | EXT Extended Timeout Select | ||
598 | ROM ROM Enable Select | ||
599 | STAR Selected - Star Topology (PC130E only) | ||
600 | Deselected - Bus Topology (PC130E only) | ||
601 | CR3/CR4 Diagnostic LEDs | ||
602 | J1 BNC RG62/U Connector (PC130E only) | ||
603 | J1 6-position Telephone Jack (PC270E only) | ||
604 | J2 6-position Telephone Jack (PC270E only) | ||
605 | |||
606 | Setting one of the switches to Off/Open means "1", On/Closed means "0". | ||
607 | |||
608 | |||
609 | Setting the Node ID | ||
610 | ------------------- | ||
611 | |||
612 | The eight switches in group S2 are used to set the node ID. | ||
613 | These switches work in a way similar to the PC100-series cards; see that | ||
614 | entry for more information. | ||
615 | |||
616 | |||
617 | Setting the I/O Base Address | ||
618 | ---------------------------- | ||
619 | |||
620 | The first three switches in switch group S1 are used to select one | ||
621 | of eight possible I/O Base addresses using the following table | ||
622 | |||
623 | |||
624 | Switch | Hex I/O | ||
625 | 1 2 3 | Address | ||
626 | -------|-------- | ||
627 | 0 0 0 | 260 | ||
628 | 0 0 1 | 290 | ||
629 | 0 1 0 | 2E0 (Manufacturer's default) | ||
630 | 0 1 1 | 2F0 | ||
631 | 1 0 0 | 300 | ||
632 | 1 0 1 | 350 | ||
633 | 1 1 0 | 380 | ||
634 | 1 1 1 | 3E0 | ||
635 | |||
636 | |||
637 | Setting the Base Memory (RAM) buffer Address | ||
638 | -------------------------------------------- | ||
639 | |||
640 | The memory buffer requires 2K of a 16K block of RAM. The base of this | ||
641 | 16K block can be located in any of eight positions. | ||
642 | Switches 4-6 of switch group S1 select the Base of the 16K block. | ||
643 | Within that 16K address space, the buffer may be assigned any one of four | ||
644 | positions, determined by the offset, switches 7 and 8 of group S1. | ||
645 | |||
646 | Switch | Hex RAM | Hex ROM | ||
647 | 4 5 6 7 8 | Address | Address *) | ||
648 | -----------|---------|----------- | ||
649 | 0 0 0 0 0 | C0000 | C2000 | ||
650 | 0 0 0 0 1 | C0800 | C2000 | ||
651 | 0 0 0 1 0 | C1000 | C2000 | ||
652 | 0 0 0 1 1 | C1800 | C2000 | ||
653 | | | | ||
654 | 0 0 1 0 0 | C4000 | C6000 | ||
655 | 0 0 1 0 1 | C4800 | C6000 | ||
656 | 0 0 1 1 0 | C5000 | C6000 | ||
657 | 0 0 1 1 1 | C5800 | C6000 | ||
658 | | | | ||
659 | 0 1 0 0 0 | CC000 | CE000 | ||
660 | 0 1 0 0 1 | CC800 | CE000 | ||
661 | 0 1 0 1 0 | CD000 | CE000 | ||
662 | 0 1 0 1 1 | CD800 | CE000 | ||
663 | | | | ||
664 | 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default) | ||
665 | 0 1 1 0 1 | D0800 | D2000 | ||
666 | 0 1 1 1 0 | D1000 | D2000 | ||
667 | 0 1 1 1 1 | D1800 | D2000 | ||
668 | | | | ||
669 | 1 0 0 0 0 | D4000 | D6000 | ||
670 | 1 0 0 0 1 | D4800 | D6000 | ||
671 | 1 0 0 1 0 | D5000 | D6000 | ||
672 | 1 0 0 1 1 | D5800 | D6000 | ||
673 | | | | ||
674 | 1 0 1 0 0 | D8000 | DA000 | ||
675 | 1 0 1 0 1 | D8800 | DA000 | ||
676 | 1 0 1 1 0 | D9000 | DA000 | ||
677 | 1 0 1 1 1 | D9800 | DA000 | ||
678 | | | | ||
679 | 1 1 0 0 0 | DC000 | DE000 | ||
680 | 1 1 0 0 1 | DC800 | DE000 | ||
681 | 1 1 0 1 0 | DD000 | DE000 | ||
682 | 1 1 0 1 1 | DD800 | DE000 | ||
683 | | | | ||
684 | 1 1 1 0 0 | E0000 | E2000 | ||
685 | 1 1 1 0 1 | E0800 | E2000 | ||
686 | 1 1 1 1 0 | E1000 | E2000 | ||
687 | 1 1 1 1 1 | E1800 | E2000 | ||
688 | |||
689 | *) To enable the 8K Boot PROM install the jumper ROM. | ||
690 | The default is jumper ROM not installed. | ||
691 | |||
692 | |||
693 | Setting the Timeouts and Interrupt | ||
694 | ---------------------------------- | ||
695 | |||
696 | The jumpers labeled EXT1 and EXT2 are used to determine the timeout | ||
697 | parameters. These two jumpers are normally left open. | ||
698 | |||
699 | To select a hardware interrupt level set one (only one!) of the jumpers | ||
700 | IRQ2, IRQ3, IRQ4, IRQ5, IRQ7. The Manufacturer's default is IRQ2. | ||
701 | |||
702 | |||
703 | Configuring the PC130E for Star or Bus Topology | ||
704 | ----------------------------------------------- | ||
705 | |||
706 | The single jumper labeled STAR is used to configure the PC130E board for | ||
707 | star or bus topology. | ||
708 | When the jumper is installed, the board may be used in a star network, when | ||
709 | it is removed, the board can be used in a bus topology. | ||
710 | |||
711 | |||
712 | Diagnostic LEDs | ||
713 | --------------- | ||
714 | |||
715 | Two diagnostic LEDs are visible on the rear bracket of the board. | ||
716 | The green LED monitors the network activity: the red one shows the | ||
717 | board activity: | ||
718 | |||
719 | Green | Status Red | Status | ||
720 | -------|------------------- ---------|------------------- | ||
721 | on | normal activity flash/on | data transfer | ||
722 | blink | reconfiguration off | no data transfer; | ||
723 | off | defective board or | incorrect memory or | ||
724 | | node ID is zero | I/O address | ||
725 | |||
726 | |||
727 | ***************************************************************************** | ||
728 | |||
729 | ** Standard Microsystems Corp (SMC) ** | ||
730 | PC500/PC550 Longboard (16-bit cards) | ||
731 | ------------------------------------- | ||
732 | - from Juergen Seifert <seifert@htwm.de> | ||
733 | |||
734 | |||
735 | STANDARD MICROSYSTEMS CORPORATION (SMC) ARCNET-PC500/PC550 Long Board | ||
736 | ===================================================================== | ||
737 | |||
738 | Note: There is another Version of the PC500 called Short Version, which | ||
739 | is different in hard- and software! The most important differences | ||
740 | are: | ||
741 | - The long board has no Shared memory. | ||
742 | - On the long board the selection of the interrupt is done by binary | ||
743 | coded switch, on the short board directly by jumper. | ||
744 | |||
745 | [Avery's note: pay special attention to that: the long board HAS NO SHARED | ||
746 | MEMORY. This means the current Linux-ARCnet driver can't use these cards. | ||
747 | I have obtained a PC500Longboard and will be doing some experiments on it in | ||
748 | the future, but don't hold your breath. Thanks again to Juergen Seifert for | ||
749 | his advice about this!] | ||
750 | |||
751 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
752 | using information from the following Original SMC Manual | ||
753 | |||
754 | "Configuration Guide for | ||
755 | SMC ARCNET-PC500/PC550 | ||
756 | Series Network Controller Boards | ||
757 | Pub. # 900.033 Rev. A | ||
758 | November, 1989" | ||
759 | |||
760 | ARCNET is a registered trademark of the Datapoint Corporation | ||
761 | SMC is a registered trademark of the Standard Microsystems Corporation | ||
762 | |||
763 | The PC500 is equipped with a standard BNC female connector for connection | ||
764 | to RG-62/U coax cable. | ||
765 | The board is designed both for point-to-point connection in star networks | ||
766 | and for connection to bus networks. | ||
767 | |||
768 | The PC550 is equipped with two modular RJ11-type jacks for connection | ||
769 | to twisted pair wiring. | ||
770 | It can be used in a star or a daisy-chained (BUS) network. | ||
771 | |||
772 | 1 | ||
773 | 0 9 8 7 6 5 4 3 2 1 6 5 4 3 2 1 | ||
774 | ____________________________________________________________________ | ||
775 | < | SW1 | | SW2 | | | ||
776 | > |_____________________| |_____________| | | ||
777 | < IRQ |I/O Addr | | ||
778 | > ___| | ||
779 | < CR4 |___| | ||
780 | > CR3 |___| | ||
781 | < ___| | ||
782 | > N | | 8 | ||
783 | < o | | 7 | ||
784 | > d | S | 6 | ||
785 | < e | W | 5 | ||
786 | > A | 3 | 4 | ||
787 | < d | | 3 | ||
788 | > d | | 2 | ||
789 | < r |___| 1 | ||
790 | > |o| _____| | ||
791 | < |o| | J1 | | ||
792 | > 3 1 JP6 |_____| | ||
793 | < |o|o| JP2 | J2 | | ||
794 | > |o|o| |_____| | ||
795 | < 4 2__ ______________| | ||
796 | > | | | | ||
797 | <____| |_____________________________________________| | ||
798 | |||
799 | Legend: | ||
800 | |||
801 | SW1 1-6: I/O Base Address Select | ||
802 | 7-10: Interrupt Select | ||
803 | SW2 1-6: Reserved for Future Use | ||
804 | SW3 1-8: Node ID Select | ||
805 | JP2 1-4: Extended Timeout Select | ||
806 | JP6 Selected - Star Topology (PC500 only) | ||
807 | Deselected - Bus Topology (PC500 only) | ||
808 | CR3 Green Monitors Network Activity | ||
809 | CR4 Red Monitors Board Activity | ||
810 | J1 BNC RG62/U Connector (PC500 only) | ||
811 | J1 6-position Telephone Jack (PC550 only) | ||
812 | J2 6-position Telephone Jack (PC550 only) | ||
813 | |||
814 | Setting one of the switches to Off/Open means "1", On/Closed means "0". | ||
815 | |||
816 | |||
817 | Setting the Node ID | ||
818 | ------------------- | ||
819 | |||
820 | The eight switches in group SW3 are used to set the node ID. Each node | ||
821 | attached to the network must have an unique node ID which must be | ||
822 | different from 0. | ||
823 | Switch 1 serves as the least significant bit (LSB). | ||
824 | |||
825 | The node ID is the sum of the values of all switches set to "1" | ||
826 | These values are: | ||
827 | |||
828 | Switch | Value | ||
829 | -------|------- | ||
830 | 1 | 1 | ||
831 | 2 | 2 | ||
832 | 3 | 4 | ||
833 | 4 | 8 | ||
834 | 5 | 16 | ||
835 | 6 | 32 | ||
836 | 7 | 64 | ||
837 | 8 | 128 | ||
838 | |||
839 | Some Examples: | ||
840 | |||
841 | Switch | Hex | Decimal | ||
842 | 8 7 6 5 4 3 2 1 | Node ID | Node ID | ||
843 | ----------------|---------|--------- | ||
844 | 0 0 0 0 0 0 0 0 | not allowed | ||
845 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
846 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
847 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
848 | . . . | | | ||
849 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
850 | . . . | | | ||
851 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
852 | . . . | | | ||
853 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
854 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
855 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
856 | |||
857 | |||
858 | Setting the I/O Base Address | ||
859 | ---------------------------- | ||
860 | |||
861 | The first six switches in switch group SW1 are used to select one | ||
862 | of 32 possible I/O Base addresses using the following table | ||
863 | |||
864 | Switch | Hex I/O | ||
865 | 6 5 4 3 2 1 | Address | ||
866 | -------------|-------- | ||
867 | 0 1 0 0 0 0 | 200 | ||
868 | 0 1 0 0 0 1 | 210 | ||
869 | 0 1 0 0 1 0 | 220 | ||
870 | 0 1 0 0 1 1 | 230 | ||
871 | 0 1 0 1 0 0 | 240 | ||
872 | 0 1 0 1 0 1 | 250 | ||
873 | 0 1 0 1 1 0 | 260 | ||
874 | 0 1 0 1 1 1 | 270 | ||
875 | 0 1 1 0 0 0 | 280 | ||
876 | 0 1 1 0 0 1 | 290 | ||
877 | 0 1 1 0 1 0 | 2A0 | ||
878 | 0 1 1 0 1 1 | 2B0 | ||
879 | 0 1 1 1 0 0 | 2C0 | ||
880 | 0 1 1 1 0 1 | 2D0 | ||
881 | 0 1 1 1 1 0 | 2E0 (Manufacturer's default) | ||
882 | 0 1 1 1 1 1 | 2F0 | ||
883 | 1 1 0 0 0 0 | 300 | ||
884 | 1 1 0 0 0 1 | 310 | ||
885 | 1 1 0 0 1 0 | 320 | ||
886 | 1 1 0 0 1 1 | 330 | ||
887 | 1 1 0 1 0 0 | 340 | ||
888 | 1 1 0 1 0 1 | 350 | ||
889 | 1 1 0 1 1 0 | 360 | ||
890 | 1 1 0 1 1 1 | 370 | ||
891 | 1 1 1 0 0 0 | 380 | ||
892 | 1 1 1 0 0 1 | 390 | ||
893 | 1 1 1 0 1 0 | 3A0 | ||
894 | 1 1 1 0 1 1 | 3B0 | ||
895 | 1 1 1 1 0 0 | 3C0 | ||
896 | 1 1 1 1 0 1 | 3D0 | ||
897 | 1 1 1 1 1 0 | 3E0 | ||
898 | 1 1 1 1 1 1 | 3F0 | ||
899 | |||
900 | |||
901 | Setting the Interrupt | ||
902 | --------------------- | ||
903 | |||
904 | Switches seven through ten of switch group SW1 are used to select the | ||
905 | interrupt level. The interrupt level is binary coded, so selections | ||
906 | from 0 to 15 would be possible, but only the following eight values will | ||
907 | be supported: 3, 4, 5, 7, 9, 10, 11, 12. | ||
908 | |||
909 | Switch | IRQ | ||
910 | 10 9 8 7 | | ||
911 | ---------|-------- | ||
912 | 0 0 1 1 | 3 | ||
913 | 0 1 0 0 | 4 | ||
914 | 0 1 0 1 | 5 | ||
915 | 0 1 1 1 | 7 | ||
916 | 1 0 0 1 | 9 (=2) (default) | ||
917 | 1 0 1 0 | 10 | ||
918 | 1 0 1 1 | 11 | ||
919 | 1 1 0 0 | 12 | ||
920 | |||
921 | |||
922 | Setting the Timeouts | ||
923 | -------------------- | ||
924 | |||
925 | The two jumpers JP2 (1-4) are used to determine the timeout parameters. | ||
926 | These two jumpers are normally left open. | ||
927 | Refer to the COM9026 Data Sheet for alternate configurations. | ||
928 | |||
929 | |||
930 | Configuring the PC500 for Star or Bus Topology | ||
931 | ---------------------------------------------- | ||
932 | |||
933 | The single jumper labeled JP6 is used to configure the PC500 board for | ||
934 | star or bus topology. | ||
935 | When the jumper is installed, the board may be used in a star network, when | ||
936 | it is removed, the board can be used in a bus topology. | ||
937 | |||
938 | |||
939 | Diagnostic LEDs | ||
940 | --------------- | ||
941 | |||
942 | Two diagnostic LEDs are visible on the rear bracket of the board. | ||
943 | The green LED monitors the network activity: the red one shows the | ||
944 | board activity: | ||
945 | |||
946 | Green | Status Red | Status | ||
947 | -------|------------------- ---------|------------------- | ||
948 | on | normal activity flash/on | data transfer | ||
949 | blink | reconfiguration off | no data transfer; | ||
950 | off | defective board or | incorrect memory or | ||
951 | | node ID is zero | I/O address | ||
952 | |||
953 | |||
954 | ***************************************************************************** | ||
955 | |||
956 | ** SMC ** | ||
957 | PC710 (8-bit card) | ||
958 | ------------------ | ||
959 | - from J.S. van Oosten <jvoosten@compiler.tdcnet.nl> | ||
960 | |||
961 | Note: this data is gathered by experimenting and looking at info of other | ||
962 | cards. However, I'm sure I got 99% of the settings right. | ||
963 | |||
964 | The SMC710 card resembles the PC270 card, but is much more basic (i.e. no | ||
965 | LEDs, RJ11 jacks, etc.) and 8 bit. Here's a little drawing: | ||
966 | |||
967 | _______________________________________ | ||
968 | | +---------+ +---------+ |____ | ||
969 | | | S2 | | S1 | | | ||
970 | | +---------+ +---------+ | | ||
971 | | | | ||
972 | | +===+ __ | | ||
973 | | | R | | | X-tal ###___ | ||
974 | | | O | |__| ####__'| | ||
975 | | | M | || ### | ||
976 | | +===+ | | ||
977 | | | | ||
978 | | .. JP1 +----------+ | | ||
979 | | .. | big chip | | | ||
980 | | .. | 90C63 | | | ||
981 | | .. | | | | ||
982 | | .. +----------+ | | ||
983 | ------- ----------- | ||
984 | ||||||||||||||||||||| | ||
985 | |||
986 | The row of jumpers at JP1 actually consists of 8 jumpers, (sometimes | ||
987 | labelled) the same as on the PC270, from top to bottom: EXT2, EXT1, ROM, | ||
988 | IRQ7, IRQ5, IRQ4, IRQ3, IRQ2 (gee, wonder what they would do? :-) ) | ||
989 | |||
990 | S1 and S2 perform the same function as on the PC270, only their numbers | ||
991 | are swapped (S1 is the nodeaddress, S2 sets IO- and RAM-address). | ||
992 | |||
993 | I know it works when connected to a PC110 type ARCnet board. | ||
994 | |||
995 | |||
996 | ***************************************************************************** | ||
997 | |||
998 | ** Possibly SMC ** | ||
999 | LCS-8830(-T) (8 and 16-bit cards) | ||
1000 | --------------------------------- | ||
1001 | - from Mathias Katzer <mkatzer@HRZ.Uni-Bielefeld.DE> | ||
1002 | - Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> says the | ||
1003 | LCS-8830 is slightly different from LCS-8830-T. These are 8 bit, BUS | ||
1004 | only (the JP0 jumper is hardwired), and BNC only. | ||
1005 | |||
1006 | This is a LCS-8830-T made by SMC, I think ('SMC' only appears on one PLCC, | ||
1007 | nowhere else, not even on the few Xeroxed sheets from the manual). | ||
1008 | |||
1009 | SMC ARCnet Board Type LCS-8830-T | ||
1010 | |||
1011 | ------------------------------------ | ||
1012 | | | | ||
1013 | | JP3 88 8 JP2 | | ||
1014 | | ##### | \ | | ||
1015 | | ##### ET1 ET2 ###| | ||
1016 | | 8 ###| | ||
1017 | | U3 SW 1 JP0 ###| Phone Jacks | ||
1018 | | -- ###| | ||
1019 | | | | | | ||
1020 | | | | SW2 | | ||
1021 | | | | | | ||
1022 | | | | ##### | | ||
1023 | | -- ##### #### BNC Connector | ||
1024 | | #### | ||
1025 | | 888888 JP1 | | ||
1026 | | 234567 | | ||
1027 | -- ------- | ||
1028 | ||||||||||||||||||||||||||| | ||
1029 | -------------------------- | ||
1030 | |||
1031 | |||
1032 | SW1: DIP-Switches for Station Address | ||
1033 | SW2: DIP-Switches for Memory Base and I/O Base addresses | ||
1034 | |||
1035 | JP0: If closed, internal termination on (default open) | ||
1036 | JP1: IRQ Jumpers | ||
1037 | JP2: Boot-ROM enabled if closed | ||
1038 | JP3: Jumpers for response timeout | ||
1039 | |||
1040 | U3: Boot-ROM Socket | ||
1041 | |||
1042 | |||
1043 | ET1 ET2 Response Time Idle Time Reconfiguration Time | ||
1044 | |||
1045 | 78 86 840 | ||
1046 | X 285 316 1680 | ||
1047 | X 563 624 1680 | ||
1048 | X X 1130 1237 1680 | ||
1049 | |||
1050 | (X means closed jumper) | ||
1051 | |||
1052 | (DIP-Switch downwards means "0") | ||
1053 | |||
1054 | The station address is binary-coded with SW1. | ||
1055 | |||
1056 | The I/O base address is coded with DIP-Switches 6,7 and 8 of SW2: | ||
1057 | |||
1058 | Switches Base | ||
1059 | 678 Address | ||
1060 | 000 260-26f | ||
1061 | 100 290-29f | ||
1062 | 010 2e0-2ef | ||
1063 | 110 2f0-2ff | ||
1064 | 001 300-30f | ||
1065 | 101 350-35f | ||
1066 | 011 380-38f | ||
1067 | 111 3e0-3ef | ||
1068 | |||
1069 | |||
1070 | DIP Switches 1-5 of SW2 encode the RAM and ROM Address Range: | ||
1071 | |||
1072 | Switches RAM ROM | ||
1073 | 12345 Address Range Address Range | ||
1074 | 00000 C:0000-C:07ff C:2000-C:3fff | ||
1075 | 10000 C:0800-C:0fff | ||
1076 | 01000 C:1000-C:17ff | ||
1077 | 11000 C:1800-C:1fff | ||
1078 | 00100 C:4000-C:47ff C:6000-C:7fff | ||
1079 | 10100 C:4800-C:4fff | ||
1080 | 01100 C:5000-C:57ff | ||
1081 | 11100 C:5800-C:5fff | ||
1082 | 00010 C:C000-C:C7ff C:E000-C:ffff | ||
1083 | 10010 C:C800-C:Cfff | ||
1084 | 01010 C:D000-C:D7ff | ||
1085 | 11010 C:D800-C:Dfff | ||
1086 | 00110 D:0000-D:07ff D:2000-D:3fff | ||
1087 | 10110 D:0800-D:0fff | ||
1088 | 01110 D:1000-D:17ff | ||
1089 | 11110 D:1800-D:1fff | ||
1090 | 00001 D:4000-D:47ff D:6000-D:7fff | ||
1091 | 10001 D:4800-D:4fff | ||
1092 | 01001 D:5000-D:57ff | ||
1093 | 11001 D:5800-D:5fff | ||
1094 | 00101 D:8000-D:87ff D:A000-D:bfff | ||
1095 | 10101 D:8800-D:8fff | ||
1096 | 01101 D:9000-D:97ff | ||
1097 | 11101 D:9800-D:9fff | ||
1098 | 00011 D:C000-D:c7ff D:E000-D:ffff | ||
1099 | 10011 D:C800-D:cfff | ||
1100 | 01011 D:D000-D:d7ff | ||
1101 | 11011 D:D800-D:dfff | ||
1102 | 00111 E:0000-E:07ff E:2000-E:3fff | ||
1103 | 10111 E:0800-E:0fff | ||
1104 | 01111 E:1000-E:17ff | ||
1105 | 11111 E:1800-E:1fff | ||
1106 | |||
1107 | |||
1108 | ***************************************************************************** | ||
1109 | |||
1110 | ** PureData Corp ** | ||
1111 | PDI507 (8-bit card) | ||
1112 | -------------------- | ||
1113 | - from Mark Rejhon <mdrejhon@magi.com> (slight modifications by Avery) | ||
1114 | - Avery's note: I think PDI508 cards (but definitely NOT PDI508Plus cards) | ||
1115 | are mostly the same as this. PDI508Plus cards appear to be mainly | ||
1116 | software-configured. | ||
1117 | |||
1118 | Jumpers: | ||
1119 | There is a jumper array at the bottom of the card, near the edge | ||
1120 | connector. This array is labelled J1. They control the IRQs and | ||
1121 | something else. Put only one jumper on the IRQ pins. | ||
1122 | |||
1123 | ETS1, ETS2 are for timing on very long distance networks. See the | ||
1124 | more general information near the top of this file. | ||
1125 | |||
1126 | There is a J2 jumper on two pins. A jumper should be put on them, | ||
1127 | since it was already there when I got the card. I don't know what | ||
1128 | this jumper is for though. | ||
1129 | |||
1130 | There is a two-jumper array for J3. I don't know what it is for, | ||
1131 | but there were already two jumpers on it when I got the card. It's | ||
1132 | a six pin grid in a two-by-three fashion. The jumpers were | ||
1133 | configured as follows: | ||
1134 | |||
1135 | .-------. | ||
1136 | o | o o | | ||
1137 | :-------: ------> Accessible end of card with connectors | ||
1138 | o | o o | in this direction -------> | ||
1139 | `-------' | ||
1140 | |||
1141 | Carl de Billy <CARL@carainfo.com> explains J3 and J4: | ||
1142 | |||
1143 | J3 Diagram: | ||
1144 | |||
1145 | .-------. | ||
1146 | o | o o | | ||
1147 | :-------: TWIST Technology | ||
1148 | o | o o | | ||
1149 | `-------' | ||
1150 | .-------. | ||
1151 | | o o | o | ||
1152 | :-------: COAX Technology | ||
1153 | | o o | o | ||
1154 | `-------' | ||
1155 | |||
1156 | - If using coax cable in a bus topology the J4 jumper must be removed; | ||
1157 | place it on one pin. | ||
1158 | |||
1159 | - If using bus topology with twisted pair wiring move the J3 | ||
1160 | jumpers so they connect the middle pin and the pins closest to the RJ11 | ||
1161 | Connectors. Also the J4 jumper must be removed; place it on one pin of | ||
1162 | J4 jumper for storage. | ||
1163 | |||
1164 | - If using star topology with twisted pair wiring move the J3 | ||
1165 | jumpers so they connect the middle pin and the pins closest to the RJ11 | ||
1166 | connectors. | ||
1167 | |||
1168 | |||
1169 | DIP Switches: | ||
1170 | |||
1171 | The DIP switches accessible on the accessible end of the card while | ||
1172 | it is installed, is used to set the ARCnet address. There are 8 | ||
1173 | switches. Use an address from 1 to 254. | ||
1174 | |||
1175 | Switch No. | ||
1176 | 12345678 ARCnet address | ||
1177 | ----------------------------------------- | ||
1178 | 00000000 FF (Don't use this!) | ||
1179 | 00000001 FE | ||
1180 | 00000010 FD | ||
1181 | .... | ||
1182 | 11111101 2 | ||
1183 | 11111110 1 | ||
1184 | 11111111 0 (Don't use this!) | ||
1185 | |||
1186 | There is another array of eight DIP switches at the top of the | ||
1187 | card. There are five labelled MS0-MS4 which seem to control the | ||
1188 | memory address, and another three labelled IO0-IO2 which seem to | ||
1189 | control the base I/O address of the card. | ||
1190 | |||
1191 | This was difficult to test by trial and error, and the I/O addresses | ||
1192 | are in a weird order. This was tested by setting the DIP switches, | ||
1193 | rebooting the computer, and attempting to load ARCETHER at various | ||
1194 | addresses (mostly between 0x200 and 0x400). The address that caused | ||
1195 | the red transmit LED to blink, is the one that I thought works. | ||
1196 | |||
1197 | Also, the address 0x3D0 seem to have a special meaning, since the | ||
1198 | ARCETHER packet driver loaded fine, but without the red LED | ||
1199 | blinking. I don't know what 0x3D0 is for though. I recommend using | ||
1200 | an address of 0x300 since Windows may not like addresses below | ||
1201 | 0x300. | ||
1202 | |||
1203 | IO Switch No. | ||
1204 | 210 I/O address | ||
1205 | ------------------------------- | ||
1206 | 111 0x260 | ||
1207 | 110 0x290 | ||
1208 | 101 0x2E0 | ||
1209 | 100 0x2F0 | ||
1210 | 011 0x300 | ||
1211 | 010 0x350 | ||
1212 | 001 0x380 | ||
1213 | 000 0x3E0 | ||
1214 | |||
1215 | The memory switches set a reserved address space of 0x1000 bytes | ||
1216 | (0x100 segment units, or 4k). For example if I set an address of | ||
1217 | 0xD000, it will use up addresses 0xD000 to 0xD100. | ||
1218 | |||
1219 | The memory switches were tested by booting using QEMM386 stealth, | ||
1220 | and using LOADHI to see what address automatically became excluded | ||
1221 | from the upper memory regions, and then attempting to load ARCETHER | ||
1222 | using these addresses. | ||
1223 | |||
1224 | I recommend using an ARCnet memory address of 0xD000, and putting | ||
1225 | the EMS page frame at 0xC000 while using QEMM stealth mode. That | ||
1226 | way, you get contiguous high memory from 0xD100 almost all the way | ||
1227 | the end of the megabyte. | ||
1228 | |||
1229 | Memory Switch 0 (MS0) didn't seem to work properly when set to OFF | ||
1230 | on my card. It could be malfunctioning on my card. Experiment with | ||
1231 | it ON first, and if it doesn't work, set it to OFF. (It may be a | ||
1232 | modifier for the 0x200 bit?) | ||
1233 | |||
1234 | MS Switch No. | ||
1235 | 43210 Memory address | ||
1236 | -------------------------------- | ||
1237 | 00001 0xE100 (guessed - was not detected by QEMM) | ||
1238 | 00011 0xE000 (guessed - was not detected by QEMM) | ||
1239 | 00101 0xDD00 | ||
1240 | 00111 0xDC00 | ||
1241 | 01001 0xD900 | ||
1242 | 01011 0xD800 | ||
1243 | 01101 0xD500 | ||
1244 | 01111 0xD400 | ||
1245 | 10001 0xD100 | ||
1246 | 10011 0xD000 | ||
1247 | 10101 0xCD00 | ||
1248 | 10111 0xCC00 | ||
1249 | 11001 0xC900 (guessed - crashes tested system) | ||
1250 | 11011 0xC800 (guessed - crashes tested system) | ||
1251 | 11101 0xC500 (guessed - crashes tested system) | ||
1252 | 11111 0xC400 (guessed - crashes tested system) | ||
1253 | |||
1254 | |||
1255 | ***************************************************************************** | ||
1256 | |||
1257 | ** CNet Technology Inc. ** | ||
1258 | 120 Series (8-bit cards) | ||
1259 | ------------------------ | ||
1260 | - from Juergen Seifert <seifert@htwm.de> | ||
1261 | |||
1262 | |||
1263 | CNET TECHNOLOGY INC. (CNet) ARCNET 120A SERIES | ||
1264 | ============================================== | ||
1265 | |||
1266 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
1267 | using information from the following Original CNet Manual | ||
1268 | |||
1269 | "ARCNET | ||
1270 | USER'S MANUAL | ||
1271 | for | ||
1272 | CN120A | ||
1273 | CN120AB | ||
1274 | CN120TP | ||
1275 | CN120ST | ||
1276 | CN120SBT | ||
1277 | P/N:12-01-0007 | ||
1278 | Revision 3.00" | ||
1279 | |||
1280 | ARCNET is a registered trademark of the Datapoint Corporation | ||
1281 | |||
1282 | P/N 120A ARCNET 8 bit XT/AT Star | ||
1283 | P/N 120AB ARCNET 8 bit XT/AT Bus | ||
1284 | P/N 120TP ARCNET 8 bit XT/AT Twisted Pair | ||
1285 | P/N 120ST ARCNET 8 bit XT/AT Star, Twisted Pair | ||
1286 | P/N 120SBT ARCNET 8 bit XT/AT Star, Bus, Twisted Pair | ||
1287 | |||
1288 | __________________________________________________________________ | ||
1289 | | | | ||
1290 | | ___| | ||
1291 | | LED |___| | ||
1292 | | ___| | ||
1293 | | N | | ID7 | ||
1294 | | o | | ID6 | ||
1295 | | d | S | ID5 | ||
1296 | | e | W | ID4 | ||
1297 | | ___________________ A | 2 | ID3 | ||
1298 | | | | d | | ID2 | ||
1299 | | | | 1 2 3 4 5 6 7 8 d | | ID1 | ||
1300 | | | | _________________ r |___| ID0 | ||
1301 | | | 90C65 || SW1 | ____| | ||
1302 | | JP 8 7 | ||_________________| | | | ||
1303 | | |o|o| JP1 | | | J2 | | ||
1304 | | |o|o| |oo| | | JP 1 1 1 | | | ||
1305 | | ______________ | | 0 1 2 |____| | ||
1306 | | | PROM | |___________________| |o|o|o| _____| | ||
1307 | | > SOCKET | JP 6 5 4 3 2 |o|o|o| | J1 | | ||
1308 | | |______________| |o|o|o|o|o| |o|o|o| |_____| | ||
1309 | |_____ |o|o|o|o|o| ______________| | ||
1310 | | | | ||
1311 | |_____________________________________________| | ||
1312 | |||
1313 | Legend: | ||
1314 | |||
1315 | 90C65 ARCNET Probe | ||
1316 | S1 1-5: Base Memory Address Select | ||
1317 | 6-8: Base I/O Address Select | ||
1318 | S2 1-8: Node ID Select (ID0-ID7) | ||
1319 | JP1 ROM Enable Select | ||
1320 | JP2 IRQ2 | ||
1321 | JP3 IRQ3 | ||
1322 | JP4 IRQ4 | ||
1323 | JP5 IRQ5 | ||
1324 | JP6 IRQ7 | ||
1325 | JP7/JP8 ET1, ET2 Timeout Parameters | ||
1326 | JP10/JP11 Coax / Twisted Pair Select (CN120ST/SBT only) | ||
1327 | JP12 Terminator Select (CN120AB/ST/SBT only) | ||
1328 | J1 BNC RG62/U Connector (all except CN120TP) | ||
1329 | J2 Two 6-position Telephone Jack (CN120TP/ST/SBT only) | ||
1330 | |||
1331 | Setting one of the switches to Off means "1", On means "0". | ||
1332 | |||
1333 | |||
1334 | Setting the Node ID | ||
1335 | ------------------- | ||
1336 | |||
1337 | The eight switches in SW2 are used to set the node ID. Each node attached | ||
1338 | to the network must have an unique node ID which must be different from 0. | ||
1339 | Switch 1 (ID0) serves as the least significant bit (LSB). | ||
1340 | |||
1341 | The node ID is the sum of the values of all switches set to "1" | ||
1342 | These values are: | ||
1343 | |||
1344 | Switch | Label | Value | ||
1345 | -------|-------|------- | ||
1346 | 1 | ID0 | 1 | ||
1347 | 2 | ID1 | 2 | ||
1348 | 3 | ID2 | 4 | ||
1349 | 4 | ID3 | 8 | ||
1350 | 5 | ID4 | 16 | ||
1351 | 6 | ID5 | 32 | ||
1352 | 7 | ID6 | 64 | ||
1353 | 8 | ID7 | 128 | ||
1354 | |||
1355 | Some Examples: | ||
1356 | |||
1357 | Switch | Hex | Decimal | ||
1358 | 8 7 6 5 4 3 2 1 | Node ID | Node ID | ||
1359 | ----------------|---------|--------- | ||
1360 | 0 0 0 0 0 0 0 0 | not allowed | ||
1361 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
1362 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
1363 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
1364 | . . . | | | ||
1365 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
1366 | . . . | | | ||
1367 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
1368 | . . . | | | ||
1369 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
1370 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
1371 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
1372 | |||
1373 | |||
1374 | Setting the I/O Base Address | ||
1375 | ---------------------------- | ||
1376 | |||
1377 | The last three switches in switch block SW1 are used to select one | ||
1378 | of eight possible I/O Base addresses using the following table | ||
1379 | |||
1380 | |||
1381 | Switch | Hex I/O | ||
1382 | 6 7 8 | Address | ||
1383 | ------------|-------- | ||
1384 | ON ON ON | 260 | ||
1385 | OFF ON ON | 290 | ||
1386 | ON OFF ON | 2E0 (Manufacturer's default) | ||
1387 | OFF OFF ON | 2F0 | ||
1388 | ON ON OFF | 300 | ||
1389 | OFF ON OFF | 350 | ||
1390 | ON OFF OFF | 380 | ||
1391 | OFF OFF OFF | 3E0 | ||
1392 | |||
1393 | |||
1394 | Setting the Base Memory (RAM) buffer Address | ||
1395 | -------------------------------------------- | ||
1396 | |||
1397 | The memory buffer (RAM) requires 2K. The base of this buffer can be | ||
1398 | located in any of eight positions. The address of the Boot Prom is | ||
1399 | memory base + 8K or memory base + 0x2000. | ||
1400 | Switches 1-5 of switch block SW1 select the Memory Base address. | ||
1401 | |||
1402 | Switch | Hex RAM | Hex ROM | ||
1403 | 1 2 3 4 5 | Address | Address *) | ||
1404 | --------------------|---------|----------- | ||
1405 | ON ON ON ON ON | C0000 | C2000 | ||
1406 | ON ON OFF ON ON | C4000 | C6000 | ||
1407 | ON ON ON OFF ON | CC000 | CE000 | ||
1408 | ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default) | ||
1409 | ON ON ON ON OFF | D4000 | D6000 | ||
1410 | ON ON OFF ON OFF | D8000 | DA000 | ||
1411 | ON ON ON OFF OFF | DC000 | DE000 | ||
1412 | ON ON OFF OFF OFF | E0000 | E2000 | ||
1413 | |||
1414 | *) To enable the Boot ROM install the jumper JP1 | ||
1415 | |||
1416 | Note: Since the switches 1 and 2 are always set to ON it may be possible | ||
1417 | that they can be used to add an offset of 2K, 4K or 6K to the base | ||
1418 | address, but this feature is not documented in the manual and I | ||
1419 | haven't tested it yet. | ||
1420 | |||
1421 | |||
1422 | Setting the Interrupt Line | ||
1423 | -------------------------- | ||
1424 | |||
1425 | To select a hardware interrupt level install one (only one!) of the jumpers | ||
1426 | JP2, JP3, JP4, JP5, JP6. JP2 is the default. | ||
1427 | |||
1428 | Jumper | IRQ | ||
1429 | -------|----- | ||
1430 | 2 | 2 | ||
1431 | 3 | 3 | ||
1432 | 4 | 4 | ||
1433 | 5 | 5 | ||
1434 | 6 | 7 | ||
1435 | |||
1436 | |||
1437 | Setting the Internal Terminator on CN120AB/TP/SBT | ||
1438 | -------------------------------------------------- | ||
1439 | |||
1440 | The jumper JP12 is used to enable the internal terminator. | ||
1441 | |||
1442 | ----- | ||
1443 | 0 | 0 | | ||
1444 | ----- ON | | ON | ||
1445 | | 0 | | 0 | | ||
1446 | | | OFF ----- OFF | ||
1447 | | 0 | 0 | ||
1448 | ----- | ||
1449 | Terminator Terminator | ||
1450 | disabled enabled | ||
1451 | |||
1452 | |||
1453 | Selecting the Connector Type on CN120ST/SBT | ||
1454 | ------------------------------------------- | ||
1455 | |||
1456 | JP10 JP11 JP10 JP11 | ||
1457 | ----- ----- | ||
1458 | 0 0 | 0 | | 0 | | ||
1459 | ----- ----- | | | | | ||
1460 | | 0 | | 0 | | 0 | | 0 | | ||
1461 | | | | | ----- ----- | ||
1462 | | 0 | | 0 | 0 0 | ||
1463 | ----- ----- | ||
1464 | Coaxial Cable Twisted Pair Cable | ||
1465 | (Default) | ||
1466 | |||
1467 | |||
1468 | Setting the Timeout Parameters | ||
1469 | ------------------------------ | ||
1470 | |||
1471 | The jumpers labeled EXT1 and EXT2 are used to determine the timeout | ||
1472 | parameters. These two jumpers are normally left open. | ||
1473 | |||
1474 | |||
1475 | |||
1476 | ***************************************************************************** | ||
1477 | |||
1478 | ** CNet Technology Inc. ** | ||
1479 | 160 Series (16-bit cards) | ||
1480 | ------------------------- | ||
1481 | - from Juergen Seifert <seifert@htwm.de> | ||
1482 | |||
1483 | CNET TECHNOLOGY INC. (CNet) ARCNET 160A SERIES | ||
1484 | ============================================== | ||
1485 | |||
1486 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
1487 | using information from the following Original CNet Manual | ||
1488 | |||
1489 | "ARCNET | ||
1490 | USER'S MANUAL | ||
1491 | for | ||
1492 | CN160A | ||
1493 | CN160AB | ||
1494 | CN160TP | ||
1495 | P/N:12-01-0006 | ||
1496 | Revision 3.00" | ||
1497 | |||
1498 | ARCNET is a registered trademark of the Datapoint Corporation | ||
1499 | |||
1500 | P/N 160A ARCNET 16 bit XT/AT Star | ||
1501 | P/N 160AB ARCNET 16 bit XT/AT Bus | ||
1502 | P/N 160TP ARCNET 16 bit XT/AT Twisted Pair | ||
1503 | |||
1504 | ___________________________________________________________________ | ||
1505 | < _________________________ ___| | ||
1506 | > |oo| JP2 | | LED |___| | ||
1507 | < |oo| JP1 | 9026 | LED |___| | ||
1508 | > |_________________________| ___| | ||
1509 | < N | | ID7 | ||
1510 | > 1 o | | ID6 | ||
1511 | < 1 2 3 4 5 6 7 8 9 0 d | S | ID5 | ||
1512 | > _______________ _____________________ e | W | ID4 | ||
1513 | < | PROM | | SW1 | A | 2 | ID3 | ||
1514 | > > SOCKET | |_____________________| d | | ID2 | ||
1515 | < |_______________| | IO-Base | MEM | d | | ID1 | ||
1516 | > r |___| ID0 | ||
1517 | < ____| | ||
1518 | > | | | ||
1519 | < | J1 | | ||
1520 | > | | | ||
1521 | < |____| | ||
1522 | > 1 1 1 1 | | ||
1523 | < 3 4 5 6 7 JP 8 9 0 1 2 3 | | ||
1524 | > |o|o|o|o|o| |o|o|o|o|o|o| | | ||
1525 | < |o|o|o|o|o| __ |o|o|o|o|o|o| ___________| | ||
1526 | > | | | | ||
1527 | <____________| |_______________________________________| | ||
1528 | |||
1529 | Legend: | ||
1530 | |||
1531 | 9026 ARCNET Probe | ||
1532 | SW1 1-6: Base I/O Address Select | ||
1533 | 7-10: Base Memory Address Select | ||
1534 | SW2 1-8: Node ID Select (ID0-ID7) | ||
1535 | JP1/JP2 ET1, ET2 Timeout Parameters | ||
1536 | JP3-JP13 Interrupt Select | ||
1537 | J1 BNC RG62/U Connector (CN160A/AB only) | ||
1538 | J1 Two 6-position Telephone Jack (CN160TP only) | ||
1539 | LED | ||
1540 | |||
1541 | Setting one of the switches to Off means "1", On means "0". | ||
1542 | |||
1543 | |||
1544 | Setting the Node ID | ||
1545 | ------------------- | ||
1546 | |||
1547 | The eight switches in SW2 are used to set the node ID. Each node attached | ||
1548 | to the network must have an unique node ID which must be different from 0. | ||
1549 | Switch 1 (ID0) serves as the least significant bit (LSB). | ||
1550 | |||
1551 | The node ID is the sum of the values of all switches set to "1" | ||
1552 | These values are: | ||
1553 | |||
1554 | Switch | Label | Value | ||
1555 | -------|-------|------- | ||
1556 | 1 | ID0 | 1 | ||
1557 | 2 | ID1 | 2 | ||
1558 | 3 | ID2 | 4 | ||
1559 | 4 | ID3 | 8 | ||
1560 | 5 | ID4 | 16 | ||
1561 | 6 | ID5 | 32 | ||
1562 | 7 | ID6 | 64 | ||
1563 | 8 | ID7 | 128 | ||
1564 | |||
1565 | Some Examples: | ||
1566 | |||
1567 | Switch | Hex | Decimal | ||
1568 | 8 7 6 5 4 3 2 1 | Node ID | Node ID | ||
1569 | ----------------|---------|--------- | ||
1570 | 0 0 0 0 0 0 0 0 | not allowed | ||
1571 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
1572 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
1573 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
1574 | . . . | | | ||
1575 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
1576 | . . . | | | ||
1577 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
1578 | . . . | | | ||
1579 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
1580 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
1581 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
1582 | |||
1583 | |||
1584 | Setting the I/O Base Address | ||
1585 | ---------------------------- | ||
1586 | |||
1587 | The first six switches in switch block SW1 are used to select the I/O Base | ||
1588 | address using the following table: | ||
1589 | |||
1590 | Switch | Hex I/O | ||
1591 | 1 2 3 4 5 6 | Address | ||
1592 | ------------------------|-------- | ||
1593 | OFF ON ON OFF OFF ON | 260 | ||
1594 | OFF ON OFF ON ON OFF | 290 | ||
1595 | OFF ON OFF OFF OFF ON | 2E0 (Manufacturer's default) | ||
1596 | OFF ON OFF OFF OFF OFF | 2F0 | ||
1597 | OFF OFF ON ON ON ON | 300 | ||
1598 | OFF OFF ON OFF ON OFF | 350 | ||
1599 | OFF OFF OFF ON ON ON | 380 | ||
1600 | OFF OFF OFF OFF OFF ON | 3E0 | ||
1601 | |||
1602 | Note: Other IO-Base addresses seem to be selectable, but only the above | ||
1603 | combinations are documented. | ||
1604 | |||
1605 | |||
1606 | Setting the Base Memory (RAM) buffer Address | ||
1607 | -------------------------------------------- | ||
1608 | |||
1609 | The switches 7-10 of switch block SW1 are used to select the Memory | ||
1610 | Base address of the RAM (2K) and the PROM. | ||
1611 | |||
1612 | Switch | Hex RAM | Hex ROM | ||
1613 | 7 8 9 10 | Address | Address | ||
1614 | ----------------|---------|----------- | ||
1615 | OFF OFF ON ON | C0000 | C8000 | ||
1616 | OFF OFF ON OFF | D0000 | D8000 (Default) | ||
1617 | OFF OFF OFF ON | E0000 | E8000 | ||
1618 | |||
1619 | Note: Other MEM-Base addresses seem to be selectable, but only the above | ||
1620 | combinations are documented. | ||
1621 | |||
1622 | |||
1623 | Setting the Interrupt Line | ||
1624 | -------------------------- | ||
1625 | |||
1626 | To select a hardware interrupt level install one (only one!) of the jumpers | ||
1627 | JP3 through JP13 using the following table: | ||
1628 | |||
1629 | Jumper | IRQ | ||
1630 | -------|----------------- | ||
1631 | 3 | 14 | ||
1632 | 4 | 15 | ||
1633 | 5 | 12 | ||
1634 | 6 | 11 | ||
1635 | 7 | 10 | ||
1636 | 8 | 3 | ||
1637 | 9 | 4 | ||
1638 | 10 | 5 | ||
1639 | 11 | 6 | ||
1640 | 12 | 7 | ||
1641 | 13 | 2 (=9) Default! | ||
1642 | |||
1643 | Note: - Do not use JP11=IRQ6, it may conflict with your Floppy Disk | ||
1644 | Controller | ||
1645 | - Use JP3=IRQ14 only, if you don't have an IDE-, MFM-, or RLL- | ||
1646 | Hard Disk, it may conflict with their controllers | ||
1647 | |||
1648 | |||
1649 | Setting the Timeout Parameters | ||
1650 | ------------------------------ | ||
1651 | |||
1652 | The jumpers labeled JP1 and JP2 are used to determine the timeout | ||
1653 | parameters. These two jumpers are normally left open. | ||
1654 | |||
1655 | |||
1656 | ***************************************************************************** | ||
1657 | |||
1658 | ** Lantech ** | ||
1659 | 8-bit card, unknown model | ||
1660 | ------------------------- | ||
1661 | - from Vlad Lungu <vlungu@ugal.ro> - his e-mail address seemed broken at | ||
1662 | the time I tried to reach him. Sorry Vlad, if you didn't get my reply. | ||
1663 | |||
1664 | ________________________________________________________________ | ||
1665 | | 1 8 | | ||
1666 | | ___________ __| | ||
1667 | | | SW1 | LED |__| | ||
1668 | | |__________| | | ||
1669 | | ___| | ||
1670 | | _____________________ |S | 8 | ||
1671 | | | | |W | | ||
1672 | | | | |2 | | ||
1673 | | | | |__| 1 | ||
1674 | | | UM9065L | |o| JP4 ____|____ | ||
1675 | | | | |o| | CN | | ||
1676 | | | | |________| | ||
1677 | | | | | | ||
1678 | | |___________________| | | ||
1679 | | | | ||
1680 | | | | ||
1681 | | _____________ | | ||
1682 | | | | | | ||
1683 | | | PROM | |ooooo| JP6 | | ||
1684 | | |____________| |ooooo| | | ||
1685 | |_____________ _ _| | ||
1686 | |____________________________________________| |__| | ||
1687 | |||
1688 | |||
1689 | UM9065L : ARCnet Controller | ||
1690 | |||
1691 | SW 1 : Shared Memory Address and I/O Base | ||
1692 | |||
1693 | ON=0 | ||
1694 | |||
1695 | 12345|Memory Address | ||
1696 | -----|-------------- | ||
1697 | 00001| D4000 | ||
1698 | 00010| CC000 | ||
1699 | 00110| D0000 | ||
1700 | 01110| D1000 | ||
1701 | 01101| D9000 | ||
1702 | 10010| CC800 | ||
1703 | 10011| DC800 | ||
1704 | 11110| D1800 | ||
1705 | |||
1706 | It seems that the bits are considered in reverse order. Also, you must | ||
1707 | observe that some of those addresses are unusual and I didn't probe them; I | ||
1708 | used a memory dump in DOS to identify them. For the 00000 configuration and | ||
1709 | some others that I didn't write here the card seems to conflict with the | ||
1710 | video card (an S3 GENDAC). I leave the full decoding of those addresses to | ||
1711 | you. | ||
1712 | |||
1713 | 678| I/O Address | ||
1714 | ---|------------ | ||
1715 | 000| 260 | ||
1716 | 001| failed probe | ||
1717 | 010| 2E0 | ||
1718 | 011| 380 | ||
1719 | 100| 290 | ||
1720 | 101| 350 | ||
1721 | 110| failed probe | ||
1722 | 111| 3E0 | ||
1723 | |||
1724 | SW 2 : Node ID (binary coded) | ||
1725 | |||
1726 | JP 4 : Boot PROM enable CLOSE - enabled | ||
1727 | OPEN - disabled | ||
1728 | |||
1729 | JP 6 : IRQ set (ONLY ONE jumper on 1-5 for IRQ 2-6) | ||
1730 | |||
1731 | |||
1732 | ***************************************************************************** | ||
1733 | |||
1734 | ** Acer ** | ||
1735 | 8-bit card, Model 5210-003 | ||
1736 | -------------------------- | ||
1737 | - from Vojtech Pavlik <vojtech@suse.cz> using portions of the existing | ||
1738 | arcnet-hardware file. | ||
1739 | |||
1740 | This is a 90C26 based card. Its configuration seems similar to the SMC | ||
1741 | PC100, but has some additional jumpers I don't know the meaning of. | ||
1742 | |||
1743 | __ | ||
1744 | | | | ||
1745 | ___________|__|_________________________ | ||
1746 | | | | | | ||
1747 | | | BNC | | | ||
1748 | | |______| ___| | ||
1749 | | _____________________ |___ | ||
1750 | | | | | | ||
1751 | | | Hybrid IC | | | ||
1752 | | | | o|o J1 | | ||
1753 | | |_____________________| 8|8 | | ||
1754 | | 8|8 J5 | | ||
1755 | | o|o | | ||
1756 | | 8|8 | | ||
1757 | |__ 8|8 | | ||
1758 | (|__| LED o|o | | ||
1759 | | 8|8 | | ||
1760 | | 8|8 J15 | | ||
1761 | | | | ||
1762 | | _____ | | ||
1763 | | | | _____ | | ||
1764 | | | | | | ___| | ||
1765 | | | | | | | | ||
1766 | | _____ | ROM | | UFS | | | ||
1767 | | | | | | | | | | ||
1768 | | | | ___ | | | | | | ||
1769 | | | | | | |__.__| |__.__| | | ||
1770 | | | NCR | |XTL| _____ _____ | | ||
1771 | | | | |___| | | | | | | ||
1772 | | |90C26| | | | | | | ||
1773 | | | | | RAM | | UFS | | | ||
1774 | | | | J17 o|o | | | | | | ||
1775 | | | | J16 o|o | | | | | | ||
1776 | | |__.__| |__.__| |__.__| | | ||
1777 | | ___ | | ||
1778 | | | |8 | | ||
1779 | | |SW2| | | ||
1780 | | | | | | ||
1781 | | |___|1 | | ||
1782 | | ___ | | ||
1783 | | | |10 J18 o|o | | ||
1784 | | | | o|o | | ||
1785 | | |SW1| o|o | | ||
1786 | | | | J21 o|o | | ||
1787 | | |___|1 | | ||
1788 | | | | ||
1789 | |____________________________________| | ||
1790 | |||
1791 | |||
1792 | Legend: | ||
1793 | |||
1794 | 90C26 ARCNET Chip | ||
1795 | XTL 20 MHz Crystal | ||
1796 | SW1 1-6 Base I/O Address Select | ||
1797 | 7-10 Memory Address Select | ||
1798 | SW2 1-8 Node ID Select (ID0-ID7) | ||
1799 | J1-J5 IRQ Select | ||
1800 | J6-J21 Unknown (Probably extra timeouts & ROM enable ...) | ||
1801 | LED1 Activity LED | ||
1802 | BNC Coax connector (STAR ARCnet) | ||
1803 | RAM 2k of SRAM | ||
1804 | ROM Boot ROM socket | ||
1805 | UFS Unidentified Flying Sockets | ||
1806 | |||
1807 | |||
1808 | Setting the Node ID | ||
1809 | ------------------- | ||
1810 | |||
1811 | The eight switches in SW2 are used to set the node ID. Each node attached | ||
1812 | to the network must have an unique node ID which must not be 0. | ||
1813 | Switch 1 (ID0) serves as the least significant bit (LSB). | ||
1814 | |||
1815 | Setting one of the switches to OFF means "1", ON means "0". | ||
1816 | |||
1817 | The node ID is the sum of the values of all switches set to "1" | ||
1818 | These values are: | ||
1819 | |||
1820 | Switch | Value | ||
1821 | -------|------- | ||
1822 | 1 | 1 | ||
1823 | 2 | 2 | ||
1824 | 3 | 4 | ||
1825 | 4 | 8 | ||
1826 | 5 | 16 | ||
1827 | 6 | 32 | ||
1828 | 7 | 64 | ||
1829 | 8 | 128 | ||
1830 | |||
1831 | Don't set this to 0 or 255; these values are reserved. | ||
1832 | |||
1833 | |||
1834 | Setting the I/O Base Address | ||
1835 | ---------------------------- | ||
1836 | |||
1837 | The switches 1 to 6 of switch block SW1 are used to select one | ||
1838 | of 32 possible I/O Base addresses using the following tables | ||
1839 | |||
1840 | | Hex | ||
1841 | Switch | Value | ||
1842 | -------|------- | ||
1843 | 1 | 200 | ||
1844 | 2 | 100 | ||
1845 | 3 | 80 | ||
1846 | 4 | 40 | ||
1847 | 5 | 20 | ||
1848 | 6 | 10 | ||
1849 | |||
1850 | The I/O address is sum of all switches set to "1". Remember that | ||
1851 | the I/O address space bellow 0x200 is RESERVED for mainboard, so | ||
1852 | switch 1 should be ALWAYS SET TO OFF. | ||
1853 | |||
1854 | |||
1855 | Setting the Base Memory (RAM) buffer Address | ||
1856 | -------------------------------------------- | ||
1857 | |||
1858 | The memory buffer (RAM) requires 2K. The base of this buffer can be | ||
1859 | located in any of sixteen positions. However, the addresses below | ||
1860 | A0000 are likely to cause system hang because there's main RAM. | ||
1861 | |||
1862 | Jumpers 7-10 of switch block SW1 select the Memory Base address. | ||
1863 | |||
1864 | Switch | Hex RAM | ||
1865 | 7 8 9 10 | Address | ||
1866 | ----------------|--------- | ||
1867 | OFF OFF OFF OFF | F0000 (conflicts with main BIOS) | ||
1868 | OFF OFF OFF ON | E0000 | ||
1869 | OFF OFF ON OFF | D0000 | ||
1870 | OFF OFF ON ON | C0000 (conflicts with video BIOS) | ||
1871 | OFF ON OFF OFF | B0000 (conflicts with mono video) | ||
1872 | OFF ON OFF ON | A0000 (conflicts with graphics) | ||
1873 | |||
1874 | |||
1875 | Setting the Interrupt Line | ||
1876 | -------------------------- | ||
1877 | |||
1878 | Jumpers 1-5 of the jumper block J1 control the IRQ level. ON means | ||
1879 | shorted, OFF means open. | ||
1880 | |||
1881 | Jumper | IRQ | ||
1882 | 1 2 3 4 5 | | ||
1883 | ---------------------------- | ||
1884 | ON OFF OFF OFF OFF | 7 | ||
1885 | OFF ON OFF OFF OFF | 5 | ||
1886 | OFF OFF ON OFF OFF | 4 | ||
1887 | OFF OFF OFF ON OFF | 3 | ||
1888 | OFF OFF OFF OFF ON | 2 | ||
1889 | |||
1890 | |||
1891 | Unknown jumpers & sockets | ||
1892 | ------------------------- | ||
1893 | |||
1894 | I know nothing about these. I just guess that J16&J17 are timeout | ||
1895 | jumpers and maybe one of J18-J21 selects ROM. Also J6-J10 and | ||
1896 | J11-J15 are connecting IRQ2-7 to some pins on the UFSs. I can't | ||
1897 | guess the purpose. | ||
1898 | |||
1899 | |||
1900 | ***************************************************************************** | ||
1901 | |||
1902 | ** Datapoint? ** | ||
1903 | LAN-ARC-8, an 8-bit card | ||
1904 | ------------------------ | ||
1905 | - from Vojtech Pavlik <vojtech@suse.cz> | ||
1906 | |||
1907 | This is another SMC 90C65-based ARCnet card. I couldn't identify the | ||
1908 | manufacturer, but it might be DataPoint, because the card has the | ||
1909 | original arcNet logo in its upper right corner. | ||
1910 | |||
1911 | _______________________________________________________ | ||
1912 | | _________ | | ||
1913 | | | SW2 | ON arcNet | | ||
1914 | | |_________| OFF ___| | ||
1915 | | _____________ 1 ______ 8 | | 8 | ||
1916 | | | | SW1 | XTAL | ____________ | S | | ||
1917 | | > RAM (2k) | |______|| | | W | | ||
1918 | | |_____________| | H | | 3 | | ||
1919 | | _________|_____ y | |___| 1 | ||
1920 | | _________ | | |b | | | ||
1921 | | |_________| | | |r | | | ||
1922 | | | SMC | |i | | | ||
1923 | | | 90C65| |d | | | ||
1924 | | _________ | | | | | | ||
1925 | | | SW1 | ON | | |I | | | ||
1926 | | |_________| OFF |_________|_____/C | _____| | ||
1927 | | 1 8 | | | |___ | ||
1928 | | ______________ | | | BNC |___| | ||
1929 | | | | |____________| |_____| | ||
1930 | | > EPROM SOCKET | _____________ | | ||
1931 | | |______________| |_____________| | | ||
1932 | | ______________| | ||
1933 | | | | ||
1934 | |________________________________________| | ||
1935 | |||
1936 | Legend: | ||
1937 | |||
1938 | 90C65 ARCNET Chip | ||
1939 | SW1 1-5: Base Memory Address Select | ||
1940 | 6-8: Base I/O Address Select | ||
1941 | SW2 1-8: Node ID Select | ||
1942 | SW3 1-5: IRQ Select | ||
1943 | 6-7: Extra Timeout | ||
1944 | 8 : ROM Enable | ||
1945 | BNC Coax connector | ||
1946 | XTAL 20 MHz Crystal | ||
1947 | |||
1948 | |||
1949 | Setting the Node ID | ||
1950 | ------------------- | ||
1951 | |||
1952 | The eight switches in SW3 are used to set the node ID. Each node attached | ||
1953 | to the network must have an unique node ID which must not be 0. | ||
1954 | Switch 1 serves as the least significant bit (LSB). | ||
1955 | |||
1956 | Setting one of the switches to Off means "1", On means "0". | ||
1957 | |||
1958 | The node ID is the sum of the values of all switches set to "1" | ||
1959 | These values are: | ||
1960 | |||
1961 | Switch | Value | ||
1962 | -------|------- | ||
1963 | 1 | 1 | ||
1964 | 2 | 2 | ||
1965 | 3 | 4 | ||
1966 | 4 | 8 | ||
1967 | 5 | 16 | ||
1968 | 6 | 32 | ||
1969 | 7 | 64 | ||
1970 | 8 | 128 | ||
1971 | |||
1972 | |||
1973 | Setting the I/O Base Address | ||
1974 | ---------------------------- | ||
1975 | |||
1976 | The last three switches in switch block SW1 are used to select one | ||
1977 | of eight possible I/O Base addresses using the following table | ||
1978 | |||
1979 | |||
1980 | Switch | Hex I/O | ||
1981 | 6 7 8 | Address | ||
1982 | ------------|-------- | ||
1983 | ON ON ON | 260 | ||
1984 | OFF ON ON | 290 | ||
1985 | ON OFF ON | 2E0 (Manufacturer's default) | ||
1986 | OFF OFF ON | 2F0 | ||
1987 | ON ON OFF | 300 | ||
1988 | OFF ON OFF | 350 | ||
1989 | ON OFF OFF | 380 | ||
1990 | OFF OFF OFF | 3E0 | ||
1991 | |||
1992 | |||
1993 | Setting the Base Memory (RAM) buffer Address | ||
1994 | -------------------------------------------- | ||
1995 | |||
1996 | The memory buffer (RAM) requires 2K. The base of this buffer can be | ||
1997 | located in any of eight positions. The address of the Boot Prom is | ||
1998 | memory base + 0x2000. | ||
1999 | Jumpers 3-5 of switch block SW1 select the Memory Base address. | ||
2000 | |||
2001 | Switch | Hex RAM | Hex ROM | ||
2002 | 1 2 3 4 5 | Address | Address *) | ||
2003 | --------------------|---------|----------- | ||
2004 | ON ON ON ON ON | C0000 | C2000 | ||
2005 | ON ON OFF ON ON | C4000 | C6000 | ||
2006 | ON ON ON OFF ON | CC000 | CE000 | ||
2007 | ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default) | ||
2008 | ON ON ON ON OFF | D4000 | D6000 | ||
2009 | ON ON OFF ON OFF | D8000 | DA000 | ||
2010 | ON ON ON OFF OFF | DC000 | DE000 | ||
2011 | ON ON OFF OFF OFF | E0000 | E2000 | ||
2012 | |||
2013 | *) To enable the Boot ROM set the switch 8 of switch block SW3 to position ON. | ||
2014 | |||
2015 | The switches 1 and 2 probably add 0x0800 and 0x1000 to RAM base address. | ||
2016 | |||
2017 | |||
2018 | Setting the Interrupt Line | ||
2019 | -------------------------- | ||
2020 | |||
2021 | Switches 1-5 of the switch block SW3 control the IRQ level. | ||
2022 | |||
2023 | Jumper | IRQ | ||
2024 | 1 2 3 4 5 | | ||
2025 | ---------------------------- | ||
2026 | ON OFF OFF OFF OFF | 3 | ||
2027 | OFF ON OFF OFF OFF | 4 | ||
2028 | OFF OFF ON OFF OFF | 5 | ||
2029 | OFF OFF OFF ON OFF | 7 | ||
2030 | OFF OFF OFF OFF ON | 2 | ||
2031 | |||
2032 | |||
2033 | Setting the Timeout Parameters | ||
2034 | ------------------------------ | ||
2035 | |||
2036 | The switches 6-7 of the switch block SW3 are used to determine the timeout | ||
2037 | parameters. These two switches are normally left in the OFF position. | ||
2038 | |||
2039 | |||
2040 | ***************************************************************************** | ||
2041 | |||
2042 | ** Topware ** | ||
2043 | 8-bit card, TA-ARC/10 | ||
2044 | ------------------------- | ||
2045 | - from Vojtech Pavlik <vojtech@suse.cz> | ||
2046 | |||
2047 | This is another very similar 90C65 card. Most of the switches and jumpers | ||
2048 | are the same as on other clones. | ||
2049 | |||
2050 | _____________________________________________________________________ | ||
2051 | | ___________ | | ______ | | ||
2052 | | |SW2 NODE ID| | | | XTAL | | | ||
2053 | | |___________| | Hybrid IC | |______| | | ||
2054 | | ___________ | | __| | ||
2055 | | |SW1 MEM+I/O| |_________________________| LED1|__|) | ||
2056 | | |___________| 1 2 | | ||
2057 | | J3 |o|o| TIMEOUT ______| | ||
2058 | | ______________ |o|o| | | | ||
2059 | | | | ___________________ | RJ | | ||
2060 | | > EPROM SOCKET | | \ |------| | ||
2061 | |J2 |______________| | | | | | ||
2062 | ||o| | | |______| | ||
2063 | ||o| ROM ENABLE | SMC | _________ | | ||
2064 | | _____________ | 90C65 | |_________| _____| | ||
2065 | | | | | | | |___ | ||
2066 | | > RAM (2k) | | | | BNC |___| | ||
2067 | | |_____________| | | |_____| | ||
2068 | | |____________________| | | ||
2069 | | ________ IRQ 2 3 4 5 7 ___________ | | ||
2070 | ||________| |o|o|o|o|o| |___________| | | ||
2071 | |________ J1|o|o|o|o|o| ______________| | ||
2072 | | | | ||
2073 | |_____________________________________________| | ||
2074 | |||
2075 | Legend: | ||
2076 | |||
2077 | 90C65 ARCNET Chip | ||
2078 | XTAL 20 MHz Crystal | ||
2079 | SW1 1-5 Base Memory Address Select | ||
2080 | 6-8 Base I/O Address Select | ||
2081 | SW2 1-8 Node ID Select (ID0-ID7) | ||
2082 | J1 IRQ Select | ||
2083 | J2 ROM Enable | ||
2084 | J3 Extra Timeout | ||
2085 | LED1 Activity LED | ||
2086 | BNC Coax connector (BUS ARCnet) | ||
2087 | RJ Twisted Pair Connector (daisy chain) | ||
2088 | |||
2089 | |||
2090 | Setting the Node ID | ||
2091 | ------------------- | ||
2092 | |||
2093 | The eight switches in SW2 are used to set the node ID. Each node attached to | ||
2094 | the network must have an unique node ID which must not be 0. Switch 1 (ID0) | ||
2095 | serves as the least significant bit (LSB). | ||
2096 | |||
2097 | Setting one of the switches to Off means "1", On means "0". | ||
2098 | |||
2099 | The node ID is the sum of the values of all switches set to "1" | ||
2100 | These values are: | ||
2101 | |||
2102 | Switch | Label | Value | ||
2103 | -------|-------|------- | ||
2104 | 1 | ID0 | 1 | ||
2105 | 2 | ID1 | 2 | ||
2106 | 3 | ID2 | 4 | ||
2107 | 4 | ID3 | 8 | ||
2108 | 5 | ID4 | 16 | ||
2109 | 6 | ID5 | 32 | ||
2110 | 7 | ID6 | 64 | ||
2111 | 8 | ID7 | 128 | ||
2112 | |||
2113 | Setting the I/O Base Address | ||
2114 | ---------------------------- | ||
2115 | |||
2116 | The last three switches in switch block SW1 are used to select one | ||
2117 | of eight possible I/O Base addresses using the following table: | ||
2118 | |||
2119 | |||
2120 | Switch | Hex I/O | ||
2121 | 6 7 8 | Address | ||
2122 | ------------|-------- | ||
2123 | ON ON ON | 260 (Manufacturer's default) | ||
2124 | OFF ON ON | 290 | ||
2125 | ON OFF ON | 2E0 | ||
2126 | OFF OFF ON | 2F0 | ||
2127 | ON ON OFF | 300 | ||
2128 | OFF ON OFF | 350 | ||
2129 | ON OFF OFF | 380 | ||
2130 | OFF OFF OFF | 3E0 | ||
2131 | |||
2132 | |||
2133 | Setting the Base Memory (RAM) buffer Address | ||
2134 | -------------------------------------------- | ||
2135 | |||
2136 | The memory buffer (RAM) requires 2K. The base of this buffer can be | ||
2137 | located in any of eight positions. The address of the Boot Prom is | ||
2138 | memory base + 0x2000. | ||
2139 | Jumpers 3-5 of switch block SW1 select the Memory Base address. | ||
2140 | |||
2141 | Switch | Hex RAM | Hex ROM | ||
2142 | 1 2 3 4 5 | Address | Address *) | ||
2143 | --------------------|---------|----------- | ||
2144 | ON ON ON ON ON | C0000 | C2000 | ||
2145 | ON ON OFF ON ON | C4000 | C6000 (Manufacturer's default) | ||
2146 | ON ON ON OFF ON | CC000 | CE000 | ||
2147 | ON ON OFF OFF ON | D0000 | D2000 | ||
2148 | ON ON ON ON OFF | D4000 | D6000 | ||
2149 | ON ON OFF ON OFF | D8000 | DA000 | ||
2150 | ON ON ON OFF OFF | DC000 | DE000 | ||
2151 | ON ON OFF OFF OFF | E0000 | E2000 | ||
2152 | |||
2153 | *) To enable the Boot ROM short the jumper J2. | ||
2154 | |||
2155 | The jumpers 1 and 2 probably add 0x0800 and 0x1000 to RAM address. | ||
2156 | |||
2157 | |||
2158 | Setting the Interrupt Line | ||
2159 | -------------------------- | ||
2160 | |||
2161 | Jumpers 1-5 of the jumper block J1 control the IRQ level. ON means | ||
2162 | shorted, OFF means open. | ||
2163 | |||
2164 | Jumper | IRQ | ||
2165 | 1 2 3 4 5 | | ||
2166 | ---------------------------- | ||
2167 | ON OFF OFF OFF OFF | 2 | ||
2168 | OFF ON OFF OFF OFF | 3 | ||
2169 | OFF OFF ON OFF OFF | 4 | ||
2170 | OFF OFF OFF ON OFF | 5 | ||
2171 | OFF OFF OFF OFF ON | 7 | ||
2172 | |||
2173 | |||
2174 | Setting the Timeout Parameters | ||
2175 | ------------------------------ | ||
2176 | |||
2177 | The jumpers J3 are used to set the timeout parameters. These two | ||
2178 | jumpers are normally left open. | ||
2179 | |||
2180 | |||
2181 | ***************************************************************************** | ||
2182 | |||
2183 | ** Thomas-Conrad ** | ||
2184 | Model #500-6242-0097 REV A (8-bit card) | ||
2185 | --------------------------------------- | ||
2186 | - from Lars Karlsson <100617.3473@compuserve.com> | ||
2187 | |||
2188 | ________________________________________________________ | ||
2189 | | ________ ________ |_____ | ||
2190 | | |........| |........| | | ||
2191 | | |________| |________| ___| | ||
2192 | | SW 3 SW 1 | | | ||
2193 | | Base I/O Base Addr. Station | | | ||
2194 | | address | | | ||
2195 | | ______ switch | | | ||
2196 | | | | | | | ||
2197 | | | | |___| | ||
2198 | | | | ______ |___._ | ||
2199 | | |______| |______| ____| BNC | ||
2200 | | Jumper- _____| Connector | ||
2201 | | Main chip block _ __| ' | ||
2202 | | | | | RJ Connector | ||
2203 | | |_| | with 110 Ohm | ||
2204 | | |__ Terminator | ||
2205 | | ___________ __| | ||
2206 | | |...........| | RJ-jack | ||
2207 | | |...........| _____ | (unused) | ||
2208 | | |___________| |_____| |__ | ||
2209 | | Boot PROM socket IRQ-jumpers |_ Diagnostic | ||
2210 | |________ __ _| LED (red) | ||
2211 | | | | | | | | | | | | | | | | | | | | | | | | ||
2212 | | | | | | | | | | | | | | | | | | | | | |________| | ||
2213 | | | ||
2214 | | | ||
2215 | |||
2216 | And here are the settings for some of the switches and jumpers on the cards. | ||
2217 | |||
2218 | |||
2219 | I/O | ||
2220 | |||
2221 | 1 2 3 4 5 6 7 8 | ||
2222 | |||
2223 | 2E0----- 0 0 0 1 0 0 0 1 | ||
2224 | 2F0----- 0 0 0 1 0 0 0 0 | ||
2225 | 300----- 0 0 0 0 1 1 1 1 | ||
2226 | 350----- 0 0 0 0 1 1 1 0 | ||
2227 | |||
2228 | "0" in the above example means switch is off "1" means that it is on. | ||
2229 | |||
2230 | |||
2231 | ShMem address. | ||
2232 | |||
2233 | 1 2 3 4 5 6 7 8 | ||
2234 | |||
2235 | CX00--0 0 1 1 | | | | ||
2236 | DX00--0 0 1 0 | | ||
2237 | X000--------- 1 1 | | ||
2238 | X400--------- 1 0 | | ||
2239 | X800--------- 0 1 | | ||
2240 | XC00--------- 0 0 | ||
2241 | ENHANCED----------- 1 | ||
2242 | COMPATIBLE--------- 0 | ||
2243 | |||
2244 | |||
2245 | IRQ | ||
2246 | |||
2247 | |||
2248 | 3 4 5 7 2 | ||
2249 | . . . . . | ||
2250 | . . . . . | ||
2251 | |||
2252 | |||
2253 | There is a DIP-switch with 8 switches, used to set the shared memory address | ||
2254 | to be used. The first 6 switches set the address, the 7th doesn't have any | ||
2255 | function, and the 8th switch is used to select "compatible" or "enhanced". | ||
2256 | When I got my two cards, one of them had this switch set to "enhanced". That | ||
2257 | card didn't work at all, it wasn't even recognized by the driver. The other | ||
2258 | card had this switch set to "compatible" and it behaved absolutely normally. I | ||
2259 | guess that the switch on one of the cards, must have been changed accidentally | ||
2260 | when the card was taken out of its former host. The question remains | ||
2261 | unanswered, what is the purpose of the "enhanced" position? | ||
2262 | |||
2263 | [Avery's note: "enhanced" probably either disables shared memory (use IO | ||
2264 | ports instead) or disables IO ports (use memory addresses instead). This | ||
2265 | varies by the type of card involved. I fail to see how either of these | ||
2266 | enhance anything. Send me more detailed information about this mode, or | ||
2267 | just use "compatible" mode instead.] | ||
2268 | |||
2269 | |||
2270 | ***************************************************************************** | ||
2271 | |||
2272 | ** Waterloo Microsystems Inc. ?? ** | ||
2273 | 8-bit card (C) 1985 | ||
2274 | ------------------- | ||
2275 | - from Robert Michael Best <rmb117@cs.usask.ca> | ||
2276 | |||
2277 | [Avery's note: these don't work with my driver for some reason. These cards | ||
2278 | SEEM to have settings similar to the PDI508Plus, which is | ||
2279 | software-configured and doesn't work with my driver either. The "Waterloo | ||
2280 | chip" is a boot PROM, probably designed specifically for the University of | ||
2281 | Waterloo. If you have any further information about this card, please | ||
2282 | e-mail me.] | ||
2283 | |||
2284 | The probe has not been able to detect the card on any of the J2 settings, | ||
2285 | and I tried them again with the "Waterloo" chip removed. | ||
2286 | |||
2287 | _____________________________________________________________________ | ||
2288 | | \/ \/ ___ __ __ | | ||
2289 | | C4 C4 |^| | M || ^ ||^| | | ||
2290 | | -- -- |_| | 5 || || | C3 | | ||
2291 | | \/ \/ C10 |___|| ||_| | | ||
2292 | | C4 C4 _ _ | | ?? | | ||
2293 | | -- -- | \/ || | | | ||
2294 | | | || | | | ||
2295 | | | || C1 | | | ||
2296 | | | || | \/ _____| | ||
2297 | | | C6 || | C9 | |___ | ||
2298 | | | || | -- | BNC |___| | ||
2299 | | | || | >C7| |_____| | ||
2300 | | | || | | | ||
2301 | | __ __ |____||_____| 1 2 3 6 | | ||
2302 | || ^ | >C4| |o|o|o|o|o|o| J2 >C4| | | ||
2303 | || | |o|o|o|o|o|o| | | ||
2304 | || C2 | >C4| >C4| | | ||
2305 | || | >C8| | | ||
2306 | || | 2 3 4 5 6 7 IRQ >C4| | | ||
2307 | ||_____| |o|o|o|o|o|o| J3 | | ||
2308 | |_______ |o|o|o|o|o|o| _______________| | ||
2309 | | | | ||
2310 | |_____________________________________________| | ||
2311 | |||
2312 | C1 -- "COM9026 | ||
2313 | SMC 8638" | ||
2314 | In a chip socket. | ||
2315 | |||
2316 | C2 -- "@Copyright | ||
2317 | Waterloo Microsystems Inc. | ||
2318 | 1985" | ||
2319 | In a chip Socket with info printed on a label covering a round window | ||
2320 | showing the circuit inside. (The window indicates it is an EPROM chip.) | ||
2321 | |||
2322 | C3 -- "COM9032 | ||
2323 | SMC 8643" | ||
2324 | In a chip socket. | ||
2325 | |||
2326 | C4 -- "74LS" | ||
2327 | 9 total no sockets. | ||
2328 | |||
2329 | M5 -- "50006-136 | ||
2330 | 20.000000 MHZ | ||
2331 | MTQ-T1-S3 | ||
2332 | 0 M-TRON 86-40" | ||
2333 | Metallic case with 4 pins, no socket. | ||
2334 | |||
2335 | C6 -- "MOSTEK@TC8643 | ||
2336 | MK6116N-20 | ||
2337 | MALAYSIA" | ||
2338 | No socket. | ||
2339 | |||
2340 | C7 -- No stamp or label but in a 20 pin chip socket. | ||
2341 | |||
2342 | C8 -- "PAL10L8CN | ||
2343 | 8623" | ||
2344 | In a 20 pin socket. | ||
2345 | |||
2346 | C9 -- "PAl16R4A-2CN | ||
2347 | 8641" | ||
2348 | In a 20 pin socket. | ||
2349 | |||
2350 | C10 -- "M8640 | ||
2351 | NMC | ||
2352 | 9306N" | ||
2353 | In an 8 pin socket. | ||
2354 | |||
2355 | ?? -- Some components on a smaller board and attached with 20 pins all | ||
2356 | along the side closest to the BNC connector. The are coated in a dark | ||
2357 | resin. | ||
2358 | |||
2359 | On the board there are two jumper banks labeled J2 and J3. The | ||
2360 | manufacturer didn't put a J1 on the board. The two boards I have both | ||
2361 | came with a jumper box for each bank. | ||
2362 | |||
2363 | J2 -- Numbered 1 2 3 4 5 6. | ||
2364 | 4 and 5 are not stamped due to solder points. | ||
2365 | |||
2366 | J3 -- IRQ 2 3 4 5 6 7 | ||
2367 | |||
2368 | The board itself has a maple leaf stamped just above the irq jumpers | ||
2369 | and "-2 46-86" beside C2. Between C1 and C6 "ASS 'Y 300163" and "@1986 | ||
2370 | CORMAN CUSTOM ELECTRONICS CORP." stamped just below the BNC connector. | ||
2371 | Below that "MADE IN CANADA" | ||
2372 | |||
2373 | |||
2374 | ***************************************************************************** | ||
2375 | |||
2376 | ** No Name ** | ||
2377 | 8-bit cards, 16-bit cards | ||
2378 | ------------------------- | ||
2379 | - from Juergen Seifert <seifert@htwm.de> | ||
2380 | |||
2381 | NONAME 8-BIT ARCNET | ||
2382 | =================== | ||
2383 | |||
2384 | I have named this ARCnet card "NONAME", since there is no name of any | ||
2385 | manufacturer on the Installation manual nor on the shipping box. The only | ||
2386 | hint to the existence of a manufacturer at all is written in copper, | ||
2387 | it is "Made in Taiwan" | ||
2388 | |||
2389 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
2390 | using information from the Original | ||
2391 | "ARCnet Installation Manual" | ||
2392 | |||
2393 | |||
2394 | ________________________________________________________________ | ||
2395 | | |STAR| BUS| T/P| | | ||
2396 | | |____|____|____| | | ||
2397 | | _____________________ | | ||
2398 | | | | | | ||
2399 | | | | | | ||
2400 | | | | | | ||
2401 | | | SMC | | | ||
2402 | | | | | | ||
2403 | | | COM90C65 | | | ||
2404 | | | | | | ||
2405 | | | | | | ||
2406 | | |__________-__________| | | ||
2407 | | _____| | ||
2408 | | _______________ | CN | | ||
2409 | | | PROM | |_____| | ||
2410 | | > SOCKET | | | ||
2411 | | |_______________| 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 | | ||
2412 | | _______________ _______________ | | ||
2413 | | |o|o|o|o|o|o|o|o| | SW1 || SW2 || | ||
2414 | | |o|o|o|o|o|o|o|o| |_______________||_______________|| | ||
2415 | |___ 2 3 4 5 7 E E R Node ID IOB__|__MEM____| | ||
2416 | | \ IRQ / T T O | | ||
2417 | |__________________1_2_M______________________| | ||
2418 | |||
2419 | Legend: | ||
2420 | |||
2421 | COM90C65: ARCnet Probe | ||
2422 | S1 1-8: Node ID Select | ||
2423 | S2 1-3: I/O Base Address Select | ||
2424 | 4-6: Memory Base Address Select | ||
2425 | 7-8: RAM Offset Select | ||
2426 | ET1, ET2 Extended Timeout Select | ||
2427 | ROM ROM Enable Select | ||
2428 | CN RG62 Coax Connector | ||
2429 | STAR| BUS | T/P Three fields for placing a sign (colored circle) | ||
2430 | indicating the topology of the card | ||
2431 | |||
2432 | Setting one of the switches to Off means "1", On means "0". | ||
2433 | |||
2434 | |||
2435 | Setting the Node ID | ||
2436 | ------------------- | ||
2437 | |||
2438 | The eight switches in group SW1 are used to set the node ID. | ||
2439 | Each node attached to the network must have an unique node ID which | ||
2440 | must be different from 0. | ||
2441 | Switch 8 serves as the least significant bit (LSB). | ||
2442 | |||
2443 | The node ID is the sum of the values of all switches set to "1" | ||
2444 | These values are: | ||
2445 | |||
2446 | Switch | Value | ||
2447 | -------|------- | ||
2448 | 8 | 1 | ||
2449 | 7 | 2 | ||
2450 | 6 | 4 | ||
2451 | 5 | 8 | ||
2452 | 4 | 16 | ||
2453 | 3 | 32 | ||
2454 | 2 | 64 | ||
2455 | 1 | 128 | ||
2456 | |||
2457 | Some Examples: | ||
2458 | |||
2459 | Switch | Hex | Decimal | ||
2460 | 1 2 3 4 5 6 7 8 | Node ID | Node ID | ||
2461 | ----------------|---------|--------- | ||
2462 | 0 0 0 0 0 0 0 0 | not allowed | ||
2463 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
2464 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
2465 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
2466 | . . . | | | ||
2467 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
2468 | . . . | | | ||
2469 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
2470 | . . . | | | ||
2471 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
2472 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
2473 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
2474 | |||
2475 | |||
2476 | Setting the I/O Base Address | ||
2477 | ---------------------------- | ||
2478 | |||
2479 | The first three switches in switch group SW2 are used to select one | ||
2480 | of eight possible I/O Base addresses using the following table | ||
2481 | |||
2482 | Switch | Hex I/O | ||
2483 | 1 2 3 | Address | ||
2484 | ------------|-------- | ||
2485 | ON ON ON | 260 | ||
2486 | ON ON OFF | 290 | ||
2487 | ON OFF ON | 2E0 (Manufacturer's default) | ||
2488 | ON OFF OFF | 2F0 | ||
2489 | OFF ON ON | 300 | ||
2490 | OFF ON OFF | 350 | ||
2491 | OFF OFF ON | 380 | ||
2492 | OFF OFF OFF | 3E0 | ||
2493 | |||
2494 | |||
2495 | Setting the Base Memory (RAM) buffer Address | ||
2496 | -------------------------------------------- | ||
2497 | |||
2498 | The memory buffer requires 2K of a 16K block of RAM. The base of this | ||
2499 | 16K block can be located in any of eight positions. | ||
2500 | Switches 4-6 of switch group SW2 select the Base of the 16K block. | ||
2501 | Within that 16K address space, the buffer may be assigned any one of four | ||
2502 | positions, determined by the offset, switches 7 and 8 of group SW2. | ||
2503 | |||
2504 | Switch | Hex RAM | Hex ROM | ||
2505 | 4 5 6 7 8 | Address | Address *) | ||
2506 | -----------|---------|----------- | ||
2507 | 0 0 0 0 0 | C0000 | C2000 | ||
2508 | 0 0 0 0 1 | C0800 | C2000 | ||
2509 | 0 0 0 1 0 | C1000 | C2000 | ||
2510 | 0 0 0 1 1 | C1800 | C2000 | ||
2511 | | | | ||
2512 | 0 0 1 0 0 | C4000 | C6000 | ||
2513 | 0 0 1 0 1 | C4800 | C6000 | ||
2514 | 0 0 1 1 0 | C5000 | C6000 | ||
2515 | 0 0 1 1 1 | C5800 | C6000 | ||
2516 | | | | ||
2517 | 0 1 0 0 0 | CC000 | CE000 | ||
2518 | 0 1 0 0 1 | CC800 | CE000 | ||
2519 | 0 1 0 1 0 | CD000 | CE000 | ||
2520 | 0 1 0 1 1 | CD800 | CE000 | ||
2521 | | | | ||
2522 | 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default) | ||
2523 | 0 1 1 0 1 | D0800 | D2000 | ||
2524 | 0 1 1 1 0 | D1000 | D2000 | ||
2525 | 0 1 1 1 1 | D1800 | D2000 | ||
2526 | | | | ||
2527 | 1 0 0 0 0 | D4000 | D6000 | ||
2528 | 1 0 0 0 1 | D4800 | D6000 | ||
2529 | 1 0 0 1 0 | D5000 | D6000 | ||
2530 | 1 0 0 1 1 | D5800 | D6000 | ||
2531 | | | | ||
2532 | 1 0 1 0 0 | D8000 | DA000 | ||
2533 | 1 0 1 0 1 | D8800 | DA000 | ||
2534 | 1 0 1 1 0 | D9000 | DA000 | ||
2535 | 1 0 1 1 1 | D9800 | DA000 | ||
2536 | | | | ||
2537 | 1 1 0 0 0 | DC000 | DE000 | ||
2538 | 1 1 0 0 1 | DC800 | DE000 | ||
2539 | 1 1 0 1 0 | DD000 | DE000 | ||
2540 | 1 1 0 1 1 | DD800 | DE000 | ||
2541 | | | | ||
2542 | 1 1 1 0 0 | E0000 | E2000 | ||
2543 | 1 1 1 0 1 | E0800 | E2000 | ||
2544 | 1 1 1 1 0 | E1000 | E2000 | ||
2545 | 1 1 1 1 1 | E1800 | E2000 | ||
2546 | |||
2547 | *) To enable the 8K Boot PROM install the jumper ROM. | ||
2548 | The default is jumper ROM not installed. | ||
2549 | |||
2550 | |||
2551 | Setting Interrupt Request Lines (IRQ) | ||
2552 | ------------------------------------- | ||
2553 | |||
2554 | To select a hardware interrupt level set one (only one!) of the jumpers | ||
2555 | IRQ2, IRQ3, IRQ4, IRQ5 or IRQ7. The manufacturer's default is IRQ2. | ||
2556 | |||
2557 | |||
2558 | Setting the Timeouts | ||
2559 | -------------------- | ||
2560 | |||
2561 | The two jumpers labeled ET1 and ET2 are used to determine the timeout | ||
2562 | parameters (response and reconfiguration time). Every node in a network | ||
2563 | must be set to the same timeout values. | ||
2564 | |||
2565 | ET1 ET2 | Response Time (us) | Reconfiguration Time (ms) | ||
2566 | --------|--------------------|-------------------------- | ||
2567 | Off Off | 78 | 840 (Default) | ||
2568 | Off On | 285 | 1680 | ||
2569 | On Off | 563 | 1680 | ||
2570 | On On | 1130 | 1680 | ||
2571 | |||
2572 | On means jumper installed, Off means jumper not installed | ||
2573 | |||
2574 | |||
2575 | NONAME 16-BIT ARCNET | ||
2576 | ==================== | ||
2577 | |||
2578 | The manual of my 8-Bit NONAME ARCnet Card contains another description | ||
2579 | of a 16-Bit Coax / Twisted Pair Card. This description is incomplete, | ||
2580 | because there are missing two pages in the manual booklet. (The table | ||
2581 | of contents reports pages ... 2-9, 2-11, 2-12, 3-1, ... but inside | ||
2582 | the booklet there is a different way of counting ... 2-9, 2-10, A-1, | ||
2583 | (empty page), 3-1, ..., 3-18, A-1 (again), A-2) | ||
2584 | Also the picture of the board layout is not as good as the picture of | ||
2585 | 8-Bit card, because there isn't any letter like "SW1" written to the | ||
2586 | picture. | ||
2587 | Should somebody have such a board, please feel free to complete this | ||
2588 | description or to send a mail to me! | ||
2589 | |||
2590 | This description has been written by Juergen Seifert <seifert@htwm.de> | ||
2591 | using information from the Original | ||
2592 | "ARCnet Installation Manual" | ||
2593 | |||
2594 | |||
2595 | ___________________________________________________________________ | ||
2596 | < _________________ _________________ | | ||
2597 | > | SW? || SW? | | | ||
2598 | < |_________________||_________________| | | ||
2599 | > ____________________ | | ||
2600 | < | | | | ||
2601 | > | | | | ||
2602 | < | | | | ||
2603 | > | | | | ||
2604 | < | | | | ||
2605 | > | | | | ||
2606 | < | | | | ||
2607 | > |____________________| | | ||
2608 | < ____| | ||
2609 | > ____________________ | | | ||
2610 | < | | | J1 | | ||
2611 | > | < | | | ||
2612 | < |____________________| ? ? ? ? ? ? |____| | ||
2613 | > |o|o|o|o|o|o| | | ||
2614 | < |o|o|o|o|o|o| | | ||
2615 | > | | ||
2616 | < __ ___________| | ||
2617 | > | | | | ||
2618 | <____________| |_______________________________________| | ||
2619 | |||
2620 | |||
2621 | Setting one of the switches to Off means "1", On means "0". | ||
2622 | |||
2623 | |||
2624 | Setting the Node ID | ||
2625 | ------------------- | ||
2626 | |||
2627 | The eight switches in group SW2 are used to set the node ID. | ||
2628 | Each node attached to the network must have an unique node ID which | ||
2629 | must be different from 0. | ||
2630 | Switch 8 serves as the least significant bit (LSB). | ||
2631 | |||
2632 | The node ID is the sum of the values of all switches set to "1" | ||
2633 | These values are: | ||
2634 | |||
2635 | Switch | Value | ||
2636 | -------|------- | ||
2637 | 8 | 1 | ||
2638 | 7 | 2 | ||
2639 | 6 | 4 | ||
2640 | 5 | 8 | ||
2641 | 4 | 16 | ||
2642 | 3 | 32 | ||
2643 | 2 | 64 | ||
2644 | 1 | 128 | ||
2645 | |||
2646 | Some Examples: | ||
2647 | |||
2648 | Switch | Hex | Decimal | ||
2649 | 1 2 3 4 5 6 7 8 | Node ID | Node ID | ||
2650 | ----------------|---------|--------- | ||
2651 | 0 0 0 0 0 0 0 0 | not allowed | ||
2652 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
2653 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
2654 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
2655 | . . . | | | ||
2656 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
2657 | . . . | | | ||
2658 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
2659 | . . . | | | ||
2660 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
2661 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
2662 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
2663 | |||
2664 | |||
2665 | Setting the I/O Base Address | ||
2666 | ---------------------------- | ||
2667 | |||
2668 | The first three switches in switch group SW1 are used to select one | ||
2669 | of eight possible I/O Base addresses using the following table | ||
2670 | |||
2671 | Switch | Hex I/O | ||
2672 | 3 2 1 | Address | ||
2673 | ------------|-------- | ||
2674 | ON ON ON | 260 | ||
2675 | ON ON OFF | 290 | ||
2676 | ON OFF ON | 2E0 (Manufacturer's default) | ||
2677 | ON OFF OFF | 2F0 | ||
2678 | OFF ON ON | 300 | ||
2679 | OFF ON OFF | 350 | ||
2680 | OFF OFF ON | 380 | ||
2681 | OFF OFF OFF | 3E0 | ||
2682 | |||
2683 | |||
2684 | Setting the Base Memory (RAM) buffer Address | ||
2685 | -------------------------------------------- | ||
2686 | |||
2687 | The memory buffer requires 2K of a 16K block of RAM. The base of this | ||
2688 | 16K block can be located in any of eight positions. | ||
2689 | Switches 6-8 of switch group SW1 select the Base of the 16K block. | ||
2690 | Within that 16K address space, the buffer may be assigned any one of four | ||
2691 | positions, determined by the offset, switches 4 and 5 of group SW1. | ||
2692 | |||
2693 | Switch | Hex RAM | Hex ROM | ||
2694 | 8 7 6 5 4 | Address | Address | ||
2695 | -----------|---------|----------- | ||
2696 | 0 0 0 0 0 | C0000 | C2000 | ||
2697 | 0 0 0 0 1 | C0800 | C2000 | ||
2698 | 0 0 0 1 0 | C1000 | C2000 | ||
2699 | 0 0 0 1 1 | C1800 | C2000 | ||
2700 | | | | ||
2701 | 0 0 1 0 0 | C4000 | C6000 | ||
2702 | 0 0 1 0 1 | C4800 | C6000 | ||
2703 | 0 0 1 1 0 | C5000 | C6000 | ||
2704 | 0 0 1 1 1 | C5800 | C6000 | ||
2705 | | | | ||
2706 | 0 1 0 0 0 | CC000 | CE000 | ||
2707 | 0 1 0 0 1 | CC800 | CE000 | ||
2708 | 0 1 0 1 0 | CD000 | CE000 | ||
2709 | 0 1 0 1 1 | CD800 | CE000 | ||
2710 | | | | ||
2711 | 0 1 1 0 0 | D0000 | D2000 (Manufacturer's default) | ||
2712 | 0 1 1 0 1 | D0800 | D2000 | ||
2713 | 0 1 1 1 0 | D1000 | D2000 | ||
2714 | 0 1 1 1 1 | D1800 | D2000 | ||
2715 | | | | ||
2716 | 1 0 0 0 0 | D4000 | D6000 | ||
2717 | 1 0 0 0 1 | D4800 | D6000 | ||
2718 | 1 0 0 1 0 | D5000 | D6000 | ||
2719 | 1 0 0 1 1 | D5800 | D6000 | ||
2720 | | | | ||
2721 | 1 0 1 0 0 | D8000 | DA000 | ||
2722 | 1 0 1 0 1 | D8800 | DA000 | ||
2723 | 1 0 1 1 0 | D9000 | DA000 | ||
2724 | 1 0 1 1 1 | D9800 | DA000 | ||
2725 | | | | ||
2726 | 1 1 0 0 0 | DC000 | DE000 | ||
2727 | 1 1 0 0 1 | DC800 | DE000 | ||
2728 | 1 1 0 1 0 | DD000 | DE000 | ||
2729 | 1 1 0 1 1 | DD800 | DE000 | ||
2730 | | | | ||
2731 | 1 1 1 0 0 | E0000 | E2000 | ||
2732 | 1 1 1 0 1 | E0800 | E2000 | ||
2733 | 1 1 1 1 0 | E1000 | E2000 | ||
2734 | 1 1 1 1 1 | E1800 | E2000 | ||
2735 | |||
2736 | |||
2737 | Setting Interrupt Request Lines (IRQ) | ||
2738 | ------------------------------------- | ||
2739 | |||
2740 | ?????????????????????????????????????? | ||
2741 | |||
2742 | |||
2743 | Setting the Timeouts | ||
2744 | -------------------- | ||
2745 | |||
2746 | ?????????????????????????????????????? | ||
2747 | |||
2748 | |||
2749 | ***************************************************************************** | ||
2750 | |||
2751 | ** No Name ** | ||
2752 | 8-bit cards ("Made in Taiwan R.O.C.") | ||
2753 | ----------- | ||
2754 | - from Vojtech Pavlik <vojtech@suse.cz> | ||
2755 | |||
2756 | I have named this ARCnet card "NONAME", since I got only the card with | ||
2757 | no manual at all and the only text identifying the manufacturer is | ||
2758 | "MADE IN TAIWAN R.O.C" printed on the card. | ||
2759 | |||
2760 | ____________________________________________________________ | ||
2761 | | 1 2 3 4 5 6 7 8 | | ||
2762 | | |o|o| JP1 o|o|o|o|o|o|o|o| ON | | ||
2763 | | + o|o|o|o|o|o|o|o| ___| | ||
2764 | | _____________ o|o|o|o|o|o|o|o| OFF _____ | | ID7 | ||
2765 | | | | SW1 | | | | ID6 | ||
2766 | | > RAM (2k) | ____________________ | H | | S | ID5 | ||
2767 | | |_____________| | || y | | W | ID4 | ||
2768 | | | || b | | 2 | ID3 | ||
2769 | | | || r | | | ID2 | ||
2770 | | | || i | | | ID1 | ||
2771 | | | 90C65 || d | |___| ID0 | ||
2772 | | SW3 | || | | | ||
2773 | | |o|o|o|o|o|o|o|o| ON | || I | | | ||
2774 | | |o|o|o|o|o|o|o|o| | || C | | | ||
2775 | | |o|o|o|o|o|o|o|o| OFF |____________________|| | _____| | ||
2776 | | 1 2 3 4 5 6 7 8 | | | |___ | ||
2777 | | ______________ | | | BNC |___| | ||
2778 | | | | |_____| |_____| | ||
2779 | | > EPROM SOCKET | | | ||
2780 | | |______________| | | ||
2781 | | ______________| | ||
2782 | | | | ||
2783 | |_____________________________________________| | ||
2784 | |||
2785 | Legend: | ||
2786 | |||
2787 | 90C65 ARCNET Chip | ||
2788 | SW1 1-5: Base Memory Address Select | ||
2789 | 6-8: Base I/O Address Select | ||
2790 | SW2 1-8: Node ID Select (ID0-ID7) | ||
2791 | SW3 1-5: IRQ Select | ||
2792 | 6-7: Extra Timeout | ||
2793 | 8 : ROM Enable | ||
2794 | JP1 Led connector | ||
2795 | BNC Coax connector | ||
2796 | |||
2797 | Although the jumpers SW1 and SW3 are marked SW, not JP, they are jumpers, not | ||
2798 | switches. | ||
2799 | |||
2800 | Setting the jumpers to ON means connecting the upper two pins, off the bottom | ||
2801 | two - or - in case of IRQ setting, connecting none of them at all. | ||
2802 | |||
2803 | Setting the Node ID | ||
2804 | ------------------- | ||
2805 | |||
2806 | The eight switches in SW2 are used to set the node ID. Each node attached | ||
2807 | to the network must have an unique node ID which must not be 0. | ||
2808 | Switch 1 (ID0) serves as the least significant bit (LSB). | ||
2809 | |||
2810 | Setting one of the switches to Off means "1", On means "0". | ||
2811 | |||
2812 | The node ID is the sum of the values of all switches set to "1" | ||
2813 | These values are: | ||
2814 | |||
2815 | Switch | Label | Value | ||
2816 | -------|-------|------- | ||
2817 | 1 | ID0 | 1 | ||
2818 | 2 | ID1 | 2 | ||
2819 | 3 | ID2 | 4 | ||
2820 | 4 | ID3 | 8 | ||
2821 | 5 | ID4 | 16 | ||
2822 | 6 | ID5 | 32 | ||
2823 | 7 | ID6 | 64 | ||
2824 | 8 | ID7 | 128 | ||
2825 | |||
2826 | Some Examples: | ||
2827 | |||
2828 | Switch | Hex | Decimal | ||
2829 | 8 7 6 5 4 3 2 1 | Node ID | Node ID | ||
2830 | ----------------|---------|--------- | ||
2831 | 0 0 0 0 0 0 0 0 | not allowed | ||
2832 | 0 0 0 0 0 0 0 1 | 1 | 1 | ||
2833 | 0 0 0 0 0 0 1 0 | 2 | 2 | ||
2834 | 0 0 0 0 0 0 1 1 | 3 | 3 | ||
2835 | . . . | | | ||
2836 | 0 1 0 1 0 1 0 1 | 55 | 85 | ||
2837 | . . . | | | ||
2838 | 1 0 1 0 1 0 1 0 | AA | 170 | ||
2839 | . . . | | | ||
2840 | 1 1 1 1 1 1 0 1 | FD | 253 | ||
2841 | 1 1 1 1 1 1 1 0 | FE | 254 | ||
2842 | 1 1 1 1 1 1 1 1 | FF | 255 | ||
2843 | |||
2844 | |||
2845 | Setting the I/O Base Address | ||
2846 | ---------------------------- | ||
2847 | |||
2848 | The last three switches in switch block SW1 are used to select one | ||
2849 | of eight possible I/O Base addresses using the following table | ||
2850 | |||
2851 | |||
2852 | Switch | Hex I/O | ||
2853 | 6 7 8 | Address | ||
2854 | ------------|-------- | ||
2855 | ON ON ON | 260 | ||
2856 | OFF ON ON | 290 | ||
2857 | ON OFF ON | 2E0 (Manufacturer's default) | ||
2858 | OFF OFF ON | 2F0 | ||
2859 | ON ON OFF | 300 | ||
2860 | OFF ON OFF | 350 | ||
2861 | ON OFF OFF | 380 | ||
2862 | OFF OFF OFF | 3E0 | ||
2863 | |||
2864 | |||
2865 | Setting the Base Memory (RAM) buffer Address | ||
2866 | -------------------------------------------- | ||
2867 | |||
2868 | The memory buffer (RAM) requires 2K. The base of this buffer can be | ||
2869 | located in any of eight positions. The address of the Boot Prom is | ||
2870 | memory base + 0x2000. | ||
2871 | Jumpers 3-5 of jumper block SW1 select the Memory Base address. | ||
2872 | |||
2873 | Switch | Hex RAM | Hex ROM | ||
2874 | 1 2 3 4 5 | Address | Address *) | ||
2875 | --------------------|---------|----------- | ||
2876 | ON ON ON ON ON | C0000 | C2000 | ||
2877 | ON ON OFF ON ON | C4000 | C6000 | ||
2878 | ON ON ON OFF ON | CC000 | CE000 | ||
2879 | ON ON OFF OFF ON | D0000 | D2000 (Manufacturer's default) | ||
2880 | ON ON ON ON OFF | D4000 | D6000 | ||
2881 | ON ON OFF ON OFF | D8000 | DA000 | ||
2882 | ON ON ON OFF OFF | DC000 | DE000 | ||
2883 | ON ON OFF OFF OFF | E0000 | E2000 | ||
2884 | |||
2885 | *) To enable the Boot ROM set the jumper 8 of jumper block SW3 to position ON. | ||
2886 | |||
2887 | The jumpers 1 and 2 probably add 0x0800, 0x1000 and 0x1800 to RAM adders. | ||
2888 | |||
2889 | Setting the Interrupt Line | ||
2890 | -------------------------- | ||
2891 | |||
2892 | Jumpers 1-5 of the jumper block SW3 control the IRQ level. | ||
2893 | |||
2894 | Jumper | IRQ | ||
2895 | 1 2 3 4 5 | | ||
2896 | ---------------------------- | ||
2897 | ON OFF OFF OFF OFF | 2 | ||
2898 | OFF ON OFF OFF OFF | 3 | ||
2899 | OFF OFF ON OFF OFF | 4 | ||
2900 | OFF OFF OFF ON OFF | 5 | ||
2901 | OFF OFF OFF OFF ON | 7 | ||
2902 | |||
2903 | |||
2904 | Setting the Timeout Parameters | ||
2905 | ------------------------------ | ||
2906 | |||
2907 | The jumpers 6-7 of the jumper block SW3 are used to determine the timeout | ||
2908 | parameters. These two jumpers are normally left in the OFF position. | ||
2909 | |||
2910 | |||
2911 | ***************************************************************************** | ||
2912 | |||
2913 | ** No Name ** | ||
2914 | (Generic Model 9058) | ||
2915 | -------------------- | ||
2916 | - from Andrew J. Kroll <ag784@freenet.buffalo.edu> | ||
2917 | - Sorry this sat in my to-do box for so long, Andrew! (yikes - over a | ||
2918 | year!) | ||
2919 | _____ | ||
2920 | | < | ||
2921 | | .---' | ||
2922 | ________________________________________________________________ | | | ||
2923 | | | SW2 | | | | ||
2924 | | ___________ |_____________| | | | ||
2925 | | | | 1 2 3 4 5 6 ___| | | ||
2926 | | > 6116 RAM | _________ 8 | | | | ||
2927 | | |___________| |20MHzXtal| 7 | | | | ||
2928 | | |_________| __________ 6 | S | | | ||
2929 | | 74LS373 | |- 5 | W | | | ||
2930 | | _________ | E |- 4 | | | | ||
2931 | | >_______| ______________|..... P |- 3 | 3 | | | ||
2932 | | | | : O |- 2 | | | | ||
2933 | | | | : X |- 1 |___| | | ||
2934 | | ________________ | | : Y |- | | | ||
2935 | | | SW1 | | SL90C65 | : |- | | | ||
2936 | | |________________| | | : B |- | | | ||
2937 | | 1 2 3 4 5 6 7 8 | | : O |- | | | ||
2938 | | |_________o____|..../ A |- _______| | | ||
2939 | | ____________________ | R |- | |------, | ||
2940 | | | | | D |- | BNC | # | | ||
2941 | | > 2764 PROM SOCKET | |__________|- |_______|------' | ||
2942 | | |____________________| _________ | | | ||
2943 | | >________| <- 74LS245 | | | ||
2944 | | | | | ||
2945 | |___ ______________| | | ||
2946 | |H H H H H H H H H H H H H H H H H H H H H H H| | | | ||
2947 | |U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U_U| | | | ||
2948 | \| | ||
2949 | Legend: | ||
2950 | |||
2951 | SL90C65 ARCNET Controller / Transceiver /Logic | ||
2952 | SW1 1-5: IRQ Select | ||
2953 | 6: ET1 | ||
2954 | 7: ET2 | ||
2955 | 8: ROM ENABLE | ||
2956 | SW2 1-3: Memory Buffer/PROM Address | ||
2957 | 3-6: I/O Address Map | ||
2958 | SW3 1-8: Node ID Select | ||
2959 | BNC BNC RG62/U Connection | ||
2960 | *I* have had success using RG59B/U with *NO* terminators! | ||
2961 | What gives?! | ||
2962 | |||
2963 | SW1: Timeouts, Interrupt and ROM | ||
2964 | --------------------------------- | ||
2965 | |||
2966 | To select a hardware interrupt level set one (only one!) of the dip switches | ||
2967 | up (on) SW1...(switches 1-5) | ||
2968 | IRQ3, IRQ4, IRQ5, IRQ7, IRQ2. The Manufacturer's default is IRQ2. | ||
2969 | |||
2970 | The switches on SW1 labeled EXT1 (switch 6) and EXT2 (switch 7) | ||
2971 | are used to determine the timeout parameters. These two dip switches | ||
2972 | are normally left off (down). | ||
2973 | |||
2974 | To enable the 8K Boot PROM position SW1 switch 8 on (UP) labeled ROM. | ||
2975 | The default is jumper ROM not installed. | ||
2976 | |||
2977 | |||
2978 | Setting the I/O Base Address | ||
2979 | ---------------------------- | ||
2980 | |||
2981 | The last three switches in switch group SW2 are used to select one | ||
2982 | of eight possible I/O Base addresses using the following table | ||
2983 | |||
2984 | |||
2985 | Switch | Hex I/O | ||
2986 | 4 5 6 | Address | ||
2987 | -------|-------- | ||
2988 | 0 0 0 | 260 | ||
2989 | 0 0 1 | 290 | ||
2990 | 0 1 0 | 2E0 (Manufacturer's default) | ||
2991 | 0 1 1 | 2F0 | ||
2992 | 1 0 0 | 300 | ||
2993 | 1 0 1 | 350 | ||
2994 | 1 1 0 | 380 | ||
2995 | 1 1 1 | 3E0 | ||
2996 | |||
2997 | |||
2998 | Setting the Base Memory Address (RAM & ROM) | ||
2999 | ------------------------------------------- | ||
3000 | |||
3001 | The memory buffer requires 2K of a 16K block of RAM. The base of this | ||
3002 | 16K block can be located in any of eight positions. | ||
3003 | Switches 1-3 of switch group SW2 select the Base of the 16K block. | ||
3004 | (0 = DOWN, 1 = UP) | ||
3005 | I could, however, only verify two settings... | ||
3006 | |||
3007 | Switch| Hex RAM | Hex ROM | ||
3008 | 1 2 3 | Address | Address | ||
3009 | ------|---------|----------- | ||
3010 | 0 0 0 | E0000 | E2000 | ||
3011 | 0 0 1 | D0000 | D2000 (Manufacturer's default) | ||
3012 | 0 1 0 | ????? | ????? | ||
3013 | 0 1 1 | ????? | ????? | ||
3014 | 1 0 0 | ????? | ????? | ||
3015 | 1 0 1 | ????? | ????? | ||
3016 | 1 1 0 | ????? | ????? | ||
3017 | 1 1 1 | ????? | ????? | ||
3018 | |||
3019 | |||
3020 | Setting the Node ID | ||
3021 | ------------------- | ||
3022 | |||
3023 | The eight switches in group SW3 are used to set the node ID. | ||
3024 | Each node attached to the network must have an unique node ID which | ||
3025 | must be different from 0. | ||
3026 | Switch 1 serves as the least significant bit (LSB). | ||
3027 | switches in the DOWN position are OFF (0) and in the UP position are ON (1) | ||
3028 | |||
3029 | The node ID is the sum of the values of all switches set to "1" | ||
3030 | These values are: | ||
3031 | Switch | Value | ||
3032 | -------|------- | ||
3033 | 1 | 1 | ||
3034 | 2 | 2 | ||
3035 | 3 | 4 | ||
3036 | 4 | 8 | ||
3037 | 5 | 16 | ||
3038 | 6 | 32 | ||
3039 | 7 | 64 | ||
3040 | 8 | 128 | ||
3041 | |||
3042 | Some Examples: | ||
3043 | |||
3044 | Switch# | Hex | Decimal | ||
3045 | 8 7 6 5 4 3 2 1 | Node ID | Node ID | ||
3046 | ----------------|---------|--------- | ||
3047 | 0 0 0 0 0 0 0 0 | not allowed <-. | ||
3048 | 0 0 0 0 0 0 0 1 | 1 | 1 | | ||
3049 | 0 0 0 0 0 0 1 0 | 2 | 2 | | ||
3050 | 0 0 0 0 0 0 1 1 | 3 | 3 | | ||
3051 | . . . | | | | ||
3052 | 0 1 0 1 0 1 0 1 | 55 | 85 | | ||
3053 | . . . | | + Don't use 0 or 255! | ||
3054 | 1 0 1 0 1 0 1 0 | AA | 170 | | ||
3055 | . . . | | | | ||
3056 | 1 1 1 1 1 1 0 1 | FD | 253 | | ||
3057 | 1 1 1 1 1 1 1 0 | FE | 254 | | ||
3058 | 1 1 1 1 1 1 1 1 | FF | 255 <-' | ||
3059 | |||
3060 | |||
3061 | ***************************************************************************** | ||
3062 | |||
3063 | ** Tiara ** | ||
3064 | (model unknown) | ||
3065 | ------------------------- | ||
3066 | - from Christoph Lameter <christoph@lameter.com> | ||
3067 | |||
3068 | |||
3069 | Here is information about my card as far as I could figure it out: | ||
3070 | ----------------------------------------------- tiara | ||
3071 | Tiara LanCard of Tiara Computer Systems. | ||
3072 | |||
3073 | +----------------------------------------------+ | ||
3074 | ! ! Transmitter Unit ! ! | ||
3075 | ! +------------------+ ------- | ||
3076 | ! MEM Coax Connector | ||
3077 | ! ROM 7654321 <- I/O ------- | ||
3078 | ! : : +--------+ ! | ||
3079 | ! : : ! 90C66LJ! +++ | ||
3080 | ! : : ! ! !D Switch to set | ||
3081 | ! : : ! ! !I the Nodenumber | ||
3082 | ! : : +--------+ !P | ||
3083 | ! !++ | ||
3084 | ! 234567 <- IRQ ! | ||
3085 | +------------!!!!!!!!!!!!!!!!!!!!!!!!--------+ | ||
3086 | !!!!!!!!!!!!!!!!!!!!!!!! | ||
3087 | |||
3088 | 0 = Jumper Installed | ||
3089 | 1 = Open | ||
3090 | |||
3091 | Top Jumper line Bit 7 = ROM Enable 654=Memory location 321=I/O | ||
3092 | |||
3093 | Settings for Memory Location (Top Jumper Line) | ||
3094 | 456 Address selected | ||
3095 | 000 C0000 | ||
3096 | 001 C4000 | ||
3097 | 010 CC000 | ||
3098 | 011 D0000 | ||
3099 | 100 D4000 | ||
3100 | 101 D8000 | ||
3101 | 110 DC000 | ||
3102 | 111 E0000 | ||
3103 | |||
3104 | Settings for I/O Address (Top Jumper Line) | ||
3105 | 123 Port | ||
3106 | 000 260 | ||
3107 | 001 290 | ||
3108 | 010 2E0 | ||
3109 | 011 2F0 | ||
3110 | 100 300 | ||
3111 | 101 350 | ||
3112 | 110 380 | ||
3113 | 111 3E0 | ||
3114 | |||
3115 | Settings for IRQ Selection (Lower Jumper Line) | ||
3116 | 234567 | ||
3117 | 011111 IRQ 2 | ||
3118 | 101111 IRQ 3 | ||
3119 | 110111 IRQ 4 | ||
3120 | 111011 IRQ 5 | ||
3121 | 111110 IRQ 7 | ||
3122 | |||
3123 | ***************************************************************************** | ||
3124 | |||
3125 | |||
3126 | Other Cards | ||
3127 | ----------- | ||
3128 | |||
3129 | I have no information on other models of ARCnet cards at the moment. Please | ||
3130 | send any and all info to: | ||
3131 | apenwarr@worldvisions.ca | ||
3132 | |||
3133 | Thanks. | ||
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt new file mode 100644 index 000000000000..770fc41a78e8 --- /dev/null +++ b/Documentation/networking/arcnet.txt | |||
@@ -0,0 +1,555 @@ | |||
1 | ---------------------------------------------------------------------------- | ||
2 | NOTE: See also arcnet-hardware.txt in this directory for jumper-setting | ||
3 | and cabling information if you're like many of us and didn't happen to get a | ||
4 | manual with your ARCnet card. | ||
5 | ---------------------------------------------------------------------------- | ||
6 | |||
7 | Since no one seems to listen to me otherwise, perhaps a poem will get your | ||
8 | attention: | ||
9 | This driver's getting fat and beefy, | ||
10 | But my cat is still named Fifi. | ||
11 | |||
12 | Hmm, I think I'm allowed to call that a poem, even though it's only two | ||
13 | lines. Hey, I'm in Computer Science, not English. Give me a break. | ||
14 | |||
15 | The point is: I REALLY REALLY REALLY REALLY REALLY want to hear from you if | ||
16 | you test this and get it working. Or if you don't. Or anything. | ||
17 | |||
18 | ARCnet 0.32 ALPHA first made it into the Linux kernel 1.1.80 - this was | ||
19 | nice, but after that even FEWER people started writing to me because they | ||
20 | didn't even have to install the patch. <sigh> | ||
21 | |||
22 | Come on, be a sport! Send me a success report! | ||
23 | |||
24 | (hey, that was even better than my original poem... this is getting bad!) | ||
25 | |||
26 | |||
27 | -------- | ||
28 | WARNING: | ||
29 | -------- | ||
30 | |||
31 | If you don't e-mail me about your success/failure soon, I may be forced to | ||
32 | start SINGING. And we don't want that, do we? | ||
33 | |||
34 | (You know, it might be argued that I'm pushing this point a little too much. | ||
35 | If you think so, why not flame me in a quick little e-mail? Please also | ||
36 | include the type of card(s) you're using, software, size of network, and | ||
37 | whether it's working or not.) | ||
38 | |||
39 | My e-mail address is: apenwarr@worldvisions.ca | ||
40 | |||
41 | |||
42 | --------------------------------------------------------------------------- | ||
43 | |||
44 | |||
45 | These are the ARCnet drivers for Linux. | ||
46 | |||
47 | |||
48 | This new release (2.91) has been put together by David Woodhouse | ||
49 | <dwmw2@cam.ac.uk>, in an attempt to tidy up the driver after adding support | ||
50 | for yet another chipset. Now the generic support has been separated from the | ||
51 | individual chipset drivers, and the source files aren't quite so packed with | ||
52 | #ifdefs! I've changed this file a bit, but kept it in the first person from | ||
53 | Avery, because I didn't want to completely rewrite it. | ||
54 | |||
55 | The previous release resulted from many months of on-and-off effort from me | ||
56 | (Avery Pennarun), many bug reports/fixes and suggestions from others, and in | ||
57 | particular a lot of input and coding from Tomasz Motylewski. Starting with | ||
58 | ARCnet 2.10 ALPHA, Tomasz's all-new-and-improved RFC1051 support has been | ||
59 | included and seems to be working fine! | ||
60 | |||
61 | |||
62 | Where do I discuss these drivers? | ||
63 | --------------------------------- | ||
64 | |||
65 | Tomasz has been so kind as to set up a new and improved mailing list. | ||
66 | Subscribe by sending a message with the BODY "subscribe linux-arcnet YOUR | ||
67 | REAL NAME" to listserv@tichy.ch.uj.edu.pl. Then, to submit messages to the | ||
68 | list, mail to linux-arcnet@tichy.ch.uj.edu.pl. | ||
69 | |||
70 | There are archives of the mailing list at: | ||
71 | http://tichy.ch.uj.edu.pl/lists/linux-arcnet | ||
72 | |||
73 | The people on linux-net@vger.kernel.org have also been known to be very | ||
74 | helpful, especially when we're talking about ALPHA Linux kernels that may or | ||
75 | may not work right in the first place. | ||
76 | |||
77 | |||
78 | Other Drivers and Info | ||
79 | ---------------------- | ||
80 | |||
81 | You can try my ARCNET page on the World Wide Web at: | ||
82 | http://www.worldvisions.ca/~apenwarr/arcnet/ | ||
83 | |||
84 | Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you | ||
85 | might be interested in, which includes several drivers for various cards | ||
86 | including ARCnet. Try: | ||
87 | http://www.smc.com/ | ||
88 | |||
89 | Performance Technologies makes various network software that supports | ||
90 | ARCnet: | ||
91 | http://www.perftech.com/ or ftp to ftp.perftech.com. | ||
92 | |||
93 | Novell makes a networking stack for DOS which includes ARCnet drivers. Try | ||
94 | FTPing to ftp.novell.com. | ||
95 | |||
96 | You can get the Crynwr packet driver collection (including arcether.com, the | ||
97 | one you'll want to use with ARCnet cards) from | ||
98 | oak.oakland.edu:/simtel/msdos/pktdrvr. It won't work perfectly on a 386+ | ||
99 | without patches, though, and also doesn't like several cards. Fixed | ||
100 | versions are available on my WWW page, or via e-mail if you don't have WWW | ||
101 | access. | ||
102 | |||
103 | |||
104 | Installing the Driver | ||
105 | --------------------- | ||
106 | |||
107 | All you will need to do in order to install the driver is: | ||
108 | make config | ||
109 | (be sure to choose ARCnet in the network devices | ||
110 | and at least one chipset driver.) | ||
111 | make clean | ||
112 | make zImage | ||
113 | |||
114 | If you obtained this ARCnet package as an upgrade to the ARCnet driver in | ||
115 | your current kernel, you will need to first copy arcnet.c over the one in | ||
116 | the linux/drivers/net directory. | ||
117 | |||
118 | You will know the driver is installed properly if you get some ARCnet | ||
119 | messages when you reboot into the new Linux kernel. | ||
120 | |||
121 | There are four chipset options: | ||
122 | |||
123 | 1. Standard ARCnet COM90xx chipset. | ||
124 | |||
125 | This is the normal ARCnet card, which you've probably got. This is the only | ||
126 | chipset driver which will autoprobe if not told where the card is. | ||
127 | It following options on the command line: | ||
128 | com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name> | ||
129 | |||
130 | If you load the chipset support as a module, the options are: | ||
131 | io=<io> irq=<irq> shmem=<shmem> device=<name> | ||
132 | |||
133 | To disable the autoprobe, just specify "com90xx=" on the kernel command line. | ||
134 | To specify the name alone, but allow autoprobe, just put "com90xx=<name>" | ||
135 | |||
136 | 2. ARCnet COM20020 chipset. | ||
137 | |||
138 | This is the new chipset from SMC with support for promiscuous mode (packet | ||
139 | sniffing), extra diagnostic information, etc. Unfortunately, there is no | ||
140 | sensible method of autoprobing for these cards. You must specify the I/O | ||
141 | address on the kernel command line. | ||
142 | The command line options are: | ||
143 | com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name] | ||
144 | |||
145 | If you load the chipset support as a module, the options are: | ||
146 | io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP> | ||
147 | timeout=<timeout> device=<name> | ||
148 | |||
149 | The COM20020 chipset allows you to set the node ID in software, overriding the | ||
150 | default which is still set in DIP switches on the card. If you don't have the | ||
151 | COM20020 data sheets, and you don't know what the other three options refer | ||
152 | to, then they won't interest you - forget them. | ||
153 | |||
154 | 3. ARCnet COM90xx chipset in IO-mapped mode. | ||
155 | |||
156 | This will also work with the normal ARCnet cards, but doesn't use the shared | ||
157 | memory. It performs less well than the above driver, but is provided in case | ||
158 | you have a card which doesn't support shared memory, or (strangely) in case | ||
159 | you have so many ARCnet cards in your machine that you run out of shmem slots. | ||
160 | If you don't give the IO address on the kernel command line, then the driver | ||
161 | will not find the card. | ||
162 | The command line options are: | ||
163 | com90io=<io>[,<irq>][,<name>] | ||
164 | |||
165 | If you load the chipset support as a module, the options are: | ||
166 | io=<io> irq=<irq> device=<name> | ||
167 | |||
168 | 4. ARCnet RIM I cards. | ||
169 | |||
170 | These are COM90xx chips which are _completely_ memory mapped. The support for | ||
171 | these is not tested. If you have one, please mail the author with a success | ||
172 | report. All options must be specified, except the device name. | ||
173 | Command line options: | ||
174 | arcrimi=<shmem>,<irq>,<node_ID>[,<name>] | ||
175 | |||
176 | If you load the chipset support as a module, the options are: | ||
177 | shmem=<shmem> irq=<irq> node=<node_ID> device=<name> | ||
178 | |||
179 | |||
180 | Loadable Module Support | ||
181 | ----------------------- | ||
182 | |||
183 | Configure and rebuild Linux. When asked, answer 'm' to "Generic ARCnet | ||
184 | support" and to support for your ARCnet chipset if you want to use the | ||
185 | loadable module. You can also say 'y' to "Generic ARCnet support" and 'm' | ||
186 | to the chipset support if you wish. | ||
187 | |||
188 | make config | ||
189 | make clean | ||
190 | make zImage | ||
191 | make modules | ||
192 | |||
193 | If you're using a loadable module, you need to use insmod to load it, and | ||
194 | you can specify various characteristics of your card on the command | ||
195 | line. (In recent versions of the driver, autoprobing is much more reliable | ||
196 | and works as a module, so most of this is now unnecessary.) | ||
197 | |||
198 | For example: | ||
199 | cd /usr/src/linux/modules | ||
200 | insmod arcnet.o | ||
201 | insmod com90xx.o | ||
202 | insmod com20020.o io=0x2e0 device=eth1 | ||
203 | |||
204 | |||
205 | Using the Driver | ||
206 | ---------------- | ||
207 | |||
208 | If you build your kernel with ARCnet COM90xx support included, it should | ||
209 | probe for your card automatically when you boot. If you use a different | ||
210 | chipset driver complied into the kernel, you must give the necessary options | ||
211 | on the kernel command line, as detailed above. | ||
212 | |||
213 | Go read the NET-2-HOWTO and ETHERNET-HOWTO for Linux; they should be | ||
214 | available where you picked up this driver. Think of your ARCnet as a | ||
215 | souped-up (or down, as the case may be) Ethernet card. | ||
216 | |||
217 | By the way, be sure to change all references from "eth0" to "arc0" in the | ||
218 | HOWTOs. Remember that ARCnet isn't a "true" Ethernet, and the device name | ||
219 | is DIFFERENT. | ||
220 | |||
221 | |||
222 | Multiple Cards in One Computer | ||
223 | ------------------------------ | ||
224 | |||
225 | Linux has pretty good support for this now, but since I've been busy, the | ||
226 | ARCnet driver has somewhat suffered in this respect. COM90xx support, if | ||
227 | compiled into the kernel, will (try to) autodetect all the installed cards. | ||
228 | |||
229 | If you have other cards, with support compiled into the kernel, then you can | ||
230 | just repeat the options on the kernel command line, e.g.: | ||
231 | LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260 | ||
232 | |||
233 | If you have the chipset support built as a loadable module, then you need to | ||
234 | do something like this: | ||
235 | insmod -o arc0 com90xx | ||
236 | insmod -o arc1 com20020 io=0x2e0 | ||
237 | insmod -o arc2 com90xx | ||
238 | The ARCnet drivers will now sort out their names automatically. | ||
239 | |||
240 | |||
241 | How do I get it to work with...? | ||
242 | -------------------------------- | ||
243 | |||
244 | NFS: Should be fine linux->linux, just pretend you're using Ethernet cards. | ||
245 | oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients. There | ||
246 | is also a DOS-based NFS server called SOSS. It doesn't multitask | ||
247 | quite the way Linux does (actually, it doesn't multitask AT ALL) but | ||
248 | you never know what you might need. | ||
249 | |||
250 | With AmiTCP (and possibly others), you may need to set the following | ||
251 | options in your Amiga nfstab: MD 1024 MR 1024 MW 1024 | ||
252 | (Thanks to Christian Gottschling <ferksy@indigo.tng.oche.de> | ||
253 | for this.) | ||
254 | |||
255 | Probably these refer to maximum NFS data/read/write block sizes. I | ||
256 | don't know why the defaults on the Amiga didn't work; write to me if | ||
257 | you know more. | ||
258 | |||
259 | DOS: If you're using the freeware arcether.com, you might want to install | ||
260 | the driver patch from my web page. It helps with PC/TCP, and also | ||
261 | can get arcether to load if it timed out too quickly during | ||
262 | initialization. In fact, if you use it on a 386+ you REALLY need | ||
263 | the patch, really. | ||
264 | |||
265 | Windows: See DOS :) Trumpet Winsock works fine with either the Novell or | ||
266 | Arcether client, assuming you remember to load winpkt of course. | ||
267 | |||
268 | LAN Manager and Windows for Workgroups: These programs use protocols that | ||
269 | are incompatible with the Internet standard. They try to pretend | ||
270 | the cards are Ethernet, and confuse everyone else on the network. | ||
271 | |||
272 | However, v2.00 and higher of the Linux ARCnet driver supports this | ||
273 | protocol via the 'arc0e' device. See the section on "Multiprotocol | ||
274 | Support" for more information. | ||
275 | |||
276 | Using the freeware Samba server and clients for Linux, you can now | ||
277 | interface quite nicely with TCP/IP-based WfWg or Lan Manager | ||
278 | networks. | ||
279 | |||
280 | Windows 95: Tools are included with Win95 that let you use either the LANMAN | ||
281 | style network drivers (NDIS) or Novell drivers (ODI) to handle your | ||
282 | ARCnet packets. If you use ODI, you'll need to use the 'arc0' | ||
283 | device with Linux. If you use NDIS, then try the 'arc0e' device. | ||
284 | See the "Multiprotocol Support" section below if you need arc0e, | ||
285 | you're completely insane, and/or you need to build some kind of | ||
286 | hybrid network that uses both encapsulation types. | ||
287 | |||
288 | OS/2: I've been told it works under Warp Connect with an ARCnet driver from | ||
289 | SMC. You need to use the 'arc0e' interface for this. If you get | ||
290 | the SMC driver to work with the TCP/IP stuff included in the | ||
291 | "normal" Warp Bonus Pack, let me know. | ||
292 | |||
293 | ftp.microsoft.com also has a freeware "Lan Manager for OS/2" client | ||
294 | which should use the same protocol as WfWg does. I had no luck | ||
295 | installing it under Warp, however. Please mail me with any results. | ||
296 | |||
297 | NetBSD/AmiTCP: These use an old version of the Internet standard ARCnet | ||
298 | protocol (RFC1051) which is compatible with the Linux driver v2.10 | ||
299 | ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet" | ||
300 | below.) ** Newer versions of NetBSD apparently support RFC1201. | ||
301 | |||
302 | |||
303 | Using Multiprotocol ARCnet | ||
304 | -------------------------- | ||
305 | |||
306 | The ARCnet driver v2.10 ALPHA supports three protocols, each on its own | ||
307 | "virtual network device": | ||
308 | |||
309 | arc0 - RFC1201 protocol, the official Internet standard which just | ||
310 | happens to be 100% compatible with Novell's TRXNET driver. | ||
311 | Version 1.00 of the ARCnet driver supported _only_ this | ||
312 | protocol. arc0 is the fastest of the three protocols (for | ||
313 | whatever reason), and allows larger packets to be used | ||
314 | because it supports RFC1201 "packet splitting" operations. | ||
315 | Unless you have a specific need to use a different protocol, | ||
316 | I strongly suggest that you stick with this one. | ||
317 | |||
318 | arc0e - "Ethernet-Encapsulation" which sends packets over ARCnet | ||
319 | that are actually a lot like Ethernet packets, including the | ||
320 | 6-byte hardware addresses. This protocol is compatible with | ||
321 | Microsoft's NDIS ARCnet driver, like the one in WfWg and | ||
322 | LANMAN. Because the MTU of 493 is actually smaller than the | ||
323 | one "required" by TCP/IP (576), there is a chance that some | ||
324 | network operations will not function properly. The Linux | ||
325 | TCP/IP layer can compensate in most cases, however, by | ||
326 | automatically fragmenting the TCP/IP packets to make them | ||
327 | fit. arc0e also works slightly more slowly than arc0, for | ||
328 | reasons yet to be determined. (Probably it's the smaller | ||
329 | MTU that does it.) | ||
330 | |||
331 | arc0s - The "[s]imple" RFC1051 protocol is the "previous" Internet | ||
332 | standard that is completely incompatible with the new | ||
333 | standard. Some software today, however, continues to | ||
334 | support the old standard (and only the old standard) | ||
335 | including NetBSD and AmiTCP. RFC1051 also does not support | ||
336 | RFC1201's packet splitting, and the MTU of 507 is still | ||
337 | smaller than the Internet "requirement," so it's quite | ||
338 | possible that you may run into problems. It's also slower | ||
339 | than RFC1201 by about 25%, for the same reason as arc0e. | ||
340 | |||
341 | The arc0s support was contributed by Tomasz Motylewski | ||
342 | and modified somewhat by me. Bugs are probably my fault. | ||
343 | |||
344 | You can choose not to compile arc0e and arc0s into the driver if you want - | ||
345 | this will save you a bit of memory and avoid confusion when eg. trying to | ||
346 | use the "NFS-root" stuff in recent Linux kernels. | ||
347 | |||
348 | The arc0e and arc0s devices are created automatically when you first | ||
349 | ifconfig the arc0 device. To actually use them, though, you need to also | ||
350 | ifconfig the other virtual devices you need. There are a number of ways you | ||
351 | can set up your network then: | ||
352 | |||
353 | |||
354 | 1. Single Protocol. | ||
355 | |||
356 | This is the simplest way to configure your network: use just one of the | ||
357 | two available protocols. As mentioned above, it's a good idea to use | ||
358 | only arc0 unless you have a good reason (like some other software, ie. | ||
359 | WfWg, that only works with arc0e). | ||
360 | |||
361 | If you need only arc0, then the following commands should get you going: | ||
362 | ifconfig arc0 MY.IP.ADD.RESS | ||
363 | route add MY.IP.ADD.RESS arc0 | ||
364 | route add -net SUB.NET.ADD.RESS arc0 | ||
365 | [add other local routes here] | ||
366 | |||
367 | If you need arc0e (and only arc0e), it's a little different: | ||
368 | ifconfig arc0 MY.IP.ADD.RESS | ||
369 | ifconfig arc0e MY.IP.ADD.RESS | ||
370 | route add MY.IP.ADD.RESS arc0e | ||
371 | route add -net SUB.NET.ADD.RESS arc0e | ||
372 | |||
373 | arc0s works much the same way as arc0e. | ||
374 | |||
375 | |||
376 | 2. More than one protocol on the same wire. | ||
377 | |||
378 | Now things start getting confusing. To even try it, you may need to be | ||
379 | partly crazy. Here's what *I* did. :) Note that I don't include arc0s in | ||
380 | my home network; I don't have any NetBSD or AmiTCP computers, so I only | ||
381 | use arc0s during limited testing. | ||
382 | |||
383 | I have three computers on my home network; two Linux boxes (which prefer | ||
384 | RFC1201 protocol, for reasons listed above), and one XT that can't run | ||
385 | Linux but runs the free Microsoft LANMAN Client instead. | ||
386 | |||
387 | Worse, one of the Linux computers (freedom) also has a modem and acts as | ||
388 | a router to my Internet provider. The other Linux box (insight) also has | ||
389 | its own IP address and needs to use freedom as its default gateway. The | ||
390 | XT (patience), however, does not have its own Internet IP address and so | ||
391 | I assigned it one on a "private subnet" (as defined by RFC1597). | ||
392 | |||
393 | To start with, take a simple network with just insight and freedom. | ||
394 | Insight needs to: | ||
395 | - talk to freedom via RFC1201 (arc0) protocol, because I like it | ||
396 | more and it's faster. | ||
397 | - use freedom as its Internet gateway. | ||
398 | |||
399 | That's pretty easy to do. Set up insight like this: | ||
400 | ifconfig arc0 insight | ||
401 | route add insight arc0 | ||
402 | route add freedom arc0 /* I would use the subnet here (like I said | ||
403 | to to in "single protocol" above), | ||
404 | but the rest of the subnet | ||
405 | unfortunately lies across the PPP | ||
406 | link on freedom, which confuses | ||
407 | things. */ | ||
408 | route add default gw freedom | ||
409 | |||
410 | And freedom gets configured like so: | ||
411 | ifconfig arc0 freedom | ||
412 | route add freedom arc0 | ||
413 | route add insight arc0 | ||
414 | /* and default gateway is configured by pppd */ | ||
415 | |||
416 | Great, now insight talks to freedom directly on arc0, and sends packets | ||
417 | to the Internet through freedom. If you didn't know how to do the above, | ||
418 | you should probably stop reading this section now because it only gets | ||
419 | worse. | ||
420 | |||
421 | Now, how do I add patience into the network? It will be using LANMAN | ||
422 | Client, which means I need the arc0e device. It needs to be able to talk | ||
423 | to both insight and freedom, and also use freedom as a gateway to the | ||
424 | Internet. (Recall that patience has a "private IP address" which won't | ||
425 | work on the Internet; that's okay, I configured Linux IP masquerading on | ||
426 | freedom for this subnet). | ||
427 | |||
428 | So patience (necessarily; I don't have another IP number from my | ||
429 | provider) has an IP address on a different subnet than freedom and | ||
430 | insight, but needs to use freedom as an Internet gateway. Worse, most | ||
431 | DOS networking programs, including LANMAN, have braindead networking | ||
432 | schemes that rely completely on the netmask and a 'default gateway' to | ||
433 | determine how to route packets. This means that to get to freedom or | ||
434 | insight, patience WILL send through its default gateway, regardless of | ||
435 | the fact that both freedom and insight (courtesy of the arc0e device) | ||
436 | could understand a direct transmission. | ||
437 | |||
438 | I compensate by giving freedom an extra IP address - aliased 'gatekeeper' | ||
439 | - that is on my private subnet, the same subnet that patience is on. I | ||
440 | then define gatekeeper to be the default gateway for patience. | ||
441 | |||
442 | To configure freedom (in addition to the commands above): | ||
443 | ifconfig arc0e gatekeeper | ||
444 | route add gatekeeper arc0e | ||
445 | route add patience arc0e | ||
446 | |||
447 | This way, freedom will send all packets for patience through arc0e, | ||
448 | giving its IP address as gatekeeper (on the private subnet). When it | ||
449 | talks to insight or the Internet, it will use its "freedom" Internet IP | ||
450 | address. | ||
451 | |||
452 | You will notice that we haven't configured the arc0e device on insight. | ||
453 | This would work, but is not really necessary, and would require me to | ||
454 | assign insight another special IP number from my private subnet. Since | ||
455 | both insight and patience are using freedom as their default gateway, the | ||
456 | two can already talk to each other. | ||
457 | |||
458 | It's quite fortunate that I set things up like this the first time (cough | ||
459 | cough) because it's really handy when I boot insight into DOS. There, it | ||
460 | runs the Novell ODI protocol stack, which only works with RFC1201 ARCnet. | ||
461 | In this mode it would be impossible for insight to communicate directly | ||
462 | with patience, since the Novell stack is incompatible with Microsoft's | ||
463 | Ethernet-Encap. Without changing any settings on freedom or patience, I | ||
464 | simply set freedom as the default gateway for insight (now in DOS, | ||
465 | remember) and all the forwarding happens "automagically" between the two | ||
466 | hosts that would normally not be able to communicate at all. | ||
467 | |||
468 | For those who like diagrams, I have created two "virtual subnets" on the | ||
469 | same physical ARCnet wire. You can picture it like this: | ||
470 | |||
471 | |||
472 | [RFC1201 NETWORK] [ETHER-ENCAP NETWORK] | ||
473 | (registered Internet subnet) (RFC1597 private subnet) | ||
474 | |||
475 | (IP Masquerade) | ||
476 | /---------------\ * /---------------\ | ||
477 | | | * | | | ||
478 | | +-Freedom-*-Gatekeeper-+ | | ||
479 | | | | * | | | ||
480 | \-------+-------/ | * \-------+-------/ | ||
481 | | | | | ||
482 | Insight | Patience | ||
483 | (Internet) | ||
484 | |||
485 | |||
486 | |||
487 | It works: what now? | ||
488 | ------------------- | ||
489 | |||
490 | Send mail describing your setup, preferably including driver version, kernel | ||
491 | version, ARCnet card model, CPU type, number of systems on your network, and | ||
492 | list of software in use to me at the following address: | ||
493 | apenwarr@worldvisions.ca | ||
494 | |||
495 | I do send (sometimes automated) replies to all messages I receive. My email | ||
496 | can be weird (and also usually gets forwarded all over the place along the | ||
497 | way to me), so if you don't get a reply within a reasonable time, please | ||
498 | resend. | ||
499 | |||
500 | |||
501 | It doesn't work: what now? | ||
502 | -------------------------- | ||
503 | |||
504 | Do the same as above, but also include the output of the ifconfig and route | ||
505 | commands, as well as any pertinent log entries (ie. anything that starts | ||
506 | with "arcnet:" and has shown up since the last reboot) in your mail. | ||
507 | |||
508 | If you want to try fixing it yourself (I strongly recommend that you mail me | ||
509 | about the problem first, since it might already have been solved) you may | ||
510 | want to try some of the debug levels available. For heavy testing on | ||
511 | D_DURING or more, it would be a REALLY good idea to kill your klogd daemon | ||
512 | first! D_DURING displays 4-5 lines for each packet sent or received. D_TX, | ||
513 | D_RX, and D_SKB actually DISPLAY each packet as it is sent or received, | ||
514 | which is obviously quite big. | ||
515 | |||
516 | Starting with v2.40 ALPHA, the autoprobe routines have changed | ||
517 | significantly. In particular, they won't tell you why the card was not | ||
518 | found unless you turn on the D_INIT_REASONS debugging flag. | ||
519 | |||
520 | Once the driver is running, you can run the arcdump shell script (available | ||
521 | from me or in the full ARCnet package, if you have it) as root to list the | ||
522 | contents of the arcnet buffers at any time. To make any sense at all out of | ||
523 | this, you should grab the pertinent RFCs. (some are listed near the top of | ||
524 | arcnet.c). arcdump assumes your card is at 0xD0000. If it isn't, edit the | ||
525 | script. | ||
526 | |||
527 | Buffers 0 and 1 are used for receiving, and Buffers 2 and 3 are for sending. | ||
528 | Ping-pong buffers are implemented both ways. | ||
529 | |||
530 | If your debug level includes D_DURING and you did NOT define SLOW_XMIT_COPY, | ||
531 | the buffers are cleared to a constant value of 0x42 every time the card is | ||
532 | reset (which should only happen when you do an ifconfig up, or when Linux | ||
533 | decides that the driver is broken). During a transmit, unused parts of the | ||
534 | buffer will be cleared to 0x42 as well. This is to make it easier to figure | ||
535 | out which bytes are being used by a packet. | ||
536 | |||
537 | You can change the debug level without recompiling the kernel by typing: | ||
538 | ifconfig arc0 down metric 1xxx | ||
539 | /etc/rc.d/rc.inet1 | ||
540 | where "xxx" is the debug level you want. For example, "metric 1015" would put | ||
541 | you at debug level 15. Debug level 7 is currently the default. | ||
542 | |||
543 | Note that the debug level is (starting with v1.90 ALPHA) a binary | ||
544 | combination of different debug flags; so debug level 7 is really 1+2+4 or | ||
545 | D_NORMAL+D_EXTRA+D_INIT. To include D_DURING, you would add 16 to this, | ||
546 | resulting in debug level 23. | ||
547 | |||
548 | If you don't understand that, you probably don't want to know anyway. | ||
549 | E-mail me about your problem. | ||
550 | |||
551 | |||
552 | I want to send money: what now? | ||
553 | ------------------------------- | ||
554 | |||
555 | Go take a nap or something. You'll feel better in the morning. | ||
diff --git a/Documentation/networking/atm.txt b/Documentation/networking/atm.txt new file mode 100644 index 000000000000..82921cee77fe --- /dev/null +++ b/Documentation/networking/atm.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | In order to use anything but the most primitive functions of ATM, | ||
2 | several user-mode programs are required to assist the kernel. These | ||
3 | programs and related material can be found via the ATM on Linux Web | ||
4 | page at http://linux-atm.sourceforge.net/ | ||
5 | |||
6 | If you encounter problems with ATM, please report them on the ATM | ||
7 | on Linux mailing list. Subscription information, archives, etc., | ||
8 | can be found on http://linux-atm.sourceforge.net/ | ||
diff --git a/Documentation/networking/ax25.txt b/Documentation/networking/ax25.txt new file mode 100644 index 000000000000..37c25b0925f0 --- /dev/null +++ b/Documentation/networking/ax25.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | To use the amateur radio protocols within Linux you will need to get a | ||
2 | suitable copy of the AX.25 Utilities. More detailed information about these | ||
3 | and associated programs can be found on http://zone.pspt.fi/~jsn/. | ||
4 | |||
5 | For more information about the AX.25, NET/ROM and ROSE protocol stacks, see | ||
6 | the AX25-HOWTO written by Terry Dawson <terry@perf.no.itg.telstra.com.au> | ||
7 | who is also the AX.25 Utilities maintainer. | ||
8 | |||
9 | There is an active mailing list for discussing Linux amateur radio matters | ||
10 | called linux-hams. To subscribe to it, send a message to | ||
11 | majordomo@vger.kernel.org with the words "subscribe linux-hams" in the body | ||
12 | of the message, the subject field is ignored. | ||
13 | |||
14 | Jonathan G4KLX | ||
15 | |||
16 | g4klx@g4klx.demon.co.uk | ||
diff --git a/Documentation/networking/baycom.txt b/Documentation/networking/baycom.txt new file mode 100644 index 000000000000..4e68849d5639 --- /dev/null +++ b/Documentation/networking/baycom.txt | |||
@@ -0,0 +1,158 @@ | |||
1 | LINUX DRIVERS FOR BAYCOM MODEMS | ||
2 | |||
3 | Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch> | ||
4 | |||
5 | !!NEW!! (04/98) The drivers for the baycom modems have been split into | ||
6 | separate drivers as they did not share any code, and the driver | ||
7 | and device names have changed. | ||
8 | |||
9 | This document describes the Linux Kernel Drivers for simple Baycom style | ||
10 | amateur radio modems. | ||
11 | |||
12 | The following drivers are available: | ||
13 | |||
14 | baycom_ser_fdx: | ||
15 | This driver supports the SER12 modems either full or half duplex. | ||
16 | Its baud rate may be changed via the `baud' module parameter, | ||
17 | therefore it supports just about every bit bang modem on a | ||
18 | serial port. Its devices are called bcsf0 through bcsf3. | ||
19 | This is the recommended driver for SER12 type modems, | ||
20 | however if you have a broken UART clone that does not have working | ||
21 | delta status bits, you may try baycom_ser_hdx. | ||
22 | |||
23 | baycom_ser_hdx: | ||
24 | This is an alternative driver for SER12 type modems. | ||
25 | It only supports half duplex, and only 1200 baud. Its devices | ||
26 | are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx | ||
27 | does not work with your UART. | ||
28 | |||
29 | baycom_par: | ||
30 | This driver supports the par96 and picpar modems. | ||
31 | Its devices are called bcp0 through bcp3. | ||
32 | |||
33 | baycom_epp: | ||
34 | This driver supports the EPP modem. | ||
35 | Its devices are called bce0 through bce3. | ||
36 | This driver is work-in-progress. | ||
37 | |||
38 | The following modems are supported: | ||
39 | |||
40 | ser12: This is a very simple 1200 baud AFSK modem. The modem consists only | ||
41 | of a modulator/demodulator chip, usually a TI TCM3105. The computer | ||
42 | is responsible for regenerating the receiver bit clock, as well as | ||
43 | for handling the HDLC protocol. The modem connects to a serial port, | ||
44 | hence the name. Since the serial port is not used as an async serial | ||
45 | port, the kernel driver for serial ports cannot be used, and this | ||
46 | driver only supports standard serial hardware (8250, 16450, 16550) | ||
47 | |||
48 | par96: This is a modem for 9600 baud FSK compatible to the G3RUH standard. | ||
49 | The modem does all the filtering and regenerates the receiver clock. | ||
50 | Data is transferred from and to the PC via a shift register. | ||
51 | The shift register is filled with 16 bits and an interrupt is signalled. | ||
52 | The PC then empties the shift register in a burst. This modem connects | ||
53 | to the parallel port, hence the name. The modem leaves the | ||
54 | implementation of the HDLC protocol and the scrambler polynomial to | ||
55 | the PC. | ||
56 | |||
57 | picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem | ||
58 | is protocol compatible to par96, but uses only three low power ICs | ||
59 | and can therefore be fed from the parallel port and does not require | ||
60 | an additional power supply. Furthermore, it incorporates a carrier | ||
61 | detect circuitry. | ||
62 | |||
63 | EPP: This is a high-speed modem adaptor that connects to an enhanced parallel port. | ||
64 | Its target audience is users working over a high speed hub (76.8kbit/s). | ||
65 | |||
66 | eppfpga: This is a redesign of the EPP adaptor. | ||
67 | |||
68 | |||
69 | |||
70 | All of the above modems only support half duplex communications. However, | ||
71 | the driver supports the KISS (see below) fullduplex command. It then simply | ||
72 | starts to send as soon as there's a packet to transmit and does not care | ||
73 | about DCD, i.e. it starts to send even if there's someone else on the channel. | ||
74 | This command is required by some implementations of the DAMA channel | ||
75 | access protocol. | ||
76 | |||
77 | |||
78 | The Interface of the drivers | ||
79 | |||
80 | Unlike previous drivers, these drivers are no longer character devices, | ||
81 | but they are now true kernel network interfaces. Installation is therefore | ||
82 | simple. Once installed, four interfaces named bc{sf,sh,p,e}[0-3] are available. | ||
83 | sethdlc from the ax25 utilities may be used to set driver states etc. | ||
84 | Users of userland AX.25 stacks may use the net2kiss utility (also available | ||
85 | in the ax25 utilities package) to convert packets of a network interface | ||
86 | to a KISS stream on a pseudo tty. There's also a patch available from | ||
87 | me for WAMPES which allows attaching a kernel network interface directly. | ||
88 | |||
89 | |||
90 | Configuring the driver | ||
91 | |||
92 | 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 | ||
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 | ||
96 | /etc/modprobe.conf). | ||
97 | |||
98 | Examples: | ||
99 | modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 | ||
100 | sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4 | ||
101 | |||
102 | Both lines configure the first port to drive a ser12 modem at the first | ||
103 | serial port (COM1 under DOS). The * in the mode parameter instructs the driver to use | ||
104 | the software DCD algorithm (see below). | ||
105 | |||
106 | insmod baycom_par mode="picpar" iobase=0x378 | ||
107 | sethdlc -i bcp0 -p mode "picpar" io 0x378 | ||
108 | |||
109 | Both lines configure the first port to drive a picpar modem at the | ||
110 | first parallel port (LPT1 under DOS). (Note: picpar implies | ||
111 | hardware DCD, par96 implies software DCD). | ||
112 | |||
113 | The channel access parameters can be set with sethdlc -a or kissparms. | ||
114 | Note that both utilities interpret the values slightly differently. | ||
115 | |||
116 | |||
117 | Hardware DCD versus Software DCD | ||
118 | |||
119 | To avoid collisions on the air, the driver must know when the channel is | ||
120 | busy. This is the task of the DCD circuitry/software. The driver may either | ||
121 | utilise a software DCD algorithm (options=1) or use a DCD signal from | ||
122 | the hardware (options=0). | ||
123 | |||
124 | ser12: if software DCD is utilised, the radio's squelch should always be | ||
125 | open. It is highly recommended to use the software DCD algorithm, | ||
126 | as it is much faster than most hardware squelch circuitry. The | ||
127 | disadvantage is a slightly higher load on the system. | ||
128 | |||
129 | par96: the software DCD algorithm for this type of modem is rather poor. | ||
130 | The modem simply does not provide enough information to implement | ||
131 | a reasonable DCD algorithm in software. Therefore, if your radio | ||
132 | feeds the DCD input of the PAR96 modem, the use of the hardware | ||
133 | DCD circuitry is recommended. | ||
134 | |||
135 | picpar: the picpar modem features a builtin DCD hardware, which is highly | ||
136 | recommended. | ||
137 | |||
138 | |||
139 | |||
140 | Compatibility with the rest of the Linux kernel | ||
141 | |||
142 | The serial driver and the baycom serial drivers compete | ||
143 | for the same hardware resources. Of course only one driver can access a given | ||
144 | interface at a time. The serial driver grabs all interfaces it can find at | ||
145 | startup time. Therefore the baycom drivers subsequently won't be able to | ||
146 | access a serial port. You might therefore find it necessary to release | ||
147 | a port owned by the serial driver with 'setserial /dev/ttyS# uart none', where | ||
148 | # is the number of the interface. The baycom drivers do not reserve any | ||
149 | ports at startup, unless one is specified on the 'insmod' command line. Another | ||
150 | method to solve the problem is to compile all drivers as modules and | ||
151 | leave it to kmod to load the correct driver depending on the application. | ||
152 | |||
153 | The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem | ||
154 | to arbitrate the ports between different client drivers. | ||
155 | |||
156 | vy 73s de | ||
157 | Tom Sailer, sailer@ife.ee.ethz.ch | ||
158 | hb9jnx @ hb9w.ampr.org | ||
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt new file mode 100644 index 000000000000..0bc2ed136a38 --- /dev/null +++ b/Documentation/networking/bonding.txt | |||
@@ -0,0 +1,1618 @@ | |||
1 | |||
2 | Linux Ethernet Bonding Driver HOWTO | ||
3 | |||
4 | Initial release : Thomas Davis <tadavis at lbl.gov> | ||
5 | Corrections, HA extensions : 2000/10/03-15 : | ||
6 | - Willy Tarreau <willy at meta-x.org> | ||
7 | - Constantine Gavrilov <const-g at xpert.com> | ||
8 | - Chad N. Tindel <ctindel at ieee dot org> | ||
9 | - Janice Girouard <girouard at us dot ibm dot com> | ||
10 | - Jay Vosburgh <fubar at us dot ibm dot com> | ||
11 | |||
12 | Reorganized and updated Feb 2005 by Jay Vosburgh | ||
13 | |||
14 | Note : | ||
15 | ------ | ||
16 | |||
17 | The bonding driver originally came from Donald Becker's beowulf patches for | ||
18 | kernel 2.0. It has changed quite a bit since, and the original tools from | ||
19 | extreme-linux and beowulf sites will not work with this version of the driver. | ||
20 | |||
21 | For new versions of the driver, patches for older kernels and the updated | ||
22 | userspace tools, please follow the links at the end of this file. | ||
23 | |||
24 | Table of Contents | ||
25 | ================= | ||
26 | |||
27 | 1. Bonding Driver Installation | ||
28 | |||
29 | 2. Bonding Driver Options | ||
30 | |||
31 | 3. Configuring Bonding Devices | ||
32 | 3.1 Configuration with sysconfig support | ||
33 | 3.2 Configuration with initscripts support | ||
34 | 3.3 Configuring Bonding Manually | ||
35 | 3.4 Configuring Multiple Bonds | ||
36 | |||
37 | 5. Querying Bonding Configuration | ||
38 | 5.1 Bonding Configuration | ||
39 | 5.2 Network Configuration | ||
40 | |||
41 | 6. Switch Configuration | ||
42 | |||
43 | 7. 802.1q VLAN Support | ||
44 | |||
45 | 8. Link Monitoring | ||
46 | 8.1 ARP Monitor Operation | ||
47 | 8.2 Configuring Multiple ARP Targets | ||
48 | 8.3 MII Monitor Operation | ||
49 | |||
50 | 9. Potential Trouble Sources | ||
51 | 9.1 Adventures in Routing | ||
52 | 9.2 Ethernet Device Renaming | ||
53 | 9.3 Painfully Slow Or No Failed Link Detection By Miimon | ||
54 | |||
55 | 10. SNMP agents | ||
56 | |||
57 | 11. Promiscuous mode | ||
58 | |||
59 | 12. High Availability Information | ||
60 | 12.1 High Availability in a Single Switch Topology | ||
61 | 12.1.1 Bonding Mode Selection for Single Switch Topology | ||
62 | 12.1.2 Link Monitoring for Single Switch Topology | ||
63 | 12.2 High Availability in a Multiple Switch Topology | ||
64 | 12.2.1 Bonding Mode Selection for Multiple Switch Topology | ||
65 | 12.2.2 Link Monitoring for Multiple Switch Topology | ||
66 | 12.3 Switch Behavior Issues for High Availability | ||
67 | |||
68 | 13. Hardware Specific Considerations | ||
69 | 13.1 IBM BladeCenter | ||
70 | |||
71 | 14. Frequently Asked Questions | ||
72 | |||
73 | 15. Resources and Links | ||
74 | |||
75 | |||
76 | 1. Bonding Driver Installation | ||
77 | ============================== | ||
78 | |||
79 | Most popular distro kernels ship with the bonding driver | ||
80 | already available as a module and the ifenslave user level control | ||
81 | program installed and ready for use. If your distro does not, or you | ||
82 | have need to compile bonding from source (e.g., configuring and | ||
83 | installing a mainline kernel from kernel.org), you'll need to perform | ||
84 | the following steps: | ||
85 | |||
86 | 1.1 Configure and build the kernel with bonding | ||
87 | ----------------------------------------------- | ||
88 | |||
89 | The latest version of the bonding driver is available in the | ||
90 | drivers/net/bonding subdirectory of the most recent kernel source | ||
91 | (which is available on http://kernel.org). | ||
92 | |||
93 | Prior to the 2.4.11 kernel, the bonding driver was maintained | ||
94 | largely outside the kernel tree; patches for some earlier kernels are | ||
95 | available on the bonding sourceforge site, although those patches are | ||
96 | still several years out of date. Most users will want to use either | ||
97 | the most recent kernel from kernel.org or whatever kernel came with | ||
98 | their distro. | ||
99 | |||
100 | Configure kernel with "make menuconfig" (or "make xconfig" or | ||
101 | "make config"), then select "Bonding driver support" in the "Network | ||
102 | device support" section. It is recommended that you configure the | ||
103 | driver as module since it is currently the only way to pass parameters | ||
104 | to the driver or configure more than one bonding device. | ||
105 | |||
106 | Build and install the new kernel and modules, then proceed to | ||
107 | step 2. | ||
108 | |||
109 | 1.2 Install ifenslave Control Utility | ||
110 | ------------------------------------- | ||
111 | |||
112 | The ifenslave user level control program is included in the | ||
113 | kernel source tree, in the file Documentation/networking/ifenslave.c. | ||
114 | It is generally recommended that you use the ifenslave that | ||
115 | corresponds to the kernel that you are using (either from the same | ||
116 | source tree or supplied with the distro), however, ifenslave | ||
117 | executables from older kernels should function (but features newer | ||
118 | than the ifenslave release are not supported). Running an ifenslave | ||
119 | that is newer than the kernel is not supported, and may or may not | ||
120 | work. | ||
121 | |||
122 | To install ifenslave, do the following: | ||
123 | |||
124 | # gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave | ||
125 | # cp ifenslave /sbin/ifenslave | ||
126 | |||
127 | If your kernel source is not in "/usr/src/linux," then replace | ||
128 | "/usr/src/linux/include" in the above with the location of your kernel | ||
129 | source include directory. | ||
130 | |||
131 | You may wish to back up any existing /sbin/ifenslave, or, for | ||
132 | testing or informal use, tag the ifenslave to the kernel version | ||
133 | (e.g., name the ifenslave executable /sbin/ifenslave-2.6.10). | ||
134 | |||
135 | IMPORTANT NOTE: | ||
136 | |||
137 | If you omit the "-I" or specify an incorrect directory, you | ||
138 | may end up with an ifenslave that is incompatible with the kernel | ||
139 | you're trying to build it for. Some distros (e.g., Red Hat from 7.1 | ||
140 | onwards) do not have /usr/include/linux symbolically linked to the | ||
141 | default kernel source include directory. | ||
142 | |||
143 | |||
144 | 2. Bonding Driver Options | ||
145 | ========================= | ||
146 | |||
147 | Options for the bonding driver are supplied as parameters to | ||
148 | the bonding module at load time. They may be given as command line | ||
149 | arguments to the insmod or modprobe command, but are usually specified | ||
150 | in either the /etc/modprobe.conf configuration file, or in a | ||
151 | distro-specific configuration file (some of which are detailed in the | ||
152 | next section). | ||
153 | |||
154 | The available bonding driver parameters are listed below. If a | ||
155 | parameter is not specified the default value is used. When initially | ||
156 | configuring a bond, it is recommended "tail -f /var/log/messages" be | ||
157 | run in a separate window to watch for bonding driver error messages. | ||
158 | |||
159 | It is critical that either the miimon or arp_interval and | ||
160 | arp_ip_target parameters be specified, otherwise serious network | ||
161 | degradation will occur during link failures. Very few devices do not | ||
162 | support at least miimon, so there is really no reason not to use it. | ||
163 | |||
164 | Options with textual values will accept either the text name | ||
165 | or, for backwards compatibility, the option value. E.g., | ||
166 | "mode=802.3ad" and "mode=4" set the same mode. | ||
167 | |||
168 | The parameters are as follows: | ||
169 | |||
170 | arp_interval | ||
171 | |||
172 | Specifies the ARP monitoring frequency in milli-seconds. If | ||
173 | ARP monitoring is used in a load-balancing mode (mode 0 or 2), | ||
174 | the switch should be configured in a mode that evenly | ||
175 | distributes packets across all links - such as round-robin. If | ||
176 | the switch is configured to distribute the packets in an XOR | ||
177 | fashion, all replies from the ARP targets will be received on | ||
178 | the same link which could cause the other team members to | ||
179 | fail. ARP monitoring should not be used in conjunction with | ||
180 | miimon. A value of 0 disables ARP monitoring. The default | ||
181 | value is 0. | ||
182 | |||
183 | arp_ip_target | ||
184 | |||
185 | Specifies the ip addresses to use when arp_interval is > 0. | ||
186 | These are the targets of the ARP request sent to determine the | ||
187 | health of the link to the targets. Specify these values in | ||
188 | ddd.ddd.ddd.ddd format. Multiple ip adresses must be | ||
189 | seperated by a comma. At least one IP address must be given | ||
190 | for ARP monitoring to function. The maximum number of targets | ||
191 | that can be specified is 16. The default value is no IP | ||
192 | addresses. | ||
193 | |||
194 | downdelay | ||
195 | |||
196 | Specifies the time, in milliseconds, to wait before disabling | ||
197 | a slave after a link failure has been detected. This option | ||
198 | is only valid for the miimon link monitor. The downdelay | ||
199 | value should be a multiple of the miimon value; if not, it | ||
200 | will be rounded down to the nearest multiple. The default | ||
201 | value is 0. | ||
202 | |||
203 | lacp_rate | ||
204 | |||
205 | Option specifying the rate in which we'll ask our link partner | ||
206 | to transmit LACPDU packets in 802.3ad mode. Possible values | ||
207 | are: | ||
208 | |||
209 | slow or 0 | ||
210 | Request partner to transmit LACPDUs every 30 seconds (default) | ||
211 | |||
212 | fast or 1 | ||
213 | Request partner to transmit LACPDUs every 1 second | ||
214 | |||
215 | max_bonds | ||
216 | |||
217 | Specifies the number of bonding devices to create for this | ||
218 | instance of the bonding driver. E.g., if max_bonds is 3, and | ||
219 | the bonding driver is not already loaded, then bond0, bond1 | ||
220 | and bond2 will be created. The default value is 1. | ||
221 | |||
222 | miimon | ||
223 | |||
224 | Specifies the frequency in milli-seconds that MII link | ||
225 | monitoring will occur. A value of zero disables MII link | ||
226 | monitoring. A value of 100 is a good starting point. The | ||
227 | use_carrier option, below, affects how the link state is | ||
228 | determined. See the High Availability section for additional | ||
229 | information. The default value is 0. | ||
230 | |||
231 | mode | ||
232 | |||
233 | Specifies one of the bonding policies. The default is | ||
234 | balance-rr (round robin). Possible values are: | ||
235 | |||
236 | balance-rr or 0 | ||
237 | |||
238 | Round-robin policy: Transmit packets in sequential | ||
239 | order from the first available slave through the | ||
240 | last. This mode provides load balancing and fault | ||
241 | tolerance. | ||
242 | |||
243 | active-backup or 1 | ||
244 | |||
245 | Active-backup policy: Only one slave in the bond is | ||
246 | active. A different slave becomes active if, and only | ||
247 | if, the active slave fails. The bond's MAC address is | ||
248 | externally visible on only one port (network adapter) | ||
249 | to avoid confusing the switch. This mode provides | ||
250 | fault tolerance. The primary option affects the | ||
251 | behavior of this mode. | ||
252 | |||
253 | balance-xor or 2 | ||
254 | |||
255 | XOR policy: Transmit based on [(source MAC address | ||
256 | XOR'd with destination MAC address) modulo slave | ||
257 | count]. This selects the same slave for each | ||
258 | destination MAC address. This mode provides load | ||
259 | balancing and fault tolerance. | ||
260 | |||
261 | broadcast or 3 | ||
262 | |||
263 | Broadcast policy: transmits everything on all slave | ||
264 | interfaces. This mode provides fault tolerance. | ||
265 | |||
266 | 802.3ad or 4 | ||
267 | |||
268 | IEEE 802.3ad Dynamic link aggregation. Creates | ||
269 | aggregation groups that share the same speed and | ||
270 | duplex settings. Utilizes all slaves in the active | ||
271 | aggregator according to the 802.3ad specification. | ||
272 | |||
273 | Pre-requisites: | ||
274 | |||
275 | 1. Ethtool support in the base drivers for retrieving | ||
276 | the speed and duplex of each slave. | ||
277 | |||
278 | 2. A switch that supports IEEE 802.3ad Dynamic link | ||
279 | aggregation. | ||
280 | |||
281 | Most switches will require some type of configuration | ||
282 | to enable 802.3ad mode. | ||
283 | |||
284 | balance-tlb or 5 | ||
285 | |||
286 | Adaptive transmit load balancing: channel bonding that | ||
287 | does not require any special switch support. The | ||
288 | outgoing traffic is distributed according to the | ||
289 | current load (computed relative to the speed) on each | ||
290 | slave. Incoming traffic is received by the current | ||
291 | slave. If the receiving slave fails, another slave | ||
292 | takes over the MAC address of the failed receiving | ||
293 | slave. | ||
294 | |||
295 | Prerequisite: | ||
296 | |||
297 | Ethtool support in the base drivers for retrieving the | ||
298 | speed of each slave. | ||
299 | |||
300 | balance-alb or 6 | ||
301 | |||
302 | Adaptive load balancing: includes balance-tlb plus | ||
303 | receive load balancing (rlb) for IPV4 traffic, and | ||
304 | does not require any special switch support. The | ||
305 | receive load balancing is achieved by ARP negotiation. | ||
306 | The bonding driver intercepts the ARP Replies sent by | ||
307 | the local system on their way out and overwrites the | ||
308 | source hardware address with the unique hardware | ||
309 | address of one of the slaves in the bond such that | ||
310 | different peers use different hardware addresses for | ||
311 | the server. | ||
312 | |||
313 | Receive traffic from connections created by the server | ||
314 | is also balanced. When the local system sends an ARP | ||
315 | Request the bonding driver copies and saves the peer's | ||
316 | IP information from the ARP packet. When the ARP | ||
317 | Reply arrives from the peer, its hardware address is | ||
318 | retrieved and the bonding driver initiates an ARP | ||
319 | reply to this peer assigning it to one of the slaves | ||
320 | in the bond. A problematic outcome of using ARP | ||
321 | negotiation for balancing is that each time that an | ||
322 | ARP request is broadcast it uses the hardware address | ||
323 | of the bond. Hence, peers learn the hardware address | ||
324 | of the bond and the balancing of receive traffic | ||
325 | collapses to the current slave. This is handled by | ||
326 | sending updates (ARP Replies) to all the peers with | ||
327 | their individually assigned hardware address such that | ||
328 | the traffic is redistributed. Receive traffic is also | ||
329 | redistributed when a new slave is added to the bond | ||
330 | and when an inactive slave is re-activated. The | ||
331 | receive load is distributed sequentially (round robin) | ||
332 | among the group of highest speed slaves in the bond. | ||
333 | |||
334 | When a link is reconnected or a new slave joins the | ||
335 | bond the receive traffic is redistributed among all | ||
336 | active slaves in the bond by intiating ARP Replies | ||
337 | with the selected mac address to each of the | ||
338 | clients. The updelay parameter (detailed below) must | ||
339 | be set to a value equal or greater than the switch's | ||
340 | forwarding delay so that the ARP Replies sent to the | ||
341 | peers will not be blocked by the switch. | ||
342 | |||
343 | Prerequisites: | ||
344 | |||
345 | 1. Ethtool support in the base drivers for retrieving | ||
346 | the speed of each slave. | ||
347 | |||
348 | 2. Base driver support for setting the hardware | ||
349 | address of a device while it is open. This is | ||
350 | required so that there will always be one slave in the | ||
351 | team using the bond hardware address (the | ||
352 | curr_active_slave) while having a unique hardware | ||
353 | address for each slave in the bond. If the | ||
354 | curr_active_slave fails its hardware address is | ||
355 | swapped with the new curr_active_slave that was | ||
356 | chosen. | ||
357 | |||
358 | primary | ||
359 | |||
360 | A string (eth0, eth2, etc) specifying which slave is the | ||
361 | primary device. The specified device will always be the | ||
362 | active slave while it is available. Only when the primary is | ||
363 | off-line will alternate devices be used. This is useful when | ||
364 | one slave is preferred over another, e.g., when one slave has | ||
365 | higher throughput than another. | ||
366 | |||
367 | The primary option is only valid for active-backup mode. | ||
368 | |||
369 | updelay | ||
370 | |||
371 | Specifies the time, in milliseconds, to wait before enabling a | ||
372 | slave after a link recovery has been detected. This option is | ||
373 | only valid for the miimon link monitor. The updelay value | ||
374 | should be a multiple of the miimon value; if not, it will be | ||
375 | rounded down to the nearest multiple. The default value is 0. | ||
376 | |||
377 | use_carrier | ||
378 | |||
379 | Specifies whether or not miimon should use MII or ETHTOOL | ||
380 | ioctls vs. netif_carrier_ok() to determine the link | ||
381 | status. The MII or ETHTOOL ioctls are less efficient and | ||
382 | utilize a deprecated calling sequence within the kernel. The | ||
383 | netif_carrier_ok() relies on the device driver to maintain its | ||
384 | state with netif_carrier_on/off; at this writing, most, but | ||
385 | not all, device drivers support this facility. | ||
386 | |||
387 | If bonding insists that the link is up when it should not be, | ||
388 | it may be that your network device driver does not support | ||
389 | netif_carrier_on/off. The default state for netif_carrier is | ||
390 | "carrier on," so if a driver does not support netif_carrier, | ||
391 | it will appear as if the link is always up. In this case, | ||
392 | setting use_carrier to 0 will cause bonding to revert to the | ||
393 | MII / ETHTOOL ioctl method to determine the link state. | ||
394 | |||
395 | A value of 1 enables the use of netif_carrier_ok(), a value of | ||
396 | 0 will use the deprecated MII / ETHTOOL ioctls. The default | ||
397 | value is 1. | ||
398 | |||
399 | |||
400 | |||
401 | 3. Configuring Bonding Devices | ||
402 | ============================== | ||
403 | |||
404 | There are, essentially, two methods for configuring bonding: | ||
405 | with support from the distro's network initialization scripts, and | ||
406 | without. Distros generally use one of two packages for the network | ||
407 | initialization scripts: initscripts or sysconfig. Recent versions of | ||
408 | these packages have support for bonding, while older versions do not. | ||
409 | |||
410 | We will first describe the options for configuring bonding for | ||
411 | distros using versions of initscripts and sysconfig with full or | ||
412 | partial support for bonding, then provide information on enabling | ||
413 | bonding without support from the network initialization scripts (i.e., | ||
414 | older versions of initscripts or sysconfig). | ||
415 | |||
416 | If you're unsure whether your distro uses sysconfig or | ||
417 | initscripts, or don't know if it's new enough, have no fear. | ||
418 | Determining this is fairly straightforward. | ||
419 | |||
420 | First, issue the command: | ||
421 | |||
422 | $ rpm -qf /sbin/ifup | ||
423 | |||
424 | It will respond with a line of text starting with either | ||
425 | "initscripts" or "sysconfig," followed by some numbers. This is the | ||
426 | package that provides your network initialization scripts. | ||
427 | |||
428 | Next, to determine if your installation supports bonding, | ||
429 | issue the command: | ||
430 | |||
431 | $ grep ifenslave /sbin/ifup | ||
432 | |||
433 | If this returns any matches, then your initscripts or | ||
434 | sysconfig has support for bonding. | ||
435 | |||
436 | 3.1 Configuration with sysconfig support | ||
437 | ---------------------------------------- | ||
438 | |||
439 | This section applies to distros using a version of sysconfig | ||
440 | with bonding support, for example, SuSE Linux Enterprise Server 9. | ||
441 | |||
442 | SuSE SLES 9's networking configuration system does support | ||
443 | bonding, however, at this writing, the YaST system configuration | ||
444 | frontend does not provide any means to work with bonding devices. | ||
445 | Bonding devices can be managed by hand, however, as follows. | ||
446 | |||
447 | First, if they have not already been configured, configure the | ||
448 | slave devices. On SLES 9, this is most easily done by running the | ||
449 | yast2 sysconfig configuration utility. The goal is for to create an | ||
450 | ifcfg-id file for each slave device. The simplest way to accomplish | ||
451 | this is to configure the devices for DHCP. The name of the | ||
452 | configuration file for each device will be of the form: | ||
453 | |||
454 | ifcfg-id-xx:xx:xx:xx:xx:xx | ||
455 | |||
456 | Where the "xx" portion will be replaced with the digits from | ||
457 | the device's permanent MAC address. | ||
458 | |||
459 | Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been | ||
460 | created, it is necessary to edit the configuration files for the slave | ||
461 | devices (the MAC addresses correspond to those of the slave devices). | ||
462 | Before editing, the file will contain muliple lines, and will look | ||
463 | something like this: | ||
464 | |||
465 | BOOTPROTO='dhcp' | ||
466 | STARTMODE='on' | ||
467 | USERCTL='no' | ||
468 | UNIQUE='XNzu.WeZGOGF+4wE' | ||
469 | _nm_name='bus-pci-0001:61:01.0' | ||
470 | |||
471 | Change the BOOTPROTO and STARTMODE lines to the following: | ||
472 | |||
473 | BOOTPROTO='none' | ||
474 | STARTMODE='off' | ||
475 | |||
476 | Do not alter the UNIQUE or _nm_name lines. Remove any other | ||
477 | lines (USERCTL, etc). | ||
478 | |||
479 | Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified, | ||
480 | it's time to create the configuration file for the bonding device | ||
481 | itself. This file is named ifcfg-bondX, where X is the number of the | ||
482 | bonding device to create, starting at 0. The first such file is | ||
483 | ifcfg-bond0, the second is ifcfg-bond1, and so on. The sysconfig | ||
484 | network configuration system will correctly start multiple instances | ||
485 | of bonding. | ||
486 | |||
487 | The contents of the ifcfg-bondX file is as follows: | ||
488 | |||
489 | BOOTPROTO="static" | ||
490 | BROADCAST="10.0.2.255" | ||
491 | IPADDR="10.0.2.10" | ||
492 | NETMASK="255.255.0.0" | ||
493 | NETWORK="10.0.2.0" | ||
494 | REMOTE_IPADDR="" | ||
495 | STARTMODE="onboot" | ||
496 | BONDING_MASTER="yes" | ||
497 | BONDING_MODULE_OPTS="mode=active-backup miimon=100" | ||
498 | BONDING_SLAVE0="eth0" | ||
499 | BONDING_SLAVE1="eth1" | ||
500 | |||
501 | Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK | ||
502 | values with the appropriate values for your network. | ||
503 | |||
504 | Note that configuring the bonding device with BOOTPROTO='dhcp' | ||
505 | does not work; the scripts attempt to obtain the device address from | ||
506 | DHCP prior to adding any of the slave devices. Without active slaves, | ||
507 | the DHCP requests are not sent to the network. | ||
508 | |||
509 | The STARTMODE specifies when the device is brought online. | ||
510 | The possible values are: | ||
511 | |||
512 | onboot: The device is started at boot time. If you're not | ||
513 | sure, this is probably what you want. | ||
514 | |||
515 | manual: The device is started only when ifup is called | ||
516 | manually. Bonding devices may be configured this | ||
517 | way if you do not wish them to start automatically | ||
518 | at boot for some reason. | ||
519 | |||
520 | hotplug: The device is started by a hotplug event. This is not | ||
521 | a valid choice for a bonding device. | ||
522 | |||
523 | off or ignore: The device configuration is ignored. | ||
524 | |||
525 | The line BONDING_MASTER='yes' indicates that the device is a | ||
526 | bonding master device. The only useful value is "yes." | ||
527 | |||
528 | The contents of BONDING_MODULE_OPTS are supplied to the | ||
529 | instance of the bonding module for this device. Specify the options | ||
530 | for the bonding mode, link monitoring, and so on here. Do not include | ||
531 | the max_bonds bonding parameter; this will confuse the configuration | ||
532 | system if you have multiple bonding devices. | ||
533 | |||
534 | Finally, supply one BONDING_SLAVEn="ethX" for each slave, | ||
535 | where "n" is an increasing value, one for each slave, and "ethX" is | ||
536 | the name of the slave device (eth0, eth1, etc). | ||
537 | |||
538 | When all configuration files have been modified or created, | ||
539 | networking must be restarted for the configuration changes to take | ||
540 | effect. This can be accomplished via the following: | ||
541 | |||
542 | # /etc/init.d/network restart | ||
543 | |||
544 | Note that the network control script (/sbin/ifdown) will | ||
545 | remove the bonding module as part of the network shutdown processing, | ||
546 | so it is not necessary to remove the module by hand if, e.g., the | ||
547 | module paramters have changed. | ||
548 | |||
549 | Also, at this writing, YaST/YaST2 will not manage bonding | ||
550 | devices (they do not show bonding interfaces on its list of network | ||
551 | devices). It is necessary to edit the configuration file by hand to | ||
552 | change the bonding configuration. | ||
553 | |||
554 | Additional general options and details of the ifcfg file | ||
555 | format can be found in an example ifcfg template file: | ||
556 | |||
557 | /etc/sysconfig/network/ifcfg.template | ||
558 | |||
559 | Note that the template does not document the various BONDING_ | ||
560 | settings described above, but does describe many of the other options. | ||
561 | |||
562 | 3.2 Configuration with initscripts support | ||
563 | ------------------------------------------ | ||
564 | |||
565 | This section applies to distros using a version of initscripts | ||
566 | with bonding support, for example, Red Hat Linux 9 or Red Hat | ||
567 | Enterprise Linux version 3. On these systems, the network | ||
568 | initialization scripts have some knowledge of bonding, and can be | ||
569 | configured to control bonding devices. | ||
570 | |||
571 | These distros will not automatically load the network adapter | ||
572 | driver unless the ethX device is configured with an IP address. | ||
573 | Because of this constraint, users must manually configure a | ||
574 | network-script file for all physical adapters that will be members of | ||
575 | a bondX link. Network script files are located in the directory: | ||
576 | |||
577 | /etc/sysconfig/network-scripts | ||
578 | |||
579 | The file name must be prefixed with "ifcfg-eth" and suffixed | ||
580 | with the adapter's physical adapter number. For example, the script | ||
581 | for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0. | ||
582 | Place the following text in the file: | ||
583 | |||
584 | DEVICE=eth0 | ||
585 | USERCTL=no | ||
586 | ONBOOT=yes | ||
587 | MASTER=bond0 | ||
588 | SLAVE=yes | ||
589 | BOOTPROTO=none | ||
590 | |||
591 | The DEVICE= line will be different for every ethX device and | ||
592 | must correspond with the name of the file, i.e., ifcfg-eth1 must have | ||
593 | a device line of DEVICE=eth1. The setting of the MASTER= line will | ||
594 | also depend on the final bonding interface name chosen for your bond. | ||
595 | As with other network devices, these typically start at 0, and go up | ||
596 | one for each device, i.e., the first bonding instance is bond0, the | ||
597 | second is bond1, and so on. | ||
598 | |||
599 | Next, create a bond network script. The file name for this | ||
600 | script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is | ||
601 | the number of the bond. For bond0 the file is named "ifcfg-bond0", | ||
602 | for bond1 it is named "ifcfg-bond1", and so on. Within that file, | ||
603 | place the following text: | ||
604 | |||
605 | DEVICE=bond0 | ||
606 | IPADDR=192.168.1.1 | ||
607 | NETMASK=255.255.255.0 | ||
608 | NETWORK=192.168.1.0 | ||
609 | BROADCAST=192.168.1.255 | ||
610 | ONBOOT=yes | ||
611 | BOOTPROTO=none | ||
612 | USERCTL=no | ||
613 | |||
614 | Be sure to change the networking specific lines (IPADDR, | ||
615 | NETMASK, NETWORK and BROADCAST) to match your network configuration. | ||
616 | |||
617 | Finally, it is necessary to edit /etc/modules.conf to load the | ||
618 | bonding module when the bond0 interface is brought up. The following | ||
619 | sample lines in /etc/modules.conf will load the bonding module, and | ||
620 | select its options: | ||
621 | |||
622 | alias bond0 bonding | ||
623 | options bond0 mode=balance-alb miimon=100 | ||
624 | |||
625 | Replace the sample parameters with the appropriate set of | ||
626 | options for your configuration. | ||
627 | |||
628 | Finally run "/etc/rc.d/init.d/network restart" as root. This | ||
629 | will restart the networking subsystem and your bond link should be now | ||
630 | up and running. | ||
631 | |||
632 | |||
633 | 3.3 Configuring Bonding Manually | ||
634 | -------------------------------- | ||
635 | |||
636 | This section applies to distros whose network initialization | ||
637 | scripts (the sysconfig or initscripts package) do not have specific | ||
638 | knowledge of bonding. One such distro is SuSE Linux Enterprise Server | ||
639 | version 8. | ||
640 | |||
641 | The general methodology for these systems is to place the | ||
642 | bonding module parameters into /etc/modprobe.conf, then add modprobe | ||
643 | and/or ifenslave commands to the system's global init script. The | ||
644 | name of the global init script differs; for sysconfig, it is | ||
645 | /etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local. | ||
646 | |||
647 | For example, if you wanted to make a simple bond of two e100 | ||
648 | devices (presumed to be eth0 and eth1), and have it persist across | ||
649 | reboots, edit the appropriate file (/etc/init.d/boot.local or | ||
650 | /etc/rc.d/rc.local), and add the following: | ||
651 | |||
652 | modprobe bonding -obond0 mode=balance-alb miimon=100 | ||
653 | modprobe e100 | ||
654 | ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up | ||
655 | ifenslave bond0 eth0 | ||
656 | ifenslave bond0 eth1 | ||
657 | |||
658 | Replace the example bonding module parameters and bond0 | ||
659 | network configuration (IP address, netmask, etc) with the appropriate | ||
660 | values for your configuration. The above example loads the bonding | ||
661 | module with the name "bond0," this simplifies the naming if multiple | ||
662 | bonding modules are loaded (each successive instance of the module is | ||
663 | given a different name, and the module instance names match the | ||
664 | bonding interface names). | ||
665 | |||
666 | Unfortunately, this method will not provide support for the | ||
667 | ifup and ifdown scripts on the bond devices. To reload the bonding | ||
668 | configuration, it is necessary to run the initialization script, e.g., | ||
669 | |||
670 | # /etc/init.d/boot.local | ||
671 | |||
672 | or | ||
673 | |||
674 | # /etc/rc.d/rc.local | ||
675 | |||
676 | It may be desirable in such a case to create a separate script | ||
677 | which only initializes the bonding configuration, then call that | ||
678 | separate script from within boot.local. This allows for bonding to be | ||
679 | enabled without re-running the entire global init script. | ||
680 | |||
681 | To shut down the bonding devices, it is necessary to first | ||
682 | mark the bonding device itself as being down, then remove the | ||
683 | appropriate device driver modules. For our example above, you can do | ||
684 | the following: | ||
685 | |||
686 | # ifconfig bond0 down | ||
687 | # rmmod bond0 | ||
688 | # rmmod e100 | ||
689 | |||
690 | Again, for convenience, it may be desirable to create a script | ||
691 | with these commands. | ||
692 | |||
693 | |||
694 | 3.4 Configuring Multiple Bonds | ||
695 | ------------------------------ | ||
696 | |||
697 | This section contains information on configuring multiple | ||
698 | bonding devices with differing options. If you require multiple | ||
699 | bonding devices, but all with the same options, see the "max_bonds" | ||
700 | module paramter, documented above. | ||
701 | |||
702 | To create multiple bonding devices with differing options, it | ||
703 | is necessary to load the bonding driver multiple times. Note that | ||
704 | current versions of the sysconfig network initialization scripts | ||
705 | handle this automatically; if your distro uses these scripts, no | ||
706 | special action is needed. See the section Configuring Bonding | ||
707 | Devices, above, if you're not sure about your network initialization | ||
708 | scripts. | ||
709 | |||
710 | To load multiple instances of the module, it is necessary to | ||
711 | specify a different name for each instance (the module loading system | ||
712 | requires that every loaded module, even multiple instances of the same | ||
713 | module, have a unique name). This is accomplished by supplying | ||
714 | multiple sets of bonding options in /etc/modprobe.conf, for example: | ||
715 | |||
716 | alias bond0 bonding | ||
717 | options bond0 -o bond0 mode=balance-rr miimon=100 | ||
718 | |||
719 | alias bond1 bonding | ||
720 | options bond1 -o bond1 mode=balance-alb miimon=50 | ||
721 | |||
722 | will load the bonding module two times. The first instance is | ||
723 | named "bond0" and creates the bond0 device in balance-rr mode with an | ||
724 | miimon of 100. The second instance is named "bond1" and creates the | ||
725 | bond1 device in balance-alb mode with an miimon of 50. | ||
726 | |||
727 | This may be repeated any number of times, specifying a new and | ||
728 | unique name in place of bond0 or bond1 for each instance. | ||
729 | |||
730 | When the appropriate module paramters are in place, then | ||
731 | configure bonding according to the instructions for your distro. | ||
732 | |||
733 | 5. Querying Bonding Configuration | ||
734 | ================================= | ||
735 | |||
736 | 5.1 Bonding Configuration | ||
737 | ------------------------- | ||
738 | |||
739 | Each bonding device has a read-only file residing in the | ||
740 | /proc/net/bonding directory. The file contents include information | ||
741 | about the bonding configuration, options and state of each slave. | ||
742 | |||
743 | For example, the contents of /proc/net/bonding/bond0 after the | ||
744 | driver is loaded with parameters of mode=0 and miimon=1000 is | ||
745 | generally as follows: | ||
746 | |||
747 | Ethernet Channel Bonding Driver: 2.6.1 (October 29, 2004) | ||
748 | Bonding Mode: load balancing (round-robin) | ||
749 | Currently Active Slave: eth0 | ||
750 | MII Status: up | ||
751 | MII Polling Interval (ms): 1000 | ||
752 | Up Delay (ms): 0 | ||
753 | Down Delay (ms): 0 | ||
754 | |||
755 | Slave Interface: eth1 | ||
756 | MII Status: up | ||
757 | Link Failure Count: 1 | ||
758 | |||
759 | Slave Interface: eth0 | ||
760 | MII Status: up | ||
761 | Link Failure Count: 1 | ||
762 | |||
763 | The precise format and contents will change depending upon the | ||
764 | bonding configuration, state, and version of the bonding driver. | ||
765 | |||
766 | 5.2 Network configuration | ||
767 | ------------------------- | ||
768 | |||
769 | The network configuration can be inspected using the ifconfig | ||
770 | command. Bonding devices will have the MASTER flag set; Bonding slave | ||
771 | devices will have the SLAVE flag set. The ifconfig output does not | ||
772 | contain information on which slaves are associated with which masters. | ||
773 | |||
774 | In the example below, the bond0 interface is the master | ||
775 | (MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of | ||
776 | bond0 have the same MAC address (HWaddr) as bond0 for all modes except | ||
777 | TLB and ALB that require a unique MAC address for each slave. | ||
778 | |||
779 | # /sbin/ifconfig | ||
780 | bond0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4 | ||
781 | inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0 | ||
782 | UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 | ||
783 | RX packets:7224794 errors:0 dropped:0 overruns:0 frame:0 | ||
784 | TX packets:3286647 errors:1 dropped:0 overruns:1 carrier:0 | ||
785 | collisions:0 txqueuelen:0 | ||
786 | |||
787 | eth0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4 | ||
788 | inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0 | ||
789 | UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 | ||
790 | RX packets:3573025 errors:0 dropped:0 overruns:0 frame:0 | ||
791 | TX packets:1643167 errors:1 dropped:0 overruns:1 carrier:0 | ||
792 | collisions:0 txqueuelen:100 | ||
793 | Interrupt:10 Base address:0x1080 | ||
794 | |||
795 | eth1 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4 | ||
796 | inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0 | ||
797 | UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 | ||
798 | RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0 | ||
799 | TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0 | ||
800 | collisions:0 txqueuelen:100 | ||
801 | Interrupt:9 Base address:0x1400 | ||
802 | |||
803 | 6. Switch Configuration | ||
804 | ======================= | ||
805 | |||
806 | For this section, "switch" refers to whatever system the | ||
807 | bonded devices are directly connected to (i.e., where the other end of | ||
808 | the cable plugs into). This may be an actual dedicated switch device, | ||
809 | or it may be another regular system (e.g., another computer running | ||
810 | Linux), | ||
811 | |||
812 | The active-backup, balance-tlb and balance-alb modes do not | ||
813 | require any specific configuration of the switch. | ||
814 | |||
815 | The 802.3ad mode requires that the switch have the appropriate | ||
816 | ports configured as an 802.3ad aggregation. The precise method used | ||
817 | to configure this varies from switch to switch, but, for example, a | ||
818 | Cisco 3550 series switch requires that the appropriate ports first be | ||
819 | grouped together in a single etherchannel instance, then that | ||
820 | etherchannel is set to mode "lacp" to enable 802.3ad (instead of | ||
821 | standard EtherChannel). | ||
822 | |||
823 | The balance-rr, balance-xor and broadcast modes generally | ||
824 | require that the switch have the appropriate ports grouped together. | ||
825 | The nomenclature for such a group differs between switches, it may be | ||
826 | called an "etherchannel" (as in the Cisco example, above), a "trunk | ||
827 | group" or some other similar variation. For these modes, each switch | ||
828 | will also have its own configuration options for the switch's transmit | ||
829 | policy to the bond. Typical choices include XOR of either the MAC or | ||
830 | IP addresses. The transmit policy of the two peers does not need to | ||
831 | match. For these three modes, the bonding mode really selects a | ||
832 | transmit policy for an EtherChannel group; all three will interoperate | ||
833 | with another EtherChannel group. | ||
834 | |||
835 | |||
836 | 7. 802.1q VLAN Support | ||
837 | ====================== | ||
838 | |||
839 | It is possible to configure VLAN devices over a bond interface | ||
840 | using the 8021q driver. However, only packets coming from the 8021q | ||
841 | driver and passing through bonding will be tagged by default. Self | ||
842 | generated packets, for example, bonding's learning packets or ARP | ||
843 | packets generated by either ALB mode or the ARP monitor mechanism, are | ||
844 | tagged internally by bonding itself. As a result, bonding must | ||
845 | "learn" the VLAN IDs configured above it, and use those IDs to tag | ||
846 | self generated packets. | ||
847 | |||
848 | For reasons of simplicity, and to support the use of adapters | ||
849 | that can do VLAN hardware acceleration offloding, the bonding | ||
850 | interface declares itself as fully hardware offloaing capable, it gets | ||
851 | the add_vid/kill_vid notifications to gather the necessary | ||
852 | information, and it propagates those actions to the slaves. In case | ||
853 | of mixed adapter types, hardware accelerated tagged packets that | ||
854 | should go through an adapter that is not offloading capable are | ||
855 | "un-accelerated" by the bonding driver so the VLAN tag sits in the | ||
856 | regular location. | ||
857 | |||
858 | VLAN interfaces *must* be added on top of a bonding interface | ||
859 | only after enslaving at least one slave. The bonding interface has a | ||
860 | hardware address of 00:00:00:00:00:00 until the first slave is added. | ||
861 | If the VLAN interface is created prior to the first enslavement, it | ||
862 | would pick up the all-zeroes hardware address. Once the first slave | ||
863 | is attached to the bond, the bond device itself will pick up the | ||
864 | slave's hardware address, which is then available for the VLAN device. | ||
865 | |||
866 | Also, be aware that a similar problem can occur if all slaves | ||
867 | are released from a bond that still has one or more VLAN interfaces on | ||
868 | top of it. When a new slave is added, the bonding interface will | ||
869 | obtain its hardware address from the first slave, which might not | ||
870 | match the hardware address of the VLAN interfaces (which was | ||
871 | ultimately copied from an earlier slave). | ||
872 | |||
873 | There are two methods to insure that the VLAN device operates | ||
874 | with the correct hardware address if all slaves are removed from a | ||
875 | bond interface: | ||
876 | |||
877 | 1. Remove all VLAN interfaces then recreate them | ||
878 | |||
879 | 2. Set the bonding interface's hardware address so that it | ||
880 | matches the hardware address of the VLAN interfaces. | ||
881 | |||
882 | Note that changing a VLAN interface's HW address would set the | ||
883 | underlying device -- i.e. the bonding interface -- to promiscouos | ||
884 | mode, which might not be what you want. | ||
885 | |||
886 | |||
887 | 8. Link Monitoring | ||
888 | ================== | ||
889 | |||
890 | The bonding driver at present supports two schemes for | ||
891 | monitoring a slave device's link state: the ARP monitor and the MII | ||
892 | monitor. | ||
893 | |||
894 | At the present time, due to implementation restrictions in the | ||
895 | bonding driver itself, it is not possible to enable both ARP and MII | ||
896 | monitoring simultaneously. | ||
897 | |||
898 | 8.1 ARP Monitor Operation | ||
899 | ------------------------- | ||
900 | |||
901 | The ARP monitor operates as its name suggests: it sends ARP | ||
902 | queries to one or more designated peer systems on the network, and | ||
903 | uses the response as an indication that the link is operating. This | ||
904 | gives some assurance that traffic is actually flowing to and from one | ||
905 | or more peers on the local network. | ||
906 | |||
907 | The ARP monitor relies on the device driver itself to verify | ||
908 | that traffic is flowing. In particular, the driver must keep up to | ||
909 | date the last receive time, dev->last_rx, and transmit start time, | ||
910 | dev->trans_start. If these are not updated by the driver, then the | ||
911 | ARP monitor will immediately fail any slaves using that driver, and | ||
912 | those slaves will stay down. If networking monitoring (tcpdump, etc) | ||
913 | shows the ARP requests and replies on the network, then it may be that | ||
914 | your device driver is not updating last_rx and trans_start. | ||
915 | |||
916 | 8.2 Configuring Multiple ARP Targets | ||
917 | ------------------------------------ | ||
918 | |||
919 | While ARP monitoring can be done with just one target, it can | ||
920 | be useful in a High Availability setup to have several targets to | ||
921 | monitor. In the case of just one target, the target itself may go | ||
922 | down or have a problem making it unresponsive to ARP requests. Having | ||
923 | an additional target (or several) increases the reliability of the ARP | ||
924 | monitoring. | ||
925 | |||
926 | Multiple ARP targets must be seperated by commas as follows: | ||
927 | |||
928 | # example options for ARP monitoring with three targets | ||
929 | alias bond0 bonding | ||
930 | options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9 | ||
931 | |||
932 | For just a single target the options would resemble: | ||
933 | |||
934 | # example options for ARP monitoring with one target | ||
935 | alias bond0 bonding | ||
936 | options bond0 arp_interval=60 arp_ip_target=192.168.0.100 | ||
937 | |||
938 | |||
939 | 8.3 MII Monitor Operation | ||
940 | ------------------------- | ||
941 | |||
942 | The MII monitor monitors only the carrier state of the local | ||
943 | network interface. It accomplishes this in one of three ways: by | ||
944 | depending upon the device driver to maintain its carrier state, by | ||
945 | querying the device's MII registers, or by making an ethtool query to | ||
946 | the device. | ||
947 | |||
948 | If the use_carrier module parameter is 1 (the default value), | ||
949 | then the MII monitor will rely on the driver for carrier state | ||
950 | information (via the netif_carrier subsystem). As explained in the | ||
951 | use_carrier parameter information, above, if the MII monitor fails to | ||
952 | detect carrier loss on the device (e.g., when the cable is physically | ||
953 | disconnected), it may be that the driver does not support | ||
954 | netif_carrier. | ||
955 | |||
956 | If use_carrier is 0, then the MII monitor will first query the | ||
957 | device's (via ioctl) MII registers and check the link state. If that | ||
958 | request fails (not just that it returns carrier down), then the MII | ||
959 | monitor will make an ethtool ETHOOL_GLINK request to attempt to obtain | ||
960 | the same information. If both methods fail (i.e., the driver either | ||
961 | does not support or had some error in processing both the MII register | ||
962 | and ethtool requests), then the MII monitor will assume the link is | ||
963 | up. | ||
964 | |||
965 | 9. Potential Sources of Trouble | ||
966 | =============================== | ||
967 | |||
968 | 9.1 Adventures in Routing | ||
969 | ------------------------- | ||
970 | |||
971 | When bonding is configured, it is important that the slave | ||
972 | devices not have routes that supercede routes of the master (or, | ||
973 | generally, not have routes at all). For example, suppose the bonding | ||
974 | device bond0 has two slaves, eth0 and eth1, and the routing table is | ||
975 | as follows: | ||
976 | |||
977 | Kernel IP routing table | ||
978 | Destination Gateway Genmask Flags MSS Window irtt Iface | ||
979 | 10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth0 | ||
980 | 10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 eth1 | ||
981 | 10.0.0.0 0.0.0.0 255.255.0.0 U 40 0 0 bond0 | ||
982 | 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo | ||
983 | |||
984 | This routing configuration will likely still update the | ||
985 | receive/transmit times in the driver (needed by the ARP monitor), but | ||
986 | may bypass the bonding driver (because outgoing traffic to, in this | ||
987 | case, another host on network 10 would use eth0 or eth1 before bond0). | ||
988 | |||
989 | The ARP monitor (and ARP itself) may become confused by this | ||
990 | configuration, because ARP requests (generated by the ARP monitor) | ||
991 | will be sent on one interface (bond0), but the corresponding reply | ||
992 | will arrive on a different interface (eth0). This reply looks to ARP | ||
993 | as an unsolicited ARP reply (because ARP matches replies on an | ||
994 | interface basis), and is discarded. The MII monitor is not affected | ||
995 | by the state of the routing table. | ||
996 | |||
997 | The solution here is simply to insure that slaves do not have | ||
998 | routes of their own, and if for some reason they must, those routes do | ||
999 | not supercede routes of their master. This should generally be the | ||
1000 | case, but unusual configurations or errant manual or automatic static | ||
1001 | route additions may cause trouble. | ||
1002 | |||
1003 | 9.2 Ethernet Device Renaming | ||
1004 | ---------------------------- | ||
1005 | |||
1006 | On systems with network configuration scripts that do not | ||
1007 | associate physical devices directly with network interface names (so | ||
1008 | that the same physical device always has the same "ethX" name), it may | ||
1009 | be necessary to add some special logic to either /etc/modules.conf or | ||
1010 | /etc/modprobe.conf (depending upon which is installed on the system). | ||
1011 | |||
1012 | For example, given a modules.conf containing the following: | ||
1013 | |||
1014 | alias bond0 bonding | ||
1015 | options bond0 mode=some-mode miimon=50 | ||
1016 | alias eth0 tg3 | ||
1017 | alias eth1 tg3 | ||
1018 | alias eth2 e1000 | ||
1019 | alias eth3 e1000 | ||
1020 | |||
1021 | If neither eth0 and eth1 are slaves to bond0, then when the | ||
1022 | bond0 interface comes up, the devices may end up reordered. This | ||
1023 | happens because bonding is loaded first, then its slave device's | ||
1024 | drivers are loaded next. Since no other drivers have been loaded, | ||
1025 | when the e1000 driver loads, it will receive eth0 and eth1 for its | ||
1026 | devices, but the bonding configuration tries to enslave eth2 and eth3 | ||
1027 | (which may later be assigned to the tg3 devices). | ||
1028 | |||
1029 | Adding the following: | ||
1030 | |||
1031 | add above bonding e1000 tg3 | ||
1032 | |||
1033 | causes modprobe to load e1000 then tg3, in that order, when | ||
1034 | bonding is loaded. This command is fully documented in the | ||
1035 | modules.conf manual page. | ||
1036 | |||
1037 | On systems utilizing modprobe.conf (or modprobe.conf.local), | ||
1038 | an equivalent problem can occur. In this case, the following can be | ||
1039 | added to modprobe.conf (or modprobe.conf.local, as appropriate), as | ||
1040 | follows (all on one line; it has been split here for clarity): | ||
1041 | |||
1042 | install bonding /sbin/modprobe tg3; /sbin/modprobe e1000; | ||
1043 | /sbin/modprobe --ignore-install bonding | ||
1044 | |||
1045 | This will, when loading the bonding module, rather than | ||
1046 | performing the normal action, instead execute the provided command. | ||
1047 | This command loads the device drivers in the order needed, then calls | ||
1048 | modprobe with --ingore-install to cause the normal action to then take | ||
1049 | place. Full documentation on this can be found in the modprobe.conf | ||
1050 | and modprobe manual pages. | ||
1051 | |||
1052 | 9.3. Painfully Slow Or No Failed Link Detection By Miimon | ||
1053 | --------------------------------------------------------- | ||
1054 | |||
1055 | By default, bonding enables the use_carrier option, which | ||
1056 | instructs bonding to trust the driver to maintain carrier state. | ||
1057 | |||
1058 | As discussed in the options section, above, some drivers do | ||
1059 | not support the netif_carrier_on/_off link state tracking system. | ||
1060 | With use_carrier enabled, bonding will always see these links as up, | ||
1061 | regardless of their actual state. | ||
1062 | |||
1063 | Additionally, other drivers do support netif_carrier, but do | ||
1064 | not maintain it in real time, e.g., only polling the link state at | ||
1065 | some fixed interval. In this case, miimon will detect failures, but | ||
1066 | only after some long period of time has expired. If it appears that | ||
1067 | miimon is very slow in detecting link failures, try specifying | ||
1068 | use_carrier=0 to see if that improves the failure detection time. If | ||
1069 | it does, then it may be that the driver checks the carrier state at a | ||
1070 | fixed interval, but does not cache the MII register values (so the | ||
1071 | use_carrier=0 method of querying the registers directly works). If | ||
1072 | use_carrier=0 does not improve the failover, then the driver may cache | ||
1073 | the registers, or the problem may be elsewhere. | ||
1074 | |||
1075 | Also, remember that miimon only checks for the device's | ||
1076 | carrier state. It has no way to determine the state of devices on or | ||
1077 | beyond other ports of a switch, or if a switch is refusing to pass | ||
1078 | traffic while still maintaining carrier on. | ||
1079 | |||
1080 | 10. SNMP agents | ||
1081 | =============== | ||
1082 | |||
1083 | If running SNMP agents, the bonding driver should be loaded | ||
1084 | before any network drivers participating in a bond. This requirement | ||
1085 | is due to the the interface index (ipAdEntIfIndex) being associated to | ||
1086 | the first interface found with a given IP address. That is, there is | ||
1087 | only one ipAdEntIfIndex for each IP address. For example, if eth0 and | ||
1088 | eth1 are slaves of bond0 and the driver for eth0 is loaded before the | ||
1089 | bonding driver, the interface for the IP address will be associated | ||
1090 | with the eth0 interface. This configuration is shown below, the IP | ||
1091 | address 192.168.1.1 has an interface index of 2 which indexes to eth0 | ||
1092 | in the ifDescr table (ifDescr.2). | ||
1093 | |||
1094 | interfaces.ifTable.ifEntry.ifDescr.1 = lo | ||
1095 | interfaces.ifTable.ifEntry.ifDescr.2 = eth0 | ||
1096 | interfaces.ifTable.ifEntry.ifDescr.3 = eth1 | ||
1097 | interfaces.ifTable.ifEntry.ifDescr.4 = eth2 | ||
1098 | interfaces.ifTable.ifEntry.ifDescr.5 = eth3 | ||
1099 | interfaces.ifTable.ifEntry.ifDescr.6 = bond0 | ||
1100 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5 | ||
1101 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 | ||
1102 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4 | ||
1103 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 | ||
1104 | |||
1105 | This problem is avoided by loading the bonding driver before | ||
1106 | any network drivers participating in a bond. Below is an example of | ||
1107 | loading the bonding driver first, the IP address 192.168.1.1 is | ||
1108 | correctly associated with ifDescr.2. | ||
1109 | |||
1110 | interfaces.ifTable.ifEntry.ifDescr.1 = lo | ||
1111 | interfaces.ifTable.ifEntry.ifDescr.2 = bond0 | ||
1112 | interfaces.ifTable.ifEntry.ifDescr.3 = eth0 | ||
1113 | interfaces.ifTable.ifEntry.ifDescr.4 = eth1 | ||
1114 | interfaces.ifTable.ifEntry.ifDescr.5 = eth2 | ||
1115 | interfaces.ifTable.ifEntry.ifDescr.6 = eth3 | ||
1116 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6 | ||
1117 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2 | ||
1118 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5 | ||
1119 | ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1 | ||
1120 | |||
1121 | While some distributions may not report the interface name in | ||
1122 | ifDescr, the association between the IP address and IfIndex remains | ||
1123 | and SNMP functions such as Interface_Scan_Next will report that | ||
1124 | association. | ||
1125 | |||
1126 | 11. Promiscuous mode | ||
1127 | ==================== | ||
1128 | |||
1129 | When running network monitoring tools, e.g., tcpdump, it is | ||
1130 | common to enable promiscuous mode on the device, so that all traffic | ||
1131 | is seen (instead of seeing only traffic destined for the local host). | ||
1132 | The bonding driver handles promiscuous mode changes to the bonding | ||
1133 | master device (e.g., bond0), and propogates the setting to the slave | ||
1134 | devices. | ||
1135 | |||
1136 | For the balance-rr, balance-xor, broadcast, and 802.3ad modes, | ||
1137 | the promiscuous mode setting is propogated to all slaves. | ||
1138 | |||
1139 | For the active-backup, balance-tlb and balance-alb modes, the | ||
1140 | promiscuous mode setting is propogated only to the active slave. | ||
1141 | |||
1142 | For balance-tlb mode, the active slave is the slave currently | ||
1143 | receiving inbound traffic. | ||
1144 | |||
1145 | For balance-alb mode, the active slave is the slave used as a | ||
1146 | "primary." This slave is used for mode-specific control traffic, for | ||
1147 | sending to peers that are unassigned or if the load is unbalanced. | ||
1148 | |||
1149 | For the active-backup, balance-tlb and balance-alb modes, when | ||
1150 | the active slave changes (e.g., due to a link failure), the | ||
1151 | promiscuous setting will be propogated to the new active slave. | ||
1152 | |||
1153 | 12. High Availability Information | ||
1154 | ================================= | ||
1155 | |||
1156 | High Availability refers to configurations that provide | ||
1157 | maximum network availability by having redundant or backup devices, | ||
1158 | links and switches between the host and the rest of the world. | ||
1159 | |||
1160 | There are currently two basic methods for configuring to | ||
1161 | maximize availability. They are dependent on the network topology and | ||
1162 | the primary goal of the configuration, but in general, a configuration | ||
1163 | can be optimized for maximum available bandwidth, or for maximum | ||
1164 | network availability. | ||
1165 | |||
1166 | 12.1 High Availability in a Single Switch Topology | ||
1167 | -------------------------------------------------- | ||
1168 | |||
1169 | If two hosts (or a host and a switch) are directly connected | ||
1170 | via multiple physical links, then there is no network availability | ||
1171 | penalty for optimizing for maximum bandwidth: there is only one switch | ||
1172 | (or peer), so if it fails, you have no alternative access to fail over | ||
1173 | to. | ||
1174 | |||
1175 | Example 1 : host to switch (or other host) | ||
1176 | |||
1177 | +----------+ +----------+ | ||
1178 | | |eth0 eth0| switch | | ||
1179 | | Host A +--------------------------+ or | | ||
1180 | | +--------------------------+ other | | ||
1181 | | |eth1 eth1| host | | ||
1182 | +----------+ +----------+ | ||
1183 | |||
1184 | |||
1185 | 12.1.1 Bonding Mode Selection for single switch topology | ||
1186 | -------------------------------------------------------- | ||
1187 | |||
1188 | This configuration is the easiest to set up and to understand, | ||
1189 | although you will have to decide which bonding mode best suits your | ||
1190 | needs. The tradeoffs for each mode are detailed below: | ||
1191 | |||
1192 | balance-rr: This mode is the only mode that will permit a single | ||
1193 | TCP/IP connection to stripe traffic across multiple | ||
1194 | interfaces. It is therefore the only mode that will allow a | ||
1195 | single TCP/IP stream to utilize more than one interface's | ||
1196 | worth of throughput. This comes at a cost, however: the | ||
1197 | striping often results in peer systems receiving packets out | ||
1198 | of order, causing TCP/IP's congestion control system to kick | ||
1199 | in, often by retransmitting segments. | ||
1200 | |||
1201 | It is possible to adjust TCP/IP's congestion limits by | ||
1202 | altering the net.ipv4.tcp_reordering sysctl parameter. The | ||
1203 | usual default value is 3, and the maximum useful value is 127. | ||
1204 | For a four interface balance-rr bond, expect that a single | ||
1205 | TCP/IP stream will utilize no more than approximately 2.3 | ||
1206 | interface's worth of throughput, even after adjusting | ||
1207 | tcp_reordering. | ||
1208 | |||
1209 | If you are utilizing protocols other than TCP/IP, UDP for | ||
1210 | example, and your application can tolerate out of order | ||
1211 | delivery, then this mode can allow for single stream datagram | ||
1212 | performance that scales near linearly as interfaces are added | ||
1213 | to the bond. | ||
1214 | |||
1215 | This mode requires the switch to have the appropriate ports | ||
1216 | configured for "etherchannel" or "trunking." | ||
1217 | |||
1218 | active-backup: There is not much advantage in this network topology to | ||
1219 | the active-backup mode, as the inactive backup devices are all | ||
1220 | connected to the same peer as the primary. In this case, a | ||
1221 | load balancing mode (with link monitoring) will provide the | ||
1222 | same level of network availability, but with increased | ||
1223 | available bandwidth. On the plus side, it does not require | ||
1224 | any configuration of the switch. | ||
1225 | |||
1226 | balance-xor: This mode will limit traffic such that packets destined | ||
1227 | for specific peers will always be sent over the same | ||
1228 | interface. Since the destination is determined by the MAC | ||
1229 | addresses involved, this may be desirable if you have a large | ||
1230 | network with many hosts. It is likely to be suboptimal if all | ||
1231 | your traffic is passed through a single router, however. As | ||
1232 | with balance-rr, the switch ports need to be configured for | ||
1233 | "etherchannel" or "trunking." | ||
1234 | |||
1235 | broadcast: Like active-backup, there is not much advantage to this | ||
1236 | mode in this type of network topology. | ||
1237 | |||
1238 | 802.3ad: This mode can be a good choice for this type of network | ||
1239 | topology. The 802.3ad mode is an IEEE standard, so all peers | ||
1240 | that implement 802.3ad should interoperate well. The 802.3ad | ||
1241 | protocol includes automatic configuration of the aggregates, | ||
1242 | so minimal manual configuration of the switch is needed | ||
1243 | (typically only to designate that some set of devices is | ||
1244 | usable for 802.3ad). The 802.3ad standard also mandates that | ||
1245 | frames be delivered in order (within certain limits), so in | ||
1246 | general single connections will not see misordering of | ||
1247 | packets. The 802.3ad mode does have some drawbacks: the | ||
1248 | standard mandates that all devices in the aggregate operate at | ||
1249 | the same speed and duplex. Also, as with all bonding load | ||
1250 | balance modes other than balance-rr, no single connection will | ||
1251 | be able to utilize more than a single interface's worth of | ||
1252 | bandwidth. Additionally, the linux bonding 802.3ad | ||
1253 | implementation distributes traffic by peer (using an XOR of | ||
1254 | MAC addresses), so in general all traffic to a particular | ||
1255 | destination will use the same interface. Finally, the 802.3ad | ||
1256 | mode mandates the use of the MII monitor, therefore, the ARP | ||
1257 | monitor is not available in this mode. | ||
1258 | |||
1259 | balance-tlb: This mode is also a good choice for this type of | ||
1260 | topology. It has no special switch configuration | ||
1261 | requirements, and balances outgoing traffic by peer, in a | ||
1262 | vaguely intelligent manner (not a simple XOR as in balance-xor | ||
1263 | or 802.3ad mode), so that unlucky MAC addresses will not all | ||
1264 | "bunch up" on a single interface. Interfaces may be of | ||
1265 | differing speeds. On the down side, in this mode all incoming | ||
1266 | traffic arrives over a single interface, this mode requires | ||
1267 | certain ethtool support in the network device driver of the | ||
1268 | slave interfaces, and the ARP monitor is not available. | ||
1269 | |||
1270 | balance-alb: This mode is everything that balance-tlb is, and more. It | ||
1271 | has all of the features (and restrictions) of balance-tlb, and | ||
1272 | will also balance incoming traffic from peers (as described in | ||
1273 | the Bonding Module Options section, above). The only extra | ||
1274 | down side to this mode is that the network device driver must | ||
1275 | support changing the hardware address while the device is | ||
1276 | open. | ||
1277 | |||
1278 | 12.1.2 Link Monitoring for Single Switch Topology | ||
1279 | ------------------------------------------------- | ||
1280 | |||
1281 | The choice of link monitoring may largely depend upon which | ||
1282 | mode you choose to use. The more advanced load balancing modes do not | ||
1283 | support the use of the ARP monitor, and are thus restricted to using | ||
1284 | the MII monitor (which does not provide as high a level of assurance | ||
1285 | as the ARP monitor). | ||
1286 | |||
1287 | |||
1288 | 12.2 High Availability in a Multiple Switch Topology | ||
1289 | ---------------------------------------------------- | ||
1290 | |||
1291 | With multiple switches, the configuration of bonding and the | ||
1292 | network changes dramatically. In multiple switch topologies, there is | ||
1293 | a tradeoff between network availability and usable bandwidth. | ||
1294 | |||
1295 | Below is a sample network, configured to maximize the | ||
1296 | availability of the network: | ||
1297 | |||
1298 | | | | ||
1299 | |port3 port3| | ||
1300 | +-----+----+ +-----+----+ | ||
1301 | | |port2 ISL port2| | | ||
1302 | | switch A +--------------------------+ switch B | | ||
1303 | | | | | | ||
1304 | +-----+----+ +-----++---+ | ||
1305 | |port1 port1| | ||
1306 | | +-------+ | | ||
1307 | +-------------+ host1 +---------------+ | ||
1308 | eth0 +-------+ eth1 | ||
1309 | |||
1310 | In this configuration, there is a link between the two | ||
1311 | switches (ISL, or inter switch link), and multiple ports connecting to | ||
1312 | the outside world ("port3" on each switch). There is no technical | ||
1313 | reason that this could not be extended to a third switch. | ||
1314 | |||
1315 | 12.2.1 Bonding Mode Selection for Multiple Switch Topology | ||
1316 | ---------------------------------------------------------- | ||
1317 | |||
1318 | In a topology such as this, the active-backup and broadcast | ||
1319 | modes are the only useful bonding modes; the other modes require all | ||
1320 | links to terminate on the same peer for them to behave rationally. | ||
1321 | |||
1322 | active-backup: This is generally the preferred mode, particularly if | ||
1323 | the switches have an ISL and play together well. If the | ||
1324 | network configuration is such that one switch is specifically | ||
1325 | a backup switch (e.g., has lower capacity, higher cost, etc), | ||
1326 | then the primary option can be used to insure that the | ||
1327 | preferred link is always used when it is available. | ||
1328 | |||
1329 | broadcast: This mode is really a special purpose mode, and is suitable | ||
1330 | only for very specific needs. For example, if the two | ||
1331 | switches are not connected (no ISL), and the networks beyond | ||
1332 | them are totally independant. In this case, if it is | ||
1333 | necessary for some specific one-way traffic to reach both | ||
1334 | independent networks, then the broadcast mode may be suitable. | ||
1335 | |||
1336 | 12.2.2 Link Monitoring Selection for Multiple Switch Topology | ||
1337 | ------------------------------------------------------------- | ||
1338 | |||
1339 | The choice of link monitoring ultimately depends upon your | ||
1340 | switch. If the switch can reliably fail ports in response to other | ||
1341 | failures, then either the MII or ARP monitors should work. For | ||
1342 | example, in the above example, if the "port3" link fails at the remote | ||
1343 | end, the MII monitor has no direct means to detect this. The ARP | ||
1344 | monitor could be configured with a target at the remote end of port3, | ||
1345 | thus detecting that failure without switch support. | ||
1346 | |||
1347 | In general, however, in a multiple switch topology, the ARP | ||
1348 | monitor can provide a higher level of reliability in detecting link | ||
1349 | failures. Additionally, it should be configured with multiple targets | ||
1350 | (at least one for each switch in the network). This will insure that, | ||
1351 | regardless of which switch is active, the ARP monitor has a suitable | ||
1352 | target to query. | ||
1353 | |||
1354 | |||
1355 | 12.3 Switch Behavior Issues for High Availability | ||
1356 | ------------------------------------------------- | ||
1357 | |||
1358 | You may encounter issues with the timing of link up and down | ||
1359 | reporting by the switch. | ||
1360 | |||
1361 | First, when a link comes up, some switches may indicate that | ||
1362 | the link is up (carrier available), but not pass traffic over the | ||
1363 | interface for some period of time. This delay is typically due to | ||
1364 | some type of autonegotiation or routing protocol, but may also occur | ||
1365 | during switch initialization (e.g., during recovery after a switch | ||
1366 | failure). If you find this to be a problem, specify an appropriate | ||
1367 | value to the updelay bonding module option to delay the use of the | ||
1368 | relevant interface(s). | ||
1369 | |||
1370 | Second, some switches may "bounce" the link state one or more | ||
1371 | times while a link is changing state. This occurs most commonly while | ||
1372 | the switch is initializing. Again, an appropriate updelay value may | ||
1373 | help, but note that if all links are down, then updelay is ignored | ||
1374 | when any link becomes active (the slave closest to completing its | ||
1375 | updelay is chosen). | ||
1376 | |||
1377 | Note that when a bonding interface has no active links, the | ||
1378 | driver will immediately reuse the first link that goes up, even if | ||
1379 | updelay parameter was specified. If there are slave interfaces | ||
1380 | waiting for the updelay timeout to expire, the interface that first | ||
1381 | went into that state will be immediately reused. This reduces down | ||
1382 | time of the network if the value of updelay has been overestimated. | ||
1383 | |||
1384 | In addition to the concerns about switch timings, if your | ||
1385 | switches take a long time to go into backup mode, it may be desirable | ||
1386 | to not activate a backup interface immediately after a link goes down. | ||
1387 | Failover may be delayed via the downdelay bonding module option. | ||
1388 | |||
1389 | 13. Hardware Specific Considerations | ||
1390 | ==================================== | ||
1391 | |||
1392 | This section contains additional information for configuring | ||
1393 | bonding on specific hardware platforms, or for interfacing bonding | ||
1394 | with particular switches or other devices. | ||
1395 | |||
1396 | 13.1 IBM BladeCenter | ||
1397 | -------------------- | ||
1398 | |||
1399 | This applies to the JS20 and similar systems. | ||
1400 | |||
1401 | On the JS20 blades, the bonding driver supports only | ||
1402 | balance-rr, active-backup, balance-tlb and balance-alb modes. This is | ||
1403 | largely due to the network topology inside the BladeCenter, detailed | ||
1404 | below. | ||
1405 | |||
1406 | JS20 network adapter information | ||
1407 | -------------------------------- | ||
1408 | |||
1409 | All JS20s come with two Broadcom Gigabit Ethernet ports | ||
1410 | integrated on the planar. In the BladeCenter chassis, the eth0 port | ||
1411 | of all JS20 blades is hard wired to I/O Module #1; similarly, all eth1 | ||
1412 | ports are wired to I/O Module #2. An add-on Broadcom daughter card | ||
1413 | can be installed on a JS20 to provide two more Gigabit Ethernet ports. | ||
1414 | These ports, eth2 and eth3, are wired to I/O Modules 3 and 4, | ||
1415 | respectively. | ||
1416 | |||
1417 | Each I/O Module may contain either a switch or a passthrough | ||
1418 | module (which allows ports to be directly connected to an external | ||
1419 | switch). Some bonding modes require a specific BladeCenter internal | ||
1420 | network topology in order to function; these are detailed below. | ||
1421 | |||
1422 | Additional BladeCenter-specific networking information can be | ||
1423 | found in two IBM Redbooks (www.ibm.com/redbooks): | ||
1424 | |||
1425 | "IBM eServer BladeCenter Networking Options" | ||
1426 | "IBM eServer BladeCenter Layer 2-7 Network Switching" | ||
1427 | |||
1428 | BladeCenter networking configuration | ||
1429 | ------------------------------------ | ||
1430 | |||
1431 | Because a BladeCenter can be configured in a very large number | ||
1432 | of ways, this discussion will be confined to describing basic | ||
1433 | configurations. | ||
1434 | |||
1435 | Normally, Ethernet Switch Modules (ESM) are used in I/O | ||
1436 | modules 1 and 2. In this configuration, the eth0 and eth1 ports of a | ||
1437 | JS20 will be connected to different internal switches (in the | ||
1438 | respective I/O modules). | ||
1439 | |||
1440 | An optical passthru module (OPM) connects the I/O module | ||
1441 | directly to an external switch. By using OPMs in I/O module #1 and | ||
1442 | #2, the eth0 and eth1 interfaces of a JS20 can be redirected to the | ||
1443 | outside world and connected to a common external switch. | ||
1444 | |||
1445 | Depending upon the mix of ESM and OPM modules, the network | ||
1446 | will appear to bonding as either a single switch topology (all OPM | ||
1447 | modules) or as a multiple switch topology (one or more ESM modules, | ||
1448 | zero or more OPM modules). It is also possible to connect ESM modules | ||
1449 | together, resulting in a configuration much like the example in "High | ||
1450 | Availability in a multiple switch topology." | ||
1451 | |||
1452 | Requirements for specifc modes | ||
1453 | ------------------------------ | ||
1454 | |||
1455 | The balance-rr mode requires the use of OPM modules for | ||
1456 | devices in the bond, all connected to an common external switch. That | ||
1457 | switch must be configured for "etherchannel" or "trunking" on the | ||
1458 | appropriate ports, as is usual for balance-rr. | ||
1459 | |||
1460 | The balance-alb and balance-tlb modes will function with | ||
1461 | either switch modules or passthrough modules (or a mix). The only | ||
1462 | specific requirement for these modes is that all network interfaces | ||
1463 | must be able to reach all destinations for traffic sent over the | ||
1464 | bonding device (i.e., the network must converge at some point outside | ||
1465 | the BladeCenter). | ||
1466 | |||
1467 | The active-backup mode has no additional requirements. | ||
1468 | |||
1469 | Link monitoring issues | ||
1470 | ---------------------- | ||
1471 | |||
1472 | When an Ethernet Switch Module is in place, only the ARP | ||
1473 | monitor will reliably detect link loss to an external switch. This is | ||
1474 | nothing unusual, but examination of the BladeCenter cabinet would | ||
1475 | suggest that the "external" network ports are the ethernet ports for | ||
1476 | the system, when it fact there is a switch between these "external" | ||
1477 | ports and the devices on the JS20 system itself. The MII monitor is | ||
1478 | only able to detect link failures between the ESM and the JS20 system. | ||
1479 | |||
1480 | When a passthrough module is in place, the MII monitor does | ||
1481 | detect failures to the "external" port, which is then directly | ||
1482 | connected to the JS20 system. | ||
1483 | |||
1484 | Other concerns | ||
1485 | -------------- | ||
1486 | |||
1487 | The Serial Over LAN link is established over the primary | ||
1488 | ethernet (eth0) only, therefore, any loss of link to eth0 will result | ||
1489 | in losing your SoL connection. It will not fail over with other | ||
1490 | network traffic. | ||
1491 | |||
1492 | It may be desirable to disable spanning tree on the switch | ||
1493 | (either the internal Ethernet Switch Module, or an external switch) to | ||
1494 | avoid fail-over delays issues when using bonding. | ||
1495 | |||
1496 | |||
1497 | 14. Frequently Asked Questions | ||
1498 | ============================== | ||
1499 | |||
1500 | 1. Is it SMP safe? | ||
1501 | |||
1502 | Yes. The old 2.0.xx channel bonding patch was not SMP safe. | ||
1503 | The new driver was designed to be SMP safe from the start. | ||
1504 | |||
1505 | 2. What type of cards will work with it? | ||
1506 | |||
1507 | Any Ethernet type cards (you can even mix cards - a Intel | ||
1508 | EtherExpress PRO/100 and a 3com 3c905b, for example). They need not | ||
1509 | be of the same speed. | ||
1510 | |||
1511 | 3. How many bonding devices can I have? | ||
1512 | |||
1513 | There is no limit. | ||
1514 | |||
1515 | 4. How many slaves can a bonding device have? | ||
1516 | |||
1517 | This is limited only by the number of network interfaces Linux | ||
1518 | supports and/or the number of network cards you can place in your | ||
1519 | system. | ||
1520 | |||
1521 | 5. What happens when a slave link dies? | ||
1522 | |||
1523 | If link monitoring is enabled, then the failing device will be | ||
1524 | disabled. The active-backup mode will fail over to a backup link, and | ||
1525 | other modes will ignore the failed link. The link will continue to be | ||
1526 | monitored, and should it recover, it will rejoin the bond (in whatever | ||
1527 | manner is appropriate for the mode). See the section on High | ||
1528 | Availability for additional information. | ||
1529 | |||
1530 | Link monitoring can be enabled via either the miimon or | ||
1531 | arp_interval paramters (described in the module paramters section, | ||
1532 | above). In general, miimon monitors the carrier state as sensed by | ||
1533 | the underlying network device, and the arp monitor (arp_interval) | ||
1534 | monitors connectivity to another host on the local network. | ||
1535 | |||
1536 | If no link monitoring is configured, the bonding driver will | ||
1537 | be unable to detect link failures, and will assume that all links are | ||
1538 | always available. This will likely result in lost packets, and a | ||
1539 | resulting degredation of performance. The precise performance loss | ||
1540 | depends upon the bonding mode and network configuration. | ||
1541 | |||
1542 | 6. Can bonding be used for High Availability? | ||
1543 | |||
1544 | Yes. See the section on High Availability for details. | ||
1545 | |||
1546 | 7. Which switches/systems does it work with? | ||
1547 | |||
1548 | The full answer to this depends upon the desired mode. | ||
1549 | |||
1550 | In the basic balance modes (balance-rr and balance-xor), it | ||
1551 | works with any system that supports etherchannel (also called | ||
1552 | trunking). Most managed switches currently available have such | ||
1553 | support, and many unmananged switches as well. | ||
1554 | |||
1555 | The advanced balance modes (balance-tlb and balance-alb) do | ||
1556 | not have special switch requirements, but do need device drivers that | ||
1557 | support specific features (described in the appropriate section under | ||
1558 | module paramters, above). | ||
1559 | |||
1560 | In 802.3ad mode, it works with with systems that support IEEE | ||
1561 | 802.3ad Dynamic Link Aggregation. Most managed and many unmanaged | ||
1562 | switches currently available support 802.3ad. | ||
1563 | |||
1564 | The active-backup mode should work with any Layer-II switch. | ||
1565 | |||
1566 | 8. Where does a bonding device get its MAC address from? | ||
1567 | |||
1568 | If not explicitly configured with ifconfig, the MAC address of | ||
1569 | the bonding device is taken from its first slave device. This MAC | ||
1570 | address is then passed to all following slaves and remains persistent | ||
1571 | (even if the the first slave is removed) until the bonding device is | ||
1572 | brought down or reconfigured. | ||
1573 | |||
1574 | If you wish to change the MAC address, you can set it with | ||
1575 | ifconfig: | ||
1576 | |||
1577 | # ifconfig bond0 hw ether 00:11:22:33:44:55 | ||
1578 | |||
1579 | The MAC address can be also changed by bringing down/up the | ||
1580 | device and then changing its slaves (or their order): | ||
1581 | |||
1582 | # ifconfig bond0 down ; modprobe -r bonding | ||
1583 | # ifconfig bond0 .... up | ||
1584 | # ifenslave bond0 eth... | ||
1585 | |||
1586 | This method will automatically take the address from the next | ||
1587 | slave that is added. | ||
1588 | |||
1589 | To restore your slaves' MAC addresses, you need to detach them | ||
1590 | from the bond (`ifenslave -d bond0 eth0'). The bonding driver will | ||
1591 | then restore the MAC addresses that the slaves had before they were | ||
1592 | enslaved. | ||
1593 | |||
1594 | 15. Resources and Links | ||
1595 | ======================= | ||
1596 | |||
1597 | The latest version of the bonding driver can be found in the latest | ||
1598 | version of the linux kernel, found on http://kernel.org | ||
1599 | |||
1600 | Discussions regarding the bonding driver take place primarily on the | ||
1601 | bonding-devel mailing list, hosted at sourceforge.net. If you have | ||
1602 | questions or problems, post them to the list. | ||
1603 | |||
1604 | bonding-devel@lists.sourceforge.net | ||
1605 | |||
1606 | https://lists.sourceforge.net/lists/listinfo/bonding-devel | ||
1607 | |||
1608 | There is also a project site on sourceforge. | ||
1609 | |||
1610 | http://www.sourceforge.net/projects/bonding | ||
1611 | |||
1612 | Donald Becker's Ethernet Drivers and diag programs may be found at : | ||
1613 | - http://www.scyld.com/network/ | ||
1614 | |||
1615 | You will also find a lot of information regarding Ethernet, NWay, MII, | ||
1616 | etc. at www.scyld.com. | ||
1617 | |||
1618 | -- END -- | ||
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt new file mode 100644 index 000000000000..bdae2db4119c --- /dev/null +++ b/Documentation/networking/bridge.txt | |||
@@ -0,0 +1,8 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | ||
2 | userspace tools. These programs and documentation are available | ||
3 | at http://bridge.sourceforge.net. The download page is | ||
4 | http://prdownloads.sourceforge.net/bridge. | ||
5 | |||
6 | If you still have questions, don't hesitate to post to the mailing list | ||
7 | (more info http://lists.osdl.org/mailman/listinfo/bridge). | ||
8 | |||
diff --git a/Documentation/networking/comx.txt b/Documentation/networking/comx.txt new file mode 100644 index 000000000000..d1526eba2645 --- /dev/null +++ b/Documentation/networking/comx.txt | |||
@@ -0,0 +1,248 @@ | |||
1 | |||
2 | COMX drivers for the 2.2 kernel | ||
3 | |||
4 | Originally written by: Tivadar Szemethy, <tiv@itc.hu> | ||
5 | Currently maintained by: Gergely Madarasz <gorgo@itc.hu> | ||
6 | |||
7 | Last change: 21/06/1999. | ||
8 | |||
9 | INTRODUCTION | ||
10 | |||
11 | This document describes the software drivers and their use for the | ||
12 | COMX line of synchronous serial adapters for Linux version 2.2.0 and | ||
13 | above. | ||
14 | The cards are produced and sold by ITC-Pro Ltd. Budapest, Hungary | ||
15 | For further info contact <info@itc.hu> | ||
16 | or http://www.itc.hu (mostly in Hungarian). | ||
17 | The firmware files and software are available from ftp://ftp.itc.hu | ||
18 | |||
19 | Currently, the drivers support the following cards and protocols: | ||
20 | |||
21 | COMX (2x64 kbps intelligent board) | ||
22 | CMX (1x256 + 1x128 kbps intelligent board) | ||
23 | HiCOMX (2x2Mbps intelligent board) | ||
24 | LoCOMX (1x512 kbps passive board) | ||
25 | MixCOM (1x512 or 2x512kbps passive board with a hardware watchdog an | ||
26 | optional BRI interface and optional flashROM (1-32M)) | ||
27 | SliceCOM (1x2Mbps channelized E1 board) | ||
28 | PciCOM (X21) | ||
29 | |||
30 | At the moment of writing this document, the (Cisco)-HDLC, LAPB, SyncPPP and | ||
31 | Frame Relay (DTE, rfc1294 IP encapsulation with partially implemented Q933a | ||
32 | LMI) protocols are available as link-level protocol. | ||
33 | X.25 support is being worked on. | ||
34 | |||
35 | USAGE | ||
36 | |||
37 | Load the comx.o module and the hardware-specific and protocol-specific | ||
38 | modules you'll need into the running kernel using the insmod utility. | ||
39 | This creates the /proc/comx directory. | ||
40 | See the example scripts in the 'etc' directory. | ||
41 | |||
42 | /proc INTERFACE INTRO | ||
43 | |||
44 | The COMX driver set has a new type of user interface based on the /proc | ||
45 | filesystem which eliminates the need for external user-land software doing | ||
46 | IOCTL calls. | ||
47 | Each network interface or device (i.e. those ones you configure with 'ifconfig' | ||
48 | and 'route' etc.) has a corresponding directory under /proc/comx. You can | ||
49 | dynamically create a new interface by saying 'mkdir /proc/comx/comx0' (or you | ||
50 | can name it whatever you want up to 8 characters long, comx[n] is just a | ||
51 | convention). | ||
52 | Generally the files contained in these directories are text files, which can | ||
53 | be viewed by 'cat filename' and you can write a string to such a file by | ||
54 | saying 'echo _string_ >filename'. This is very similar to the sysctl interface. | ||
55 | Don't use a text editor to edit these files, always use 'echo' (or 'cat' | ||
56 | where appropriate). | ||
57 | When you've created the comx[n] directory, two files are created automagically | ||
58 | in it: 'boardtype' and 'protocol'. You have to fill in these files correctly | ||
59 | for your board and protocol you intend to use (see the board and protocol | ||
60 | descriptions in this file below or the example scripts in the 'etc' directory). | ||
61 | After filling in these files, other files will appear in the directory for | ||
62 | setting the various hardware- and protocol-related informations (for example | ||
63 | irq and io addresses, keepalive values etc.) These files are set to default | ||
64 | values upon creation, so you don't necessarily have to change all of them. | ||
65 | |||
66 | When you're ready with filling in the files in the comx[n] directory, you can | ||
67 | configure the corresponding network interface with the standard network | ||
68 | configuration utilities. If you're unable to bring the interfaces up, look up | ||
69 | the various kernel log files on your system, and consult the messages for | ||
70 | a probable reason. | ||
71 | |||
72 | EXAMPLE | ||
73 | |||
74 | To create the interface 'comx0' which is the first channel of a COMX card: | ||
75 | |||
76 | insmod comx | ||
77 | # insmod comx-hw-comx ; insmod comx-proto-ppp (these are usually | ||
78 | autoloaded if you use the kernel module loader) | ||
79 | |||
80 | mkdir /proc/comx/comx0 | ||
81 | echo comx >/proc/comx/comx0/boardtype | ||
82 | echo 0x360 >/proc/comx/comx0/io <- jumper-selectable I/O port | ||
83 | echo 0x0a >/proc/comx/comx0/irq <- jumper-selectable IRQ line | ||
84 | echo 0xd000 >/proc/comx/comx0/memaddr <- software-configurable memory | ||
85 | address. COMX uses 64 KB, and this | ||
86 | can be: 0xa000, 0xb000, 0xc000, | ||
87 | 0xd000, 0xe000. Avoid conflicts | ||
88 | with other hardware. | ||
89 | cat </etc/siol1.rom >/proc/comx/comx0/firmware <- the firmware for the card | ||
90 | echo HDLC >/proc/comx/comx0/protocol <- the data-link protocol | ||
91 | echo 10 >/proc/comx/comx0/keepalive <- the keepalive for the protocol | ||
92 | ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 <- | ||
93 | finally configure it with ifconfig | ||
94 | Check its status: | ||
95 | cat /proc/comx/comx0/status | ||
96 | |||
97 | If you want to use the second channel of this board: | ||
98 | |||
99 | mkdir /proc/comx/comx1 | ||
100 | echo comx >/proc/comx/comx1/boardtype | ||
101 | echo 0x360 >/proc/comx/comx1/io | ||
102 | echo 10 >/proc/comx/comx1/irq | ||
103 | echo 0xd000 >/proc/comx/comx1/memaddr | ||
104 | echo 1 >/proc/comx/comx1/channel <- channels are numbered | ||
105 | as 0 (default) and 1 | ||
106 | |||
107 | Now, check if the driver recognized that you're going to use the other | ||
108 | channel of the same adapter: | ||
109 | |||
110 | cat /proc/comx/comx0/twin | ||
111 | comx1 | ||
112 | cat /proc/comx/comx1/twin | ||
113 | comx0 | ||
114 | |||
115 | You don't have to load the firmware twice, if you use both channels of | ||
116 | an adapter, just write it into the channel 0's /proc firmware file. | ||
117 | |||
118 | Default values: io 0x360 for COMX, 0x320 (HICOMX), irq 10, memaddr 0xd0000 | ||
119 | |||
120 | THE LOCOMX HARDWARE DRIVER | ||
121 | |||
122 | The LoCOMX driver doesn't require firmware, and it doesn't use memory either, | ||
123 | but it uses DMA channels 1 and 3. You can set the clock rate (if enabled by | ||
124 | jumpers on the board) by writing the kbps value into the file named 'clock'. | ||
125 | Set it to 'external' (it is the default) if you have external clock source. | ||
126 | |||
127 | (Note: currently the LoCOMX driver does not support the internal clock) | ||
128 | |||
129 | THE COMX, CMX AND HICOMX DRIVERS | ||
130 | |||
131 | On the HICOMX, COMX and CMX, you have to load the firmware (it is different for | ||
132 | the three cards!). All these adapters can share the same memory | ||
133 | address (we usually use 0xd0000). On the CMX you can set the internal | ||
134 | clock rate (if enabled by jumpers on the small adapter boards) by writing | ||
135 | the kbps value into the 'clock' file. You have to do this before initializing | ||
136 | the card. If you use both HICOMX and CMX/COMX cards, initialize the HICOMX | ||
137 | first. The I/O address of the HICOMX board is not configurable by any | ||
138 | method available to the user: it is hardwired to 0x320, and if you have to | ||
139 | change it, consult ITC-Pro Ltd. | ||
140 | |||
141 | THE MIXCOM DRIVER | ||
142 | |||
143 | The MixCOM board doesn't require firmware, the driver communicates with | ||
144 | it through I/O ports. You can have three of these cards in one machine. | ||
145 | |||
146 | THE SLICECOM DRIVER | ||
147 | |||
148 | The SliceCOM board doesn't require firmware. You can have 4 of these cards | ||
149 | in one machine. The driver doesn't (yet) support shared interrupts, so | ||
150 | you will need a separate IRQ line for every board. | ||
151 | Read Documentation/networking/slicecom.txt for help on configuring | ||
152 | this adapter. | ||
153 | |||
154 | THE HDLC/PPP LINE PROTOCOL DRIVER | ||
155 | |||
156 | The HDLC/SyncPPP line protocol driver uses the kernel's built-in syncppp | ||
157 | driver (syncppp.o). You don't have to manually select syncppp.o when building | ||
158 | the kernel, the dependencies compile it in automatically. | ||
159 | |||
160 | |||
161 | |||
162 | |||
163 | EXAMPLE | ||
164 | (setting up hw parameters, see above) | ||
165 | |||
166 | # using HDLC: | ||
167 | echo hdlc >/proc/comx/comx0/protocol | ||
168 | echo 10 >/proc/comx/comx0/keepalive <- not necessary, 10 is the default | ||
169 | ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 | ||
170 | |||
171 | (setting up hw parameters, see above) | ||
172 | |||
173 | # using PPP: | ||
174 | echo ppp >/proc/comx/comx0/protocol | ||
175 | ifconfig comx0 up | ||
176 | ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 | ||
177 | |||
178 | |||
179 | THE LAPB LINE PROTOCOL DRIVER | ||
180 | |||
181 | For this, you'll need to configure LAPB support (See 'LAPB Data Link Driver' in | ||
182 | 'Network options' section) into your kernel (thanks to Jonathan Naylor for his | ||
183 | excellent implementation). | ||
184 | comx-proto-lapb.o provides the following files in the appropriate directory | ||
185 | (the default values in parens): t1 (5), t2 (1), n2 (20), mode (DTE, STD) and | ||
186 | window (7). Agree with the administrator of your peer router on these | ||
187 | settings (most people use defaults, but you have to know if you are DTE or | ||
188 | DCE). | ||
189 | |||
190 | EXAMPLE | ||
191 | |||
192 | (setting up hw parameters, see above) | ||
193 | echo lapb >/proc/comx/comx0/protocol | ||
194 | echo dce >/proc/comx/comx0/mode <- DCE interface in this example | ||
195 | ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 | ||
196 | |||
197 | |||
198 | THE FRAME RELAY PROTOCOL DRIVER | ||
199 | |||
200 | You DON'T need any other frame relay related modules from the kernel to use | ||
201 | COMX-Frame Relay. This protocol is a bit more complicated than the others, | ||
202 | because it allows to use 'subinterfaces' or DLCIs within one physical device. | ||
203 | First you have to create the 'master' device (the actual physical interface) | ||
204 | as you would do for other protocols. Specify 'frad' as protocol type. | ||
205 | Now you can bring this interface up by saying 'ifconfig comx0 up' (or whatever | ||
206 | you've named the interface). Do not assign any IP address to this interface | ||
207 | and do not set any routes through it. | ||
208 | Then, set up your DLCIs the following way: create a comx interface for each | ||
209 | DLCI you intend to use (with mkdir), and write 'dlci' to the 'boardtype' file, | ||
210 | and 'ietf-ip' to the 'protocol' file. Currently, the only supported | ||
211 | encapsulation type is this (also called as RFC1294/1490 IP encapsulation). | ||
212 | Write the DLCI number to the 'dlci' file, and write the name of the physical | ||
213 | COMX device to the file called 'master'. | ||
214 | Now you can assign an IP address to this interface and set routes using it. | ||
215 | See the example file for further info and example config script. | ||
216 | Notes: this driver implements a DTE interface with partially implemented | ||
217 | Q933a LMI. | ||
218 | You can find an extensively commented example in the 'etc' directory. | ||
219 | |||
220 | FURTHER /proc FILES | ||
221 | |||
222 | boardtype: | ||
223 | Type of the hardware. Valid values are: | ||
224 | 'comx', 'hicomx', 'locomx', 'cmx', 'slicecom'. | ||
225 | |||
226 | protocol: | ||
227 | Data-link protocol on this channel. Can be: HDLC, LAPB, PPP, FRAD | ||
228 | |||
229 | status: | ||
230 | You can read the channel's actual status from the 'status' file, for example | ||
231 | 'cat /proc/comx/comx3/status'. | ||
232 | |||
233 | lineup_delay: | ||
234 | Interpreted in seconds (default is 1). Used to avoid line jitter: the system | ||
235 | will consider the line status 'UP' only if it is up for at least this number | ||
236 | of seconds. | ||
237 | |||
238 | debug: | ||
239 | You can set various debug options through this file. Valid options are: | ||
240 | 'comx_events', 'comx_tx', 'comx_rx', 'hw_events', 'hw_tx', 'hw_rx'. | ||
241 | You can enable a debug options by writing its name prepended by a '+' into | ||
242 | the debug file, for example 'echo +comx_rx >comx0/debug'. | ||
243 | Disabling an option happens similarly, use the '-' prefix | ||
244 | (e.g. 'echo -hw_rx >debug'). | ||
245 | Debug results can be read from the debug file, for example: | ||
246 | tail -f /proc/comx/comx2/debug | ||
247 | |||
248 | |||
diff --git a/Documentation/networking/cops.txt b/Documentation/networking/cops.txt new file mode 100644 index 000000000000..3e344b448e07 --- /dev/null +++ b/Documentation/networking/cops.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | Text File for the COPS LocalTalk Linux driver (cops.c). | ||
2 | By Jay Schulist <jschlst@samba.org> | ||
3 | |||
4 | This driver has two modes and they are: Dayna mode and Tangent mode. | ||
5 | Each mode corresponds with the type of card. It has been found | ||
6 | that there are 2 main types of cards and all other cards are | ||
7 | the same and just have different names or only have minor differences | ||
8 | such as more IO ports. As this driver is tested it will | ||
9 | become more clear exactly what cards are supported. | ||
10 | |||
11 | Right now these cards are known to work with the COPS driver. The | ||
12 | LT-200 cards work in a somewhat more limited capacity than the | ||
13 | DL200 cards, which work very well and are in use by many people. | ||
14 | |||
15 | TANGENT driver mode: | ||
16 | Tangent ATB-II, Novell NL-1000, Daystar Digital LT-200 | ||
17 | DAYNA driver mode: | ||
18 | Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95, | ||
19 | Farallon PhoneNET PC III, Farallon PhoneNET PC II | ||
20 | Other cards possibly supported mode unknown though: | ||
21 | Dayna DL2000 (Full length) | ||
22 | |||
23 | The COPS driver defaults to using Dayna mode. To change the driver's | ||
24 | mode if you built a driver with dual support use board_type=1 or | ||
25 | board_type=2 for Dayna or Tangent with insmod. | ||
26 | |||
27 | ** Operation/loading of the driver. | ||
28 | Use modprobe like this: /sbin/modprobe cops.o (IO #) (IRQ #) | ||
29 | If you do not specify any options the driver will try and use the IO = 0x240, | ||
30 | IRQ = 5. As of right now I would only use IRQ 5 for the card, if autoprobing. | ||
31 | |||
32 | To load multiple COPS driver Localtalk cards you can do one of the following. | ||
33 | |||
34 | insmod cops io=0x240 irq=5 | ||
35 | insmod -o cops2 cops io=0x260 irq=3 | ||
36 | |||
37 | Or in lilo.conf put something like this: | ||
38 | append="ether=5,0x240,lt0 ether=3,0x260,lt1" | ||
39 | |||
40 | Then bring up the interface with ifconfig. It will look something like this: | ||
41 | lt0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00 | ||
42 | inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 | ||
43 | UP BROADCAST RUNNING NOARP MULTICAST MTU:600 Metric:1 | ||
44 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 | ||
45 | TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0 | ||
46 | |||
47 | ** Netatalk Configuration | ||
48 | You will need to configure atalkd with something like the following to make | ||
49 | it work with the cops.c driver. | ||
50 | |||
51 | * For single LTalk card use. | ||
52 | dummy -seed -phase 2 -net 2000 -addr 2000.10 -zone "1033" | ||
53 | lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033" | ||
54 | |||
55 | * For multiple cards, Ethernet and LocalTalk. | ||
56 | eth0 -seed -phase 2 -net 3000 -addr 3000.20 -zone "1033" | ||
57 | lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033" | ||
58 | |||
59 | * For multiple LocalTalk cards, and an Ethernet card. | ||
60 | * Order seems to matter here, Ethernet last. | ||
61 | lt0 -seed -phase 1 -net 1000 -addr 1000.10 -zone "LocalTalk1" | ||
62 | lt1 -seed -phase 1 -net 2000 -addr 2000.20 -zone "LocalTalk2" | ||
63 | eth0 -seed -phase 2 -net 3000 -addr 3000.30 -zone "EtherTalk" | ||
diff --git a/Documentation/networking/cs89x0.txt b/Documentation/networking/cs89x0.txt new file mode 100644 index 000000000000..188beb7d6a17 --- /dev/null +++ b/Documentation/networking/cs89x0.txt | |||
@@ -0,0 +1,703 @@ | |||
1 | |||
2 | NOTE | ||
3 | ---- | ||
4 | |||
5 | This document was contributed by Cirrus Logic for kernel 2.2.5. This version | ||
6 | has been updated for 2.3.48 by Andrew Morton <andrewm@uow.edu.au> | ||
7 | |||
8 | Cirrus make a copy of this driver available at their website, as | ||
9 | described below. In general, you should use the driver version which | ||
10 | comes with your Linux distribution. | ||
11 | |||
12 | |||
13 | |||
14 | CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS | ||
15 | Linux Network Interface Driver ver. 2.00 <kernel 2.3.48> | ||
16 | =============================================================================== | ||
17 | |||
18 | |||
19 | TABLE OF CONTENTS | ||
20 | |||
21 | 1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS | ||
22 | 1.1 Product Overview | ||
23 | 1.2 Driver Description | ||
24 | 1.2.1 Driver Name | ||
25 | 1.2.2 File in the Driver Package | ||
26 | 1.3 System Requirements | ||
27 | 1.4 Licensing Information | ||
28 | |||
29 | 2.0 ADAPTER INSTALLATION and CONFIGURATION | ||
30 | 2.1 CS8900-based Adapter Configuration | ||
31 | 2.2 CS8920-based Adapter Configuration | ||
32 | |||
33 | 3.0 LOADING THE DRIVER AS A MODULE | ||
34 | |||
35 | 4.0 COMPILING THE DRIVER | ||
36 | 4.1 Compiling the Driver as a Loadable Module | ||
37 | 4.2 Compiling the driver to support memory mode | ||
38 | 4.3 Compiling the driver to support Rx DMA | ||
39 | 4.4 Compiling the Driver into the Kernel | ||
40 | |||
41 | 5.0 TESTING AND TROUBLESHOOTING | ||
42 | 5.1 Known Defects and Limitations | ||
43 | 5.2 Testing the Adapter | ||
44 | 5.2.1 Diagnostic Self-Test | ||
45 | 5.2.2 Diagnostic Network Test | ||
46 | 5.3 Using the Adapter's LEDs | ||
47 | 5.4 Resolving I/O Conflicts | ||
48 | |||
49 | 6.0 TECHNICAL SUPPORT | ||
50 | 6.1 Contacting Cirrus Logic's Technical Support | ||
51 | 6.2 Information Required Before Contacting Technical Support | ||
52 | 6.3 Obtaining the Latest Driver Version | ||
53 | 6.4 Current maintainer | ||
54 | 6.5 Kernel boot parameters | ||
55 | |||
56 | |||
57 | 1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS | ||
58 | =============================================================================== | ||
59 | |||
60 | |||
61 | 1.1 PRODUCT OVERVIEW | ||
62 | |||
63 | The CS8900-based ISA Ethernet Adapters from Cirrus Logic follow | ||
64 | IEEE 802.3 standards and support half or full-duplex operation in ISA bus | ||
65 | computers on 10 Mbps Ethernet networks. The adapters are designed for operation | ||
66 | in 16-bit ISA or EISA bus expansion slots and are available in | ||
67 | 10BaseT-only or 3-media configurations (10BaseT, 10Base2, and AUI for 10Base-5 | ||
68 | or fiber networks). | ||
69 | |||
70 | CS8920-based adapters are similar to the CS8900-based adapter with additional | ||
71 | features for Plug and Play (PnP) support and Wakeup Frame recognition. As | ||
72 | such, the configuration procedures differ somewhat between the two types of | ||
73 | adapters. Refer to the "Adapter Configuration" section for details on | ||
74 | configuring both types of adapters. | ||
75 | |||
76 | |||
77 | 1.2 DRIVER DESCRIPTION | ||
78 | |||
79 | The CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linux | ||
80 | v2.3.48 or greater kernel. It can be compiled directly into the kernel | ||
81 | or loaded at run-time as a device driver module. | ||
82 | |||
83 | 1.2.1 Driver Name: cs89x0 | ||
84 | |||
85 | 1.2.2 Files in the Driver Archive: | ||
86 | |||
87 | The files in the driver at Cirrus' website include: | ||
88 | |||
89 | readme.txt - this file | ||
90 | build - batch file to compile cs89x0.c. | ||
91 | cs89x0.c - driver C code | ||
92 | cs89x0.h - driver header file | ||
93 | cs89x0.o - pre-compiled module (for v2.2.5 kernel) | ||
94 | config/Config.in - sample file to include cs89x0 driver in the kernel. | ||
95 | config/Makefile - sample file to include cs89x0 driver in the kernel. | ||
96 | config/Space.c - sample file to include cs89x0 driver in the kernel. | ||
97 | |||
98 | |||
99 | |||
100 | 1.3 SYSTEM REQUIREMENTS | ||
101 | |||
102 | The following hardware is required: | ||
103 | |||
104 | * Cirrus Logic LAN (CS8900/20-based) Ethernet ISA Adapter | ||
105 | |||
106 | * IBM or IBM-compatible PC with: | ||
107 | * An 80386 or higher processor | ||
108 | * 16 bytes of contiguous IO space available between 210h - 370h | ||
109 | * One available IRQ (5,10,11,or 12 for the CS8900, 3-7,9-15 for CS8920). | ||
110 | |||
111 | * Appropriate cable (and connector for AUI, 10BASE-2) for your network | ||
112 | topology. | ||
113 | |||
114 | The following software is required: | ||
115 | |||
116 | * LINUX kernel version 2.3.48 or higher | ||
117 | |||
118 | * CS8900/20 Setup Utility (DOS-based) | ||
119 | |||
120 | * LINUX kernel sources for your kernel (if compiling into kernel) | ||
121 | |||
122 | * GNU Toolkit (gcc and make) v2.6 or above (if compiling into kernel | ||
123 | or a module) | ||
124 | |||
125 | |||
126 | |||
127 | 1.4 LICENSING INFORMATION | ||
128 | |||
129 | This program is free software; you can redistribute it and/or modify it under | ||
130 | the terms of the GNU General Public License as published by the Free Software | ||
131 | Foundation, version 1. | ||
132 | |||
133 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
134 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
135 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
136 | more details. | ||
137 | |||
138 | For a full copy of the GNU General Public License, write to the Free Software | ||
139 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
140 | |||
141 | |||
142 | |||
143 | 2.0 ADAPTER INSTALLATION and CONFIGURATION | ||
144 | =============================================================================== | ||
145 | |||
146 | Both the CS8900 and CS8920-based adapters can be configured using parameters | ||
147 | stored in an on-board EEPROM. You must use the DOS-based CS8900/20 Setup | ||
148 | Utility if you want to change the adapter's configuration in EEPROM. | ||
149 | |||
150 | When loading the driver as a module, you can specify many of the adapter's | ||
151 | configuration parameters on the command-line to override the EEPROM's settings | ||
152 | or for interface configuration when an EEPROM is not used. (CS8920-based | ||
153 | adapters must use an EEPROM.) See Section 3.0 LOADING THE DRIVER AS A MODULE. | ||
154 | |||
155 | Since the CS8900/20 Setup Utility is a DOS-based application, you must install | ||
156 | and configure the adapter in a DOS-based system using the CS8900/20 Setup | ||
157 | Utility before installation in the target LINUX system. (Not required if | ||
158 | installing a CS8900-based adapter and the default configuration is acceptable.) | ||
159 | |||
160 | |||
161 | 2.1 CS8900-BASED ADAPTER CONFIGURATION | ||
162 | |||
163 | CS8900-based adapters shipped from Cirrus Logic have been configured | ||
164 | with the following "default" settings: | ||
165 | |||
166 | Operation Mode: Memory Mode | ||
167 | IRQ: 10 | ||
168 | Base I/O Address: 300 | ||
169 | Memory Base Address: D0000 | ||
170 | Optimization: DOS Client | ||
171 | Transmission Mode: Half-duplex | ||
172 | BootProm: None | ||
173 | Media Type: Autodetect (3-media cards) or | ||
174 | 10BASE-T (10BASE-T only adapter) | ||
175 | |||
176 | You should only change the default configuration settings if conflicts with | ||
177 | another adapter exists. To change the adapter's configuration, run the | ||
178 | CS8900/20 Setup Utility. | ||
179 | |||
180 | |||
181 | 2.2 CS8920-BASED ADAPTER CONFIGURATION | ||
182 | |||
183 | CS8920-based adapters are shipped from Cirrus Logic configured as Plug | ||
184 | and Play (PnP) enabled. However, since the cs89x0 driver does NOT | ||
185 | support PnP, you must install the CS8920 adapter in a DOS-based PC and | ||
186 | run the CS8900/20 Setup Utility to disable PnP and configure the | ||
187 | adapter before installation in the target Linux system. Failure to do | ||
188 | this will leave the adapter inactive and the driver will be unable to | ||
189 | communicate with the adapter. | ||
190 | |||
191 | |||
192 | **************************************************************** | ||
193 | * CS8920-BASED ADAPTERS: * | ||
194 | * * | ||
195 | * CS8920-BASED ADAPTERS ARE PLUG and PLAY ENABLED BY DEFAULT. * | ||
196 | * THE CS89X0 DRIVER DOES NOT SUPPORT PnP. THEREFORE, YOU MUST * | ||
197 | * RUN THE CS8900/20 SETUP UTILITY TO DISABLE PnP SUPPORT AND * | ||
198 | * TO ACTIVATE THE ADAPTER. * | ||
199 | **************************************************************** | ||
200 | |||
201 | |||
202 | |||
203 | |||
204 | 3.0 LOADING THE DRIVER AS A MODULE | ||
205 | =============================================================================== | ||
206 | |||
207 | If the driver is compiled as a loadable module, you can load the driver module | ||
208 | with the 'modprobe' command. Many of the adapter's configuration parameters can | ||
209 | be specified as command-line arguments to the load command. This facility | ||
210 | provides a means to override the EEPROM's settings or for interface | ||
211 | configuration when an EEPROM is not used. | ||
212 | |||
213 | Example: | ||
214 | |||
215 | insmod cs89x0.o io=0x200 irq=0xA media=aui | ||
216 | |||
217 | This example loads the module and configures the adapter to use an IO port base | ||
218 | address of 200h, interrupt 10, and use the AUI media connection. The following | ||
219 | configuration options are available on the command line: | ||
220 | |||
221 | * io=### - specify IO address (200h-360h) | ||
222 | * irq=## - specify interrupt level | ||
223 | * use_dma=1 - Enable DMA | ||
224 | * dma=# - specify dma channel (Driver is compiled to support | ||
225 | Rx DMA only) | ||
226 | * dmasize=# (16 or 64) - DMA size 16K or 64K. Default value is set to 16. | ||
227 | * media=rj45 - specify media type | ||
228 | or media=bnc | ||
229 | or media=aui | ||
230 | or medai=auto | ||
231 | * duplex=full - specify forced half/full/autonegotiate duplex | ||
232 | or duplex=half | ||
233 | or duplex=auto | ||
234 | * debug=# - debug level (only available if the driver was compiled | ||
235 | for debugging) | ||
236 | |||
237 | NOTES: | ||
238 | |||
239 | a) If an EEPROM is present, any specified command-line parameter | ||
240 | will override the corresponding configuration value stored in | ||
241 | EEPROM. | ||
242 | |||
243 | b) The "io" parameter must be specified on the command-line. | ||
244 | |||
245 | c) The driver's hardware probe routine is designed to avoid | ||
246 | writing to I/O space until it knows that there is a cs89x0 | ||
247 | card at the written addresses. This could cause problems | ||
248 | with device probing. To avoid this behaviour, add one | ||
249 | to the `io=' module parameter. This doesn't actually change | ||
250 | the I/O address, but it is a flag to tell the driver | ||
251 | topartially initialise the hardware before trying to | ||
252 | identify the card. This could be dangerous if you are | ||
253 | not sure that there is a cs89x0 card at the provided address. | ||
254 | |||
255 | For example, to scan for an adapter located at IO base 0x300, | ||
256 | specify an IO address of 0x301. | ||
257 | |||
258 | d) The "duplex=auto" parameter is only supported for the CS8920. | ||
259 | |||
260 | e) The minimum command-line configuration required if an EEPROM is | ||
261 | not present is: | ||
262 | |||
263 | io | ||
264 | irq | ||
265 | media type (no autodetect) | ||
266 | |||
267 | f) The following additional parameters are CS89XX defaults (values | ||
268 | used with no EEPROM or command-line argument). | ||
269 | |||
270 | * DMA Burst = enabled | ||
271 | * IOCHRDY Enabled = enabled | ||
272 | * UseSA = enabled | ||
273 | * CS8900 defaults to half-duplex if not specified on command-line | ||
274 | * CS8920 defaults to autoneg if not specified on command-line | ||
275 | * Use reset defaults for other config parameters | ||
276 | * dma_mode = 0 | ||
277 | |||
278 | g) You can use ifconfig to set the adapter's Ethernet address. | ||
279 | |||
280 | h) Many Linux distributions use the 'modprobe' command to load | ||
281 | modules. This program uses the '/etc/conf.modules' file to | ||
282 | determine configuration information which is passed to a driver | ||
283 | module when it is loaded. All the configuration options which are | ||
284 | described above may be placed within /etc/conf.modules. | ||
285 | |||
286 | For example: | ||
287 | |||
288 | > cat /etc/conf.modules | ||
289 | ... | ||
290 | alias eth0 cs89x0 | ||
291 | options cs89x0 io=0x0200 dma=5 use_dma=1 | ||
292 | ... | ||
293 | |||
294 | In this example we are telling the module system that the | ||
295 | ethernet driver for this machine should use the cs89x0 driver. We | ||
296 | are asking 'modprobe' to pass the 'io', 'dma' and 'use_dma' | ||
297 | arguments to the driver when it is loaded. | ||
298 | |||
299 | i) Cirrus recommend that the cs89x0 use the ISA DMA channels 5, 6 or | ||
300 | 7. You will probably find that other DMA channels will not work. | ||
301 | |||
302 | j) The cs89x0 supports DMA for receiving only. DMA mode is | ||
303 | significantly more efficient. Flooding a 400 MHz Celeron machine | ||
304 | with large ping packets consumes 82% of its CPU capacity in non-DMA | ||
305 | mode. With DMA this is reduced to 45%. | ||
306 | |||
307 | k) If your Linux kernel was compiled with inbuilt plug-and-play | ||
308 | support you will be able to find information about the cs89x0 card | ||
309 | with the command | ||
310 | |||
311 | cat /proc/isapnp | ||
312 | |||
313 | l) If during DMA operation you find erratic behavior or network data | ||
314 | corruption you should use your PC's BIOS to slow the EISA bus clock. | ||
315 | |||
316 | m) If the cs89x0 driver is compiled directly into the kernel | ||
317 | (non-modular) then its I/O address is automatically determined by | ||
318 | ISA bus probing. The IRQ number, media options, etc are determined | ||
319 | from the card's EEPROM. | ||
320 | |||
321 | n) If the cs89x0 driver is compiled directly into the kernel, DMA | ||
322 | mode may be selected by providing the kernel with a boot option | ||
323 | 'cs89x0_dma=N' where 'N' is the desired DMA channel number (5, 6 or 7). | ||
324 | |||
325 | Kernel boot options may be provided on the LILO command line: | ||
326 | |||
327 | LILO boot: linux cs89x0_dma=5 | ||
328 | |||
329 | or they may be placed in /etc/lilo.conf: | ||
330 | |||
331 | image=/boot/bzImage-2.3.48 | ||
332 | append="cs89x0_dma=5" | ||
333 | label=linux | ||
334 | root=/dev/hda5 | ||
335 | read-only | ||
336 | |||
337 | The DMA Rx buffer size is hardwired to 16 kbytes in this mode. | ||
338 | (64k mode is not available). | ||
339 | |||
340 | |||
341 | 4.0 COMPILING THE DRIVER | ||
342 | =============================================================================== | ||
343 | |||
344 | The cs89x0 driver can be compiled directly into the kernel or compiled into | ||
345 | a loadable device driver module. | ||
346 | |||
347 | |||
348 | 4.1 COMPILING THE DRIVER AS A LOADABLE MODULE | ||
349 | |||
350 | To compile the driver into a loadable module, use the following command | ||
351 | (single command line, without quotes): | ||
352 | |||
353 | "gcc -D__KERNEL__ -I/usr/src/linux/include -I/usr/src/linux/net/inet -Wall | ||
354 | -Wstrict-prototypes -O2 -fomit-frame-pointer -DMODULE -DCONFIG_MODVERSIONS | ||
355 | -c cs89x0.c" | ||
356 | |||
357 | 4.2 COMPILING THE DRIVER TO SUPPORT MEMORY MODE | ||
358 | |||
359 | Support for memory mode was not carried over into the 2.3 series kernels. | ||
360 | |||
361 | 4.3 COMPILING THE DRIVER TO SUPPORT Rx DMA | ||
362 | |||
363 | The compile-time optionality for DMA was removed in the 2.3 kernel | ||
364 | series. DMA support is now unconditionally part of the driver. It is | ||
365 | enabled by the 'use_dma=1' module option. | ||
366 | |||
367 | 4.4 COMPILING THE DRIVER INTO THE KERNEL | ||
368 | |||
369 | If your Linux distribution already has support for the cs89x0 driver | ||
370 | then simply copy the source file to the /usr/src/linux/drivers/net | ||
371 | directory to replace the original ones and run the make utility to | ||
372 | rebuild the kernel. See Step 3 for rebuilding the kernel. | ||
373 | |||
374 | If your Linux does not include the cs89x0 driver, you need to edit three | ||
375 | configuration files, copy the source file to the /usr/src/linux/drivers/net | ||
376 | directory, and then run the make utility to rebuild the kernel. | ||
377 | |||
378 | 1. Edit the following configuration files by adding the statements as | ||
379 | indicated. (When possible, try to locate the added text to the section of the | ||
380 | file containing similar statements). | ||
381 | |||
382 | |||
383 | a.) In /usr/src/linux/drivers/net/Config.in, add: | ||
384 | |||
385 | tristate 'CS89x0 support' CONFIG_CS89x0 | ||
386 | |||
387 | Example: | ||
388 | |||
389 | if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then | ||
390 | tristate 'ICL EtherTeam 16i/32 support' CONFIG_ETH16I | ||
391 | fi | ||
392 | |||
393 | tristate 'CS89x0 support' CONFIG_CS89x0 | ||
394 | |||
395 | tristate 'NE2000/NE1000 support' CONFIG_NE2000 | ||
396 | if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then | ||
397 | tristate 'NI5210 support' CONFIG_NI52 | ||
398 | |||
399 | |||
400 | b.) In /usr/src/linux/drivers/net/Makefile, add the following lines: | ||
401 | |||
402 | ifeq ($(CONFIG_CS89x0),y) | ||
403 | L_OBJS += cs89x0.o | ||
404 | else | ||
405 | ifeq ($(CONFIG_CS89x0),m) | ||
406 | M_OBJS += cs89x0.o | ||
407 | endif | ||
408 | endif | ||
409 | |||
410 | |||
411 | c.) In /linux/drivers/net/Space.c file, add the line: | ||
412 | |||
413 | extern int cs89x0_probe(struct device *dev); | ||
414 | |||
415 | |||
416 | Example: | ||
417 | |||
418 | extern int ultra_probe(struct device *dev); | ||
419 | extern int wd_probe(struct device *dev); | ||
420 | extern int el2_probe(struct device *dev); | ||
421 | |||
422 | extern int cs89x0_probe(struct device *dev); | ||
423 | |||
424 | extern int ne_probe(struct device *dev); | ||
425 | extern int hp_probe(struct device *dev); | ||
426 | extern int hp_plus_probe(struct device *dev); | ||
427 | |||
428 | |||
429 | Also add: | ||
430 | |||
431 | #ifdef CONFIG_CS89x0 | ||
432 | { cs89x0_probe,0 }, | ||
433 | #endif | ||
434 | |||
435 | |||
436 | 2.) Copy the driver source files (cs89x0.c and cs89x0.h) | ||
437 | into the /usr/src/linux/drivers/net directory. | ||
438 | |||
439 | |||
440 | 3.) Go to /usr/src/linux directory and run 'make config' followed by 'make' | ||
441 | (or make bzImage) to rebuild the kernel. | ||
442 | |||
443 | 4.) Use the DOS 'setup' utility to disable plug and play on the NIC. | ||
444 | |||
445 | |||
446 | 5.0 TESTING AND TROUBLESHOOTING | ||
447 | =============================================================================== | ||
448 | |||
449 | 5.1 KNOWN DEFECTS and LIMITATIONS | ||
450 | |||
451 | Refer to the RELEASE.TXT file distributed as part of this archive for a list of | ||
452 | known defects, driver limitations, and work arounds. | ||
453 | |||
454 | |||
455 | 5.2 TESTING THE ADAPTER | ||
456 | |||
457 | Once the adapter has been installed and configured, the diagnostic option of | ||
458 | the CS8900/20 Setup Utility can be used to test the functionality of the | ||
459 | adapter and its network connection. Use the diagnostics 'Self Test' option to | ||
460 | test the functionality of the adapter with the hardware configuration you have | ||
461 | assigned. You can use the diagnostics 'Network Test' to test the ability of the | ||
462 | adapter to communicate across the Ethernet with another PC equipped with a | ||
463 | CS8900/20-based adapter card (it must also be running the CS8900/20 Setup | ||
464 | Utility). | ||
465 | |||
466 | NOTE: The Setup Utility's diagnostics are designed to run in a | ||
467 | DOS-only operating system environment. DO NOT run the diagnostics | ||
468 | from a DOS or command prompt session under Windows 95, Windows NT, | ||
469 | OS/2, or other operating system. | ||
470 | |||
471 | To run the diagnostics tests on the CS8900/20 adapter: | ||
472 | |||
473 | 1.) Boot DOS on the PC and start the CS8900/20 Setup Utility. | ||
474 | |||
475 | 2.) The adapter's current configuration is displayed. Hit the ENTER key to | ||
476 | get to the main menu. | ||
477 | |||
478 | 4.) Select 'Diagnostics' (ALT-G) from the main menu. | ||
479 | * Select 'Self-Test' to test the adapter's basic functionality. | ||
480 | * Select 'Network Test' to test the network connection and cabling. | ||
481 | |||
482 | |||
483 | 5.2.1 DIAGNOSTIC SELF-TEST | ||
484 | |||
485 | The diagnostic self-test checks the adapter's basic functionality as well as | ||
486 | its ability to communicate across the ISA bus based on the system resources | ||
487 | assigned during hardware configuration. The following tests are performed: | ||
488 | |||
489 | * IO Register Read/Write Test | ||
490 | The IO Register Read/Write test insures that the CS8900/20 can be | ||
491 | accessed in IO mode, and that the IO base address is correct. | ||
492 | |||
493 | * Shared Memory Test | ||
494 | The Shared Memory test insures the CS8900/20 can be accessed in memory | ||
495 | mode and that the range of memory addresses assigned does not conflict | ||
496 | with other devices in the system. | ||
497 | |||
498 | * Interrupt Test | ||
499 | The Interrupt test insures there are no conflicts with the assigned IRQ | ||
500 | signal. | ||
501 | |||
502 | * EEPROM Test | ||
503 | The EEPROM test insures the EEPROM can be read. | ||
504 | |||
505 | * Chip RAM Test | ||
506 | The Chip RAM test insures the 4K of memory internal to the CS8900/20 is | ||
507 | working properly. | ||
508 | |||
509 | * Internal Loop-back Test | ||
510 | The Internal Loop Back test insures the adapter's transmitter and | ||
511 | receiver are operating properly. If this test fails, make sure the | ||
512 | adapter's cable is connected to the network (check for LED activity for | ||
513 | example). | ||
514 | |||
515 | * Boot PROM Test | ||
516 | The Boot PROM test insures the Boot PROM is present, and can be read. | ||
517 | Failure indicates the Boot PROM was not successfully read due to a | ||
518 | hardware problem or due to a conflicts on the Boot PROM address | ||
519 | assignment. (Test only applies if the adapter is configured to use the | ||
520 | Boot PROM option.) | ||
521 | |||
522 | Failure of a test item indicates a possible system resource conflict with | ||
523 | another device on the ISA bus. In this case, you should use the Manual Setup | ||
524 | option to reconfigure the adapter by selecting a different value for the system | ||
525 | resource that failed. | ||
526 | |||
527 | |||
528 | 5.2.2 DIAGNOSTIC NETWORK TEST | ||
529 | |||
530 | The Diagnostic Network Test verifies a working network connection by | ||
531 | transferring data between two CS8900/20 adapters installed in different PCs | ||
532 | on the same network. (Note: the diagnostic network test should not be run | ||
533 | between two nodes across a router.) | ||
534 | |||
535 | This test requires that each of the two PCs have a CS8900/20-based adapter | ||
536 | installed and have the CS8900/20 Setup Utility running. The first PC is | ||
537 | configured as a Responder and the other PC is configured as an Initiator. | ||
538 | Once the Initiator is started, it sends data frames to the Responder which | ||
539 | returns the frames to the Initiator. | ||
540 | |||
541 | The total number of frames received and transmitted are displayed on the | ||
542 | Initiator's display, along with a count of the number of frames received and | ||
543 | transmitted OK or in error. The test can be terminated anytime by the user at | ||
544 | either PC. | ||
545 | |||
546 | To setup the Diagnostic Network Test: | ||
547 | |||
548 | 1.) Select a PC with a CS8900/20-based adapter and a known working network | ||
549 | connection to act as the Responder. Run the CS8900/20 Setup Utility | ||
550 | and select 'Diagnostics -> Network Test -> Responder' from the main | ||
551 | menu. Hit ENTER to start the Responder. | ||
552 | |||
553 | 2.) Return to the PC with the CS8900/20-based adapter you want to test and | ||
554 | start the CS8900/20 Setup Utility. | ||
555 | |||
556 | 3.) From the main menu, Select 'Diagnostic -> Network Test -> Initiator'. | ||
557 | Hit ENTER to start the test. | ||
558 | |||
559 | You may stop the test on the Initiator at any time while allowing the Responder | ||
560 | to continue running. In this manner, you can move to additional PCs and test | ||
561 | them by starting the Initiator on another PC without having to stop/start the | ||
562 | Responder. | ||
563 | |||
564 | |||
565 | |||
566 | 5.3 USING THE ADAPTER'S LEDs | ||
567 | |||
568 | The 2 and 3-media adapters have two LEDs visible on the back end of the board | ||
569 | located near the 10Base-T connector. | ||
570 | |||
571 | Link Integrity LED: A "steady" ON of the green LED indicates a valid 10Base-T | ||
572 | connection. (Only applies to 10Base-T. The green LED has no significance for | ||
573 | a 10Base-2 or AUI connection.) | ||
574 | |||
575 | TX/RX LED: The yellow LED lights briefly each time the adapter transmits or | ||
576 | receives data. (The yellow LED will appear to "flicker" on a typical network.) | ||
577 | |||
578 | |||
579 | 5.4 RESOLVING I/O CONFLICTS | ||
580 | |||
581 | An IO conflict occurs when two or more adapter use the same ISA resource (IO | ||
582 | address, memory address or IRQ). You can usually detect an IO conflict in one | ||
583 | of four ways after installing and or configuring the CS8900/20-based adapter: | ||
584 | |||
585 | 1.) The system does not boot properly (or at all). | ||
586 | |||
587 | 2.) The driver can not communicate with the adapter, reporting an "Adapter | ||
588 | not found" error message. | ||
589 | |||
590 | 3.) You cannot connect to the network or the driver will not load. | ||
591 | |||
592 | 4.) If you have configured the adapter to run in memory mode but the driver | ||
593 | reports it is using IO mode when loading, this is an indication of a | ||
594 | memory address conflict. | ||
595 | |||
596 | If an IO conflict occurs, run the CS8900/20 Setup Utility and perform a | ||
597 | diagnostic self-test. Normally, the ISA resource in conflict will fail the | ||
598 | self-test. If so, reconfigure the adapter selecting another choice for the | ||
599 | resource in conflict. Run the diagnostics again to check for further IO | ||
600 | conflicts. | ||
601 | |||
602 | In some cases, such as when the PC will not boot, it may be necessary to remove | ||
603 | the adapter and reconfigure it by installing it in another PC to run the | ||
604 | CS8900/20 Setup Utility. Once reinstalled in the target system, run the | ||
605 | diagnostics self-test to ensure the new configuration is free of conflicts | ||
606 | before loading the driver again. | ||
607 | |||
608 | When manually configuring the adapter, keep in mind the typical ISA system | ||
609 | resource usage as indicated in the tables below. | ||
610 | |||
611 | I/O Address Device IRQ Device | ||
612 | ----------- -------- --- -------- | ||
613 | 200-20F Game I/O adapter 3 COM2, Bus Mouse | ||
614 | 230-23F Bus Mouse 4 COM1 | ||
615 | 270-27F LPT3: third parallel port 5 LPT2 | ||
616 | 2F0-2FF COM2: second serial port 6 Floppy Disk controller | ||
617 | 320-32F Fixed disk controller 7 LPT1 | ||
618 | 8 Real-time Clock | ||
619 | 9 EGA/VGA display adapter | ||
620 | 12 Mouse (PS/2) | ||
621 | Memory Address Device 13 Math Coprocessor | ||
622 | -------------- --------------------- 14 Hard Disk controller | ||
623 | A000-BFFF EGA Graphics Adpater | ||
624 | A000-C7FF VGA Graphics Adpater | ||
625 | B000-BFFF Mono Graphics Adapter | ||
626 | B800-BFFF Color Graphics Adapter | ||
627 | E000-FFFF AT BIOS | ||
628 | |||
629 | |||
630 | |||
631 | |||
632 | 6.0 TECHNICAL SUPPORT | ||
633 | =============================================================================== | ||
634 | |||
635 | 6.1 CONTACTING CIRRUS LOGIC'S TECHNICAL SUPPORT | ||
636 | |||
637 | Cirrus Logic's CS89XX Technical Application Support can be reached at: | ||
638 | |||
639 | Telephone :(800) 888-5016 (from inside U.S. and Canada) | ||
640 | :(512) 442-7555 (from outside the U.S. and Canada) | ||
641 | Fax :(512) 912-3871 | ||
642 | Email :ethernet@crystal.cirrus.com | ||
643 | WWW :http://www.cirrus.com | ||
644 | |||
645 | |||
646 | 6.2 INFORMATION REQUIRED BEFORE CONTACTING TECHNICAL SUPPORT | ||
647 | |||
648 | Before contacting Cirrus Logic for technical support, be prepared to provide as | ||
649 | Much of the following information as possible. | ||
650 | |||
651 | 1.) Adapter type (CRD8900, CDB8900, CDB8920, etc.) | ||
652 | |||
653 | 2.) Adapter configuration | ||
654 | |||
655 | * IO Base, Memory Base, IO or memory mode enabled, IRQ, DMA channel | ||
656 | * Plug and Play enabled/disabled (CS8920-based adapters only) | ||
657 | * Configured for media auto-detect or specific media type (which type). | ||
658 | |||
659 | 3.) PC System's Configuration | ||
660 | |||
661 | * Plug and Play system (yes/no) | ||
662 | * BIOS (make and version) | ||
663 | * System make and model | ||
664 | * CPU (type and speed) | ||
665 | * System RAM | ||
666 | * SCSI Adapter | ||
667 | |||
668 | 4.) Software | ||
669 | |||
670 | * CS89XX driver and version | ||
671 | * Your network operating system and version | ||
672 | * Your system's OS version | ||
673 | * Version of all protocol support files | ||
674 | |||
675 | 5.) Any Error Message displayed. | ||
676 | |||
677 | |||
678 | |||
679 | 6.3 OBTAINING THE LATEST DRIVER VERSION | ||
680 | |||
681 | You can obtain the latest CS89XX drivers and support software from Cirrus Logic's | ||
682 | Web site. You can also contact Cirrus Logic's Technical Support (email: | ||
683 | ethernet@crystal.cirrus.com) and request that you be registered for automatic | ||
684 | software-update notification. | ||
685 | |||
686 | Cirrus Logic maintains a web page at http://www.cirrus.com with the | ||
687 | the latest drivers and technical publications. | ||
688 | |||
689 | |||
690 | 6.4 Current maintainer | ||
691 | |||
692 | In February 2000 the maintenance of this driver was assumed by Andrew | ||
693 | Morton <akpm@zip.com.au> | ||
694 | |||
695 | 6.5 Kernel module parameters | ||
696 | |||
697 | For use in embedded environments with no cs89x0 EEPROM, the kernel boot | ||
698 | parameter `cs89x0_media=' has been implemented. Usage is: | ||
699 | |||
700 | cs89x0_media=rj45 or | ||
701 | cs89x0_media=aui or | ||
702 | cs89x0_media=bnc | ||
703 | |||
diff --git a/Documentation/networking/de4x5.txt b/Documentation/networking/de4x5.txt new file mode 100644 index 000000000000..c8e4ca9b2c3e --- /dev/null +++ b/Documentation/networking/de4x5.txt | |||
@@ -0,0 +1,178 @@ | |||
1 | Originally, this driver was written for the Digital Equipment | ||
2 | Corporation series of EtherWORKS Ethernet cards: | ||
3 | |||
4 | DE425 TP/COAX EISA | ||
5 | DE434 TP PCI | ||
6 | DE435 TP/COAX/AUI PCI | ||
7 | DE450 TP/COAX/AUI PCI | ||
8 | DE500 10/100 PCI Fasternet | ||
9 | |||
10 | but it will now attempt to support all cards which conform to the | ||
11 | Digital Semiconductor SROM Specification. The driver currently | ||
12 | recognises the following chips: | ||
13 | |||
14 | DC21040 (no SROM) | ||
15 | DC21041[A] | ||
16 | DC21140[A] | ||
17 | DC21142 | ||
18 | DC21143 | ||
19 | |||
20 | So far the driver is known to work with the following cards: | ||
21 | |||
22 | KINGSTON | ||
23 | Linksys | ||
24 | ZNYX342 | ||
25 | SMC8432 | ||
26 | SMC9332 (w/new SROM) | ||
27 | ZNYX31[45] | ||
28 | ZNYX346 10/100 4 port (can act as a 10/100 bridge!) | ||
29 | |||
30 | The driver has been tested on a relatively busy network using the DE425, | ||
31 | DE434, DE435 and DE500 cards and benchmarked with 'ttcp': it transferred | ||
32 | 16M of data to a DECstation 5000/200 as follows: | ||
33 | |||
34 | TCP UDP | ||
35 | TX RX TX RX | ||
36 | DE425 1030k 997k 1170k 1128k | ||
37 | DE434 1063k 995k 1170k 1125k | ||
38 | DE435 1063k 995k 1170k 1125k | ||
39 | DE500 1063k 998k 1170k 1125k in 10Mb/s mode | ||
40 | |||
41 | All values are typical (in kBytes/sec) from a sample of 4 for each | ||
42 | measurement. Their error is +/-20k on a quiet (private) network and also | ||
43 | depend on what load the CPU has. | ||
44 | |||
45 | ========================================================================= | ||
46 | |||
47 | The ability to load this driver as a loadable module has been included | ||
48 | and used extensively during the driver development (to save those long | ||
49 | reboot sequences). Loadable module support under PCI and EISA has been | ||
50 | achieved by letting the driver autoprobe as if it were compiled into the | ||
51 | kernel. Do make sure you're not sharing interrupts with anything that | ||
52 | cannot accommodate interrupt sharing! | ||
53 | |||
54 | To utilise this ability, you have to do 8 things: | ||
55 | |||
56 | 0) have a copy of the loadable modules code installed on your system. | ||
57 | 1) copy de4x5.c from the /linux/drivers/net directory to your favourite | ||
58 | temporary directory. | ||
59 | 2) for fixed autoprobes (not recommended), edit the source code near | ||
60 | line 5594 to reflect the I/O address you're using, or assign these when | ||
61 | loading by: | ||
62 | |||
63 | insmod de4x5 io=0xghh where g = bus number | ||
64 | hh = device number | ||
65 | |||
66 | NB: autoprobing for modules is now supported by default. You may just | ||
67 | use: | ||
68 | |||
69 | insmod de4x5 | ||
70 | |||
71 | to load all available boards. For a specific board, still use | ||
72 | the 'io=?' above. | ||
73 | 3) compile de4x5.c, but include -DMODULE in the command line to ensure | ||
74 | that the correct bits are compiled (see end of source code). | ||
75 | 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a | ||
76 | kernel with the de4x5 configuration turned off and reboot. | ||
77 | 5) insmod de4x5 [io=0xghh] | ||
78 | 6) run the net startup bits for your new eth?? interface(s) manually | ||
79 | (usually /etc/rc.inet[12] at boot time). | ||
80 | 7) enjoy! | ||
81 | |||
82 | To unload a module, turn off the associated interface(s) | ||
83 | 'ifconfig eth?? down' then 'rmmod de4x5'. | ||
84 | |||
85 | Automedia detection is included so that in principle you can disconnect | ||
86 | from, e.g. TP, reconnect to BNC and things will still work (after a | ||
87 | pause whilst the driver figures out where its media went). My tests | ||
88 | using ping showed that it appears to work.... | ||
89 | |||
90 | By default, the driver will now autodetect any DECchip based card. | ||
91 | Should you have a need to restrict the driver to DIGITAL only cards, you | ||
92 | can compile with a DEC_ONLY define, or if loading as a module, use the | ||
93 | 'dec_only=1' parameter. | ||
94 | |||
95 | I've changed the timing routines to use the kernel timer and scheduling | ||
96 | functions so that the hangs and other assorted problems that occurred | ||
97 | while autosensing the media should be gone. A bonus for the DC21040 | ||
98 | auto media sense algorithm is that it can now use one that is more in | ||
99 | line with the rest (the DC21040 chip doesn't have a hardware timer). | ||
100 | The downside is the 1 'jiffies' (10ms) resolution. | ||
101 | |||
102 | IEEE 802.3u MII interface code has been added in anticipation that some | ||
103 | products may use it in the future. | ||
104 | |||
105 | The SMC9332 card has a non-compliant SROM which needs fixing - I have | ||
106 | patched this driver to detect it because the SROM format used complies | ||
107 | to a previous DEC-STD format. | ||
108 | |||
109 | I have removed the buffer copies needed for receive on Intels. I cannot | ||
110 | remove them for Alphas since the Tulip hardware only does longword | ||
111 | aligned DMA transfers and the Alphas get alignment traps with non | ||
112 | longword aligned data copies (which makes them really slow). No comment. | ||
113 | |||
114 | I have added SROM decoding routines to make this driver work with any | ||
115 | card that supports the Digital Semiconductor SROM spec. This will help | ||
116 | all cards running the dc2114x series chips in particular. Cards using | ||
117 | the dc2104x chips should run correctly with the basic driver. I'm in | ||
118 | debt to <mjacob@feral.com> for the testing and feedback that helped get | ||
119 | this feature working. So far we have tested KINGSTON, SMC8432, SMC9332 | ||
120 | (with the latest SROM complying with the SROM spec V3: their first was | ||
121 | broken), ZNYX342 and LinkSys. ZNYX314 (dual 21041 MAC) and ZNYX 315 | ||
122 | (quad 21041 MAC) cards also appear to work despite their incorrectly | ||
123 | wired IRQs. | ||
124 | |||
125 | I have added a temporary fix for interrupt problems when some SCSI cards | ||
126 | share the same interrupt as the DECchip based cards. The problem occurs | ||
127 | because the SCSI card wants to grab the interrupt as a fast interrupt | ||
128 | (runs the service routine with interrupts turned off) vs. this card | ||
129 | which really needs to run the service routine with interrupts turned on. | ||
130 | This driver will now add the interrupt service routine as a fast | ||
131 | interrupt if it is bounced from the slow interrupt. THIS IS NOT A | ||
132 | RECOMMENDED WAY TO RUN THE DRIVER and has been done for a limited time | ||
133 | until people sort out their compatibility issues and the kernel | ||
134 | interrupt service code is fixed. YOU SHOULD SEPARATE OUT THE FAST | ||
135 | INTERRUPT CARDS FROM THE SLOW INTERRUPT CARDS to ensure that they do not | ||
136 | run on the same interrupt. PCMCIA/CardBus is another can of worms... | ||
137 | |||
138 | Finally, I think I have really fixed the module loading problem with | ||
139 | more than one DECchip based card. As a side effect, I don't mess with | ||
140 | the device structure any more which means that if more than 1 card in | ||
141 | 2.0.x is installed (4 in 2.1.x), the user will have to edit | ||
142 | linux/drivers/net/Space.c to make room for them. Hence, module loading | ||
143 | is the preferred way to use this driver, since it doesn't have this | ||
144 | limitation. | ||
145 | |||
146 | Where SROM media detection is used and full duplex is specified in the | ||
147 | SROM, the feature is ignored unless lp->params.fdx is set at compile | ||
148 | time OR during a module load (insmod de4x5 args='eth??:fdx' [see | ||
149 | below]). This is because there is no way to automatically detect full | ||
150 | duplex links except through autonegotiation. When I include the | ||
151 | autonegotiation feature in the SROM autoconf code, this detection will | ||
152 | occur automatically for that case. | ||
153 | |||
154 | Command line arguments are now allowed, similar to passing arguments | ||
155 | through LILO. This will allow a per adapter board set up of full duplex | ||
156 | and media. The only lexical constraints are: the board name (dev->name) | ||
157 | appears in the list before its parameters. The list of parameters ends | ||
158 | either at the end of the parameter list or with another board name. The | ||
159 | following parameters are allowed: | ||
160 | |||
161 | fdx for full duplex | ||
162 | autosense to set the media/speed; with the following | ||
163 | sub-parameters: | ||
164 | TP, TP_NW, BNC, AUI, BNC_AUI, 100Mb, 10Mb, AUTO | ||
165 | |||
166 | Case sensitivity is important for the sub-parameters. They *must* be | ||
167 | upper case. Examples: | ||
168 | |||
169 | insmod de4x5 args='eth1:fdx autosense=BNC eth0:autosense=100Mb'. | ||
170 | |||
171 | For a compiled in driver, in linux/drivers/net/CONFIG, place e.g. | ||
172 | DE4X5_OPTS = -DDE4X5_PARM='"eth0:fdx autosense=AUI eth2:autosense=TP"' | ||
173 | |||
174 | Yes, I know full duplex isn't permissible on BNC or AUI; they're just | ||
175 | examples. By default, full duplex is turned off and AUTO is the default | ||
176 | autosense setting. In reality, I expect only the full duplex option to | ||
177 | be used. Note the use of single quotes in the two examples above and the | ||
178 | lack of commas to separate items. | ||
diff --git a/Documentation/networking/decnet.txt b/Documentation/networking/decnet.txt new file mode 100644 index 000000000000..c6bd25f5d61d --- /dev/null +++ b/Documentation/networking/decnet.txt | |||
@@ -0,0 +1,234 @@ | |||
1 | Linux DECnet Networking Layer Information | ||
2 | =========================================== | ||
3 | |||
4 | 1) Other documentation.... | ||
5 | |||
6 | o Project Home Pages | ||
7 | http://www.chygwyn.com/DECnet/ - Kernel info | ||
8 | http://linux-decnet.sourceforge.net/ - Userland tools | ||
9 | http://www.sourceforge.net/projects/linux-decnet/ - Status page | ||
10 | |||
11 | 2) Configuring the kernel | ||
12 | |||
13 | Be sure to turn on the following options: | ||
14 | |||
15 | CONFIG_DECNET (obviously) | ||
16 | CONFIG_PROC_FS (to see what's going on) | ||
17 | CONFIG_SYSCTL (for easy configuration) | ||
18 | |||
19 | if you want to try out router support (not properly debugged yet) | ||
20 | you'll need the following options as well... | ||
21 | |||
22 | CONFIG_DECNET_ROUTER (to be able to add/delete routes) | ||
23 | CONFIG_NETFILTER (will be required for the DECnet routing daemon) | ||
24 | |||
25 | CONFIG_DECNET_ROUTE_FWMARK is optional | ||
26 | |||
27 | Don't turn on SIOCGIFCONF support for DECnet unless you are really sure | ||
28 | that you need it, in general you won't and it can cause ifconfig to | ||
29 | malfunction. | ||
30 | |||
31 | Run time configuration has changed slightly from the 2.4 system. If you | ||
32 | want to configure an endnode, then the simplified procedure is as follows: | ||
33 | |||
34 | o Set the MAC address on your ethernet card before starting _any_ other | ||
35 | network protocols. | ||
36 | |||
37 | As soon as your network card is brought into the UP state, DECnet should | ||
38 | start working. If you need something more complicated or are unsure how | ||
39 | to set the MAC address, see the next section. Also all configurations which | ||
40 | worked with 2.4 will work under 2.5 with no change. | ||
41 | |||
42 | 3) Command line options | ||
43 | |||
44 | You can set a DECnet address on the kernel command line for compatibility | ||
45 | with the 2.4 configuration procedure, but in general it's not needed any more. | ||
46 | If you do st a DECnet address on the command line, it has only one purpose | ||
47 | which is that its added to the addresses on the loopback device. | ||
48 | |||
49 | With 2.4 kernels, DECnet would only recognise addresses as local if they | ||
50 | were added to the loopback device. In 2.5, any local interface address | ||
51 | can be used to loop back to the local machine. Of course this does not | ||
52 | prevent you adding further addresses to the loopback device if you | ||
53 | want to. | ||
54 | |||
55 | N.B. Since the address list of an interface determines the addresses for | ||
56 | which "hello" messages are sent, if you don't set an address on the loopback | ||
57 | interface then you won't see any entries in /proc/net/neigh for the local | ||
58 | host until such time as you start a connection. This doesn't affect the | ||
59 | operation of the local communications in any other way though. | ||
60 | |||
61 | The kernel command line takes options looking like the following: | ||
62 | |||
63 | decnet=1,2 | ||
64 | |||
65 | the two numbers are the node address 1,2 = 1.2 For 2.2.xx kernels | ||
66 | and early 2.3.xx kernels, you must use a comma when specifying the | ||
67 | DECnet address like this. For more recent 2.3.xx kernels, you may | ||
68 | use almost any character except space, although a `.` would be the most | ||
69 | obvious choice :-) | ||
70 | |||
71 | There used to be a third number specifying the node type. This option | ||
72 | has gone away in favour of a per interface node type. This is now set | ||
73 | using /proc/sys/net/decnet/conf/<dev>/forwarding. This file can be | ||
74 | set with a single digit, 0=EndNode, 1=L1 Router and 2=L2 Router. | ||
75 | |||
76 | There are also equivalent options for modules. The node address can | ||
77 | also be set through the /proc/sys/net/decnet/ files, as can other system | ||
78 | parameters. | ||
79 | |||
80 | Currently the only supported devices are ethernet and ip_gre. The | ||
81 | ethernet address of your ethernet card has to be set according to the DECnet | ||
82 | address of the node in order for it to be autoconfigured (and then appear in | ||
83 | /proc/net/decnet_dev). There is a utility available at the above | ||
84 | FTP sites called dn2ethaddr which can compute the correct ethernet | ||
85 | address to use. The address can be set by ifconfig either before at | ||
86 | at the time the device is brought up. If you are using RedHat you can | ||
87 | add the line: | ||
88 | |||
89 | MACADDR=AA:00:04:00:03:04 | ||
90 | |||
91 | or something similar, to /etc/sysconfig/network-scripts/ifcfg-eth0 or | ||
92 | wherever your network card's configuration lives. Setting the MAC address | ||
93 | of your ethernet card to an address starting with "hi-ord" will cause a | ||
94 | DECnet address which matches to be added to the interface (which you can | ||
95 | verify with iproute2). | ||
96 | |||
97 | The default device for routing can be set through the /proc filesystem | ||
98 | by setting /proc/sys/net/decnet/default_device to the | ||
99 | device you want DECnet to route packets out of when no specific route | ||
100 | is available. Usually this will be eth0, for example: | ||
101 | |||
102 | echo -n "eth0" >/proc/sys/net/decnet/default_device | ||
103 | |||
104 | If you don't set the default device, then it will default to the first | ||
105 | ethernet card which has been autoconfigured as described above. You can | ||
106 | confirm that by looking in the default_device file of course. | ||
107 | |||
108 | There is a list of what the other files under /proc/sys/net/decnet/ do | ||
109 | on the kernel patch web site (shown above). | ||
110 | |||
111 | 4) Run time kernel configuration | ||
112 | |||
113 | This is either done through the sysctl/proc interface (see the kernel web | ||
114 | pages for details on what the various options do) or through the iproute2 | ||
115 | package in the same way as IPv4/6 configuration is performed. | ||
116 | |||
117 | Documentation for iproute2 is included with the package, although there is | ||
118 | as yet no specific section on DECnet, most of the features apply to both | ||
119 | IP and DECnet, albeit with DECnet addresses instead of IP addresses and | ||
120 | a reduced functionality. | ||
121 | |||
122 | If you want to configure a DECnet router you'll need the iproute2 package | ||
123 | since its the _only_ way to add and delete routes currently. Eventually | ||
124 | there will be a routing daemon to send and receive routing messages for | ||
125 | each interface and update the kernel routing tables accordingly. The | ||
126 | routing daemon will use netfilter to listen to routing packets, and | ||
127 | rtnetlink to update the kernels routing tables. | ||
128 | |||
129 | The DECnet raw socket layer has been removed since it was there purely | ||
130 | for use by the routing daemon which will now use netfilter (a much cleaner | ||
131 | and more generic solution) instead. | ||
132 | |||
133 | 5) How can I tell if its working ? | ||
134 | |||
135 | Here is a quick guide of what to look for in order to know if your DECnet | ||
136 | kernel subsystem is working. | ||
137 | |||
138 | - Is the node address set (see /proc/sys/net/decnet/node_address) | ||
139 | - Is the node of the correct type | ||
140 | (see /proc/sys/net/decnet/conf/<dev>/forwarding) | ||
141 | - Is the Ethernet MAC address of each Ethernet card set to match | ||
142 | the DECnet address. If in doubt use the dn2ethaddr utility available | ||
143 | at the ftp archive. | ||
144 | - If the previous two steps are satisfied, and the Ethernet card is up, | ||
145 | you should find that it is listed in /proc/net/decnet_dev and also | ||
146 | that it appears as a directory in /proc/sys/net/decnet/conf/. The | ||
147 | loopback device (lo) should also appear and is required to communicate | ||
148 | within a node. | ||
149 | - If you have any DECnet routers on your network, they should appear | ||
150 | in /proc/net/decnet_neigh, otherwise this file will only contain the | ||
151 | entry for the node itself (if it doesn't check to see if lo is up). | ||
152 | - If you want to send to any node which is not listed in the | ||
153 | /proc/net/decnet_neigh file, you'll need to set the default device | ||
154 | to point to an Ethernet card with connection to a router. This is | ||
155 | again done with the /proc/sys/net/decnet/default_device file. | ||
156 | - Try starting a simple server and client, like the dnping/dnmirror | ||
157 | over the loopback interface. With luck they should communicate. | ||
158 | For this step and those after, you'll need the DECnet library | ||
159 | which can be obtained from the above ftp sites as well as the | ||
160 | actual utilities themselves. | ||
161 | - If this seems to work, then try talking to a node on your local | ||
162 | network, and see if you can obtain the same results. | ||
163 | - At this point you are on your own... :-) | ||
164 | |||
165 | 6) How to send a bug report | ||
166 | |||
167 | If you've found a bug and want to report it, then there are several things | ||
168 | you can do to help me work out exactly what it is that is wrong. Useful | ||
169 | information (_most_ of which _is_ _essential_) includes: | ||
170 | |||
171 | - What kernel version are you running ? | ||
172 | - What version of the patch are you running ? | ||
173 | - How far though the above set of tests can you get ? | ||
174 | - What is in the /proc/decnet* files and /proc/sys/net/decnet/* files ? | ||
175 | - Which services are you running ? | ||
176 | - Which client caused the problem ? | ||
177 | - How much data was being transferred ? | ||
178 | - Was the network congested ? | ||
179 | - If there was a kernel panic, please run the output through ksymoops | ||
180 | before sending it to me, otherwise its _useless_. | ||
181 | - How can the problem be reproduced ? | ||
182 | - Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of | ||
183 | tcpdump don't understand how to dump DECnet properly, so including | ||
184 | the hex listing of the packet contents is _essential_, usually the -x flag. | ||
185 | You may also need to increase the length grabbed with the -s flag. The | ||
186 | -e flag also provides very useful information (ethernet MAC addresses)) | ||
187 | |||
188 | 7) MAC FAQ | ||
189 | |||
190 | A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet | ||
191 | interact and how to get the best performance from your hardware. | ||
192 | |||
193 | Ethernet cards are designed to normally only pass received network frames | ||
194 | to a host computer when they are addressed to it, or to the broadcast address. | ||
195 | |||
196 | Linux has an interface which allows the setting of extra addresses for | ||
197 | an ethernet card to listen to. If the ethernet card supports it, the | ||
198 | filtering operation will be done in hardware, if not the extra unwanted packets | ||
199 | received will be discarded by the host computer. In the latter case, | ||
200 | significant processor time and bus bandwidth can be used up on a busy | ||
201 | network (see the NAPI documentation for a longer explanation of these | ||
202 | effects). | ||
203 | |||
204 | DECnet makes use of this interface to allow running DECnet on an ethernet | ||
205 | card which has already been configured using TCP/IP (presumably using the | ||
206 | built in MAC address of the card, as usual) and/or to allow multiple DECnet | ||
207 | addresses on each physical interface. If you do this, be aware that if your | ||
208 | ethernet card doesn't support perfect hashing in its MAC address filter | ||
209 | then your computer will be doing more work than required. Some cards | ||
210 | will simply set themselves into promiscuous mode in order to receive | ||
211 | packets from the DECnet specified addresses. So if you have one of these | ||
212 | cards its better to set the MAC address of the card as described above | ||
213 | to gain the best efficiency. Better still is to use a card which supports | ||
214 | NAPI as well. | ||
215 | |||
216 | |||
217 | 8) Mailing list | ||
218 | |||
219 | If you are keen to get involved in development, or want to ask questions | ||
220 | about configuration, or even just report bugs, then there is a mailing | ||
221 | list that you can join, details are at: | ||
222 | |||
223 | http://sourceforge.net/mail/?group_id=4993 | ||
224 | |||
225 | 9) Legal Info | ||
226 | |||
227 | The Linux DECnet project team have placed their code under the GPL. The | ||
228 | software is provided "as is" and without warranty express or implied. | ||
229 | DECnet is a trademark of Compaq. This software is not a product of | ||
230 | Compaq. We acknowledge the help of people at Compaq in providing extra | ||
231 | documentation above and beyond what was previously publicly available. | ||
232 | |||
233 | Steve Whitehouse <SteveW@ACM.org> | ||
234 | |||
diff --git a/Documentation/networking/depca.txt b/Documentation/networking/depca.txt new file mode 100644 index 000000000000..24c6b26e5658 --- /dev/null +++ b/Documentation/networking/depca.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | |||
2 | DE10x | ||
3 | ===== | ||
4 | |||
5 | Memory Addresses: | ||
6 | |||
7 | SW1 SW2 SW3 SW4 | ||
8 | 64K on on on on d0000 dbfff | ||
9 | off on on on c0000 cbfff | ||
10 | off off on on e0000 ebfff | ||
11 | |||
12 | 32K on on off on d8000 dbfff | ||
13 | off on off on c8000 cbfff | ||
14 | off off off on e8000 ebfff | ||
15 | |||
16 | DBR ROM on on dc000 dffff | ||
17 | off on cc000 cffff | ||
18 | off off ec000 effff | ||
19 | |||
20 | Note that the 2K mode is set by SW3/SW4 on/off or off/off. Address | ||
21 | assignment is through the RBSA register. | ||
22 | |||
23 | I/O Address: | ||
24 | SW5 | ||
25 | 0x300 on | ||
26 | 0x200 off | ||
27 | |||
28 | Remote Boot: | ||
29 | SW6 | ||
30 | Disable on | ||
31 | Enable off | ||
32 | |||
33 | Remote Boot Timeout: | ||
34 | SW7 | ||
35 | 2.5min on | ||
36 | 30s off | ||
37 | |||
38 | IRQ: | ||
39 | SW8 SW9 SW10 SW11 SW12 | ||
40 | 2 on off off off off | ||
41 | 3 off on off off off | ||
42 | 4 off off on off off | ||
43 | 5 off off off on off | ||
44 | 7 off off off off on | ||
45 | |||
46 | DE20x | ||
47 | ===== | ||
48 | |||
49 | Memory Size: | ||
50 | |||
51 | SW3 SW4 | ||
52 | 64K on on | ||
53 | 32K off on | ||
54 | 2K on off | ||
55 | 2K off off | ||
56 | |||
57 | Start Addresses: | ||
58 | |||
59 | SW1 SW2 SW3 SW4 | ||
60 | 64K on on on on c0000 cffff | ||
61 | on off on on d0000 dffff | ||
62 | off on on on e0000 effff | ||
63 | |||
64 | 32K on on off off c8000 cffff | ||
65 | on off off off d8000 dffff | ||
66 | off on off off e8000 effff | ||
67 | |||
68 | Illegal off off - - - - | ||
69 | |||
70 | I/O Address: | ||
71 | SW5 | ||
72 | 0x300 on | ||
73 | 0x200 off | ||
74 | |||
75 | Remote Boot: | ||
76 | SW6 | ||
77 | Disable on | ||
78 | Enable off | ||
79 | |||
80 | Remote Boot Timeout: | ||
81 | SW7 | ||
82 | 2.5min on | ||
83 | 30s off | ||
84 | |||
85 | IRQ: | ||
86 | SW8 SW9 SW10 SW11 SW12 | ||
87 | 5 on off off off off | ||
88 | 9 off on off off off | ||
89 | 10 off off on off off | ||
90 | 11 off off off on off | ||
91 | 15 off off off off on | ||
92 | |||
diff --git a/Documentation/networking/dgrs.txt b/Documentation/networking/dgrs.txt new file mode 100644 index 000000000000..1aa1bb3f94ab --- /dev/null +++ b/Documentation/networking/dgrs.txt | |||
@@ -0,0 +1,52 @@ | |||
1 | The Digi International RightSwitch SE-X (dgrs) Device Driver | ||
2 | |||
3 | This is a Linux driver for the Digi International RightSwitch SE-X | ||
4 | EISA and PCI boards. These are 4 (EISA) or 6 (PCI) port Ethernet | ||
5 | switches and a NIC combined into a single board. This driver can | ||
6 | be compiled into the kernel statically or as a loadable module. | ||
7 | |||
8 | There is also a companion management tool, called "xrightswitch". | ||
9 | The management tool lets you watch the performance graphically, | ||
10 | as well as set the SNMP agent IP and IPX addresses, IEEE Spanning | ||
11 | Tree, and Aging time. These can also be set from the command line | ||
12 | when the driver is loaded. The driver command line options are: | ||
13 | |||
14 | debug=NNN Debug printing level | ||
15 | dma=0/1 Disable/Enable DMA on PCI card | ||
16 | spantree=0/1 Disable/Enable IEEE spanning tree | ||
17 | hashexpire=NNN Change address aging time (default 300 seconds) | ||
18 | ipaddr=A,B,C,D Set SNMP agent IP address i.e. 199,86,8,221 | ||
19 | iptrap=A,B,C,D Set SNMP agent IP trap address i.e. 199,86,8,221 | ||
20 | ipxnet=NNN Set SNMP agent IPX network number | ||
21 | nicmode=0/1 Disable/Enable multiple NIC mode | ||
22 | |||
23 | There is also a tool for setting up input and output packet filters | ||
24 | on each port, called "dgrsfilt". | ||
25 | |||
26 | Both the management tool and the filtering tool are available | ||
27 | separately from the following FTP site: | ||
28 | |||
29 | ftp://ftp.dgii.com/drivers/rightswitch/linux/ | ||
30 | |||
31 | When nicmode=1, the board and driver operate as 4 or 6 individual | ||
32 | NIC ports (eth0...eth5) instead of as a switch. All switching | ||
33 | functions are disabled. In the future, the board firmware may include | ||
34 | a routing cache when in this mode. | ||
35 | |||
36 | Copyright 1995-1996 Digi International Inc. | ||
37 | |||
38 | This software may be used and distributed according to the terms | ||
39 | of the GNU General Public License, incorporated herein by reference. | ||
40 | |||
41 | For information on purchasing a RightSwitch SE-4 or SE-6 | ||
42 | board, please contact Digi's sales department at 1-612-912-3444 | ||
43 | or 1-800-DIGIBRD. Outside the U.S., please check our Web page at: | ||
44 | |||
45 | http://www.dgii.com | ||
46 | |||
47 | for sales offices worldwide. Tech support is also available through | ||
48 | the channels listed on the Web site, although as long as I am | ||
49 | employed on networking products at Digi I will be happy to provide | ||
50 | any bug fixes that may be needed. | ||
51 | |||
52 | -Rick Richardson, rick@dgii.com | ||
diff --git a/Documentation/networking/dl2k.txt b/Documentation/networking/dl2k.txt new file mode 100644 index 000000000000..d460492037ef --- /dev/null +++ b/Documentation/networking/dl2k.txt | |||
@@ -0,0 +1,281 @@ | |||
1 | |||
2 | D-Link DL2000-based Gigabit Ethernet Adapter Installation | ||
3 | for Linux | ||
4 | May 23, 2002 | ||
5 | |||
6 | Contents | ||
7 | ======== | ||
8 | - Compatibility List | ||
9 | - Quick Install | ||
10 | - Compiling the Driver | ||
11 | - Installing the Driver | ||
12 | - Option parameter | ||
13 | - Configuration Script Sample | ||
14 | - Troubleshooting | ||
15 | |||
16 | |||
17 | Compatibility List | ||
18 | ================= | ||
19 | Adapter Support: | ||
20 | |||
21 | D-Link DGE-550T Gigabit Ethernet Adapter. | ||
22 | D-Link DGE-550SX Gigabit Ethernet Adapter. | ||
23 | D-Link DL2000-based Gigabit Ethernet Adapter. | ||
24 | |||
25 | |||
26 | The driver support Linux kernel 2.4.7 later. We had tested it | ||
27 | on the environments below. | ||
28 | |||
29 | . Red Hat v6.2 (update kernel to 2.4.7) | ||
30 | . Red Hat v7.0 (update kernel to 2.4.7) | ||
31 | . Red Hat v7.1 (kernel 2.4.7) | ||
32 | . Red Hat v7.2 (kernel 2.4.7-10) | ||
33 | |||
34 | |||
35 | Quick Install | ||
36 | ============= | ||
37 | Install linux driver as following command: | ||
38 | |||
39 | 1. make all | ||
40 | 2. insmod dl2k.ko | ||
41 | 3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0 | ||
42 | ^^^^^^^^^^^^^^^\ ^^^^^^^^\ | ||
43 | IP NETMASK | ||
44 | Now eth0 should active, you can test it by "ping" or get more information by | ||
45 | "ifconfig". If tested ok, continue the next step. | ||
46 | |||
47 | 4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net | ||
48 | 5. Add the following line to /etc/modprobe.conf: | ||
49 | alias eth0 dl2k | ||
50 | 6. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0 | ||
51 | located at /etc/sysconfig/network-scripts or create it manually. | ||
52 | [see - Configuration Script Sample] | ||
53 | 7. Driver will automatically load and configure at next boot time. | ||
54 | |||
55 | Compiling the Driver | ||
56 | ==================== | ||
57 | In Linux, NIC drivers are most commonly configured as loadable modules. | ||
58 | The approach of building a monolithic kernel has become obsolete. The driver | ||
59 | can be compiled as part of a monolithic kernel, but is strongly discouraged. | ||
60 | The remainder of this section assumes the driver is built as a loadable module. | ||
61 | In the Linux environment, it is a good idea to rebuild the driver from the | ||
62 | source instead of relying on a precompiled version. This approach provides | ||
63 | better reliability since a precompiled driver might depend on libraries or | ||
64 | kernel features that are not present in a given Linux installation. | ||
65 | |||
66 | The 3 files necessary to build Linux device driver are dl2k.c, dl2k.h and | ||
67 | Makefile. To compile, the Linux installation must include the gcc compiler, | ||
68 | the kernel source, and the kernel headers. The Linux driver supports Linux | ||
69 | Kernels 2.4.7. Copy the files to a directory and enter the following command | ||
70 | to compile and link the driver: | ||
71 | |||
72 | CD-ROM drive | ||
73 | ------------ | ||
74 | |||
75 | [root@XXX /] mkdir cdrom | ||
76 | [root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom | ||
77 | [root@XXX /] cd root | ||
78 | [root@XXX /root] mkdir dl2k | ||
79 | [root@XXX /root] cd dl2k | ||
80 | [root@XXX dl2k] cp /cdrom/linux/dl2k.tgz /root/dl2k | ||
81 | [root@XXX dl2k] tar xfvz dl2k.tgz | ||
82 | [root@XXX dl2k] make all | ||
83 | |||
84 | Floppy disc drive | ||
85 | ----------------- | ||
86 | |||
87 | [root@XXX /] cd root | ||
88 | [root@XXX /root] mkdir dl2k | ||
89 | [root@XXX /root] cd dl2k | ||
90 | [root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k | ||
91 | [root@XXX dl2k] tar xfvz dl2k.tgz | ||
92 | [root@XXX dl2k] make all | ||
93 | |||
94 | Installing the Driver | ||
95 | ===================== | ||
96 | |||
97 | Manual Installation | ||
98 | ------------------- | ||
99 | Once the driver has been compiled, it must be loaded, enabled, and bound | ||
100 | to a protocol stack in order to establish network connectivity. To load a | ||
101 | module enter the command: | ||
102 | |||
103 | insmod dl2k.o | ||
104 | |||
105 | or | ||
106 | |||
107 | insmod dl2k.o <optional parameter> ; add parameter | ||
108 | |||
109 | =============================================================== | ||
110 | example: insmod dl2k.o media=100mbps_hd | ||
111 | or insmod dl2k.o media=3 | ||
112 | or insmod dl2k.o media=3,2 ; for 2 cards | ||
113 | =============================================================== | ||
114 | |||
115 | Please reference the list of the command line parameters supported by | ||
116 | the Linux device driver below. | ||
117 | |||
118 | The insmod command only loads the driver and gives it a name of the form | ||
119 | eth0, eth1, etc. To bring the NIC into an operational state, | ||
120 | it is necessary to issue the following command: | ||
121 | |||
122 | ifconfig eth0 up | ||
123 | |||
124 | Finally, to bind the driver to the active protocol (e.g., TCP/IP with | ||
125 | Linux), enter the following command: | ||
126 | |||
127 | ifup eth0 | ||
128 | |||
129 | Note that this is meaningful only if the system can find a configuration | ||
130 | script that contains the necessary network information. A sample will be | ||
131 | given in the next paragraph. | ||
132 | |||
133 | The commands to unload a driver are as follows: | ||
134 | |||
135 | ifdown eth0 | ||
136 | ifconfig eth0 down | ||
137 | rmmod dl2k.o | ||
138 | |||
139 | The following are the commands to list the currently loaded modules and | ||
140 | to see the current network configuration. | ||
141 | |||
142 | lsmod | ||
143 | ifconfig | ||
144 | |||
145 | |||
146 | Automated Installation | ||
147 | ---------------------- | ||
148 | This section describes how to install the driver such that it is | ||
149 | automatically loaded and configured at boot time. The following description | ||
150 | is based on a Red Hat 6.0/7.0 distribution, but it can easily be ported to | ||
151 | other distributions as well. | ||
152 | |||
153 | Red Hat v6.x/v7.x | ||
154 | ----------------- | ||
155 | 1. Copy dl2k.o to the network modules directory, typically | ||
156 | /lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net. | ||
157 | 2. Locate the boot module configuration file, most commonly modprobe.conf | ||
158 | or modules.conf (for 2.4) in the /etc directory. Add the following lines: | ||
159 | |||
160 | alias ethx dl2k | ||
161 | options dl2k <optional parameters> | ||
162 | |||
163 | where ethx will be eth0 if the NIC is the only ethernet adapter, eth1 if | ||
164 | one other ethernet adapter is installed, etc. Refer to the table in the | ||
165 | previous section for the list of optional parameters. | ||
166 | 3. Locate the network configuration scripts, normally the | ||
167 | /etc/sysconfig/network-scripts directory, and create a configuration | ||
168 | script named ifcfg-ethx that contains network information. | ||
169 | 4. Note that for most Linux distributions, Red Hat included, a configuration | ||
170 | utility with a graphical user interface is provided to perform steps 2 | ||
171 | and 3 above. | ||
172 | |||
173 | |||
174 | Parameter Description | ||
175 | ===================== | ||
176 | You can install this driver without any addtional parameter. However, if you | ||
177 | are going to have extensive functions then it is necessary to set extra | ||
178 | parameter. Below is a list of the command line parameters supported by the | ||
179 | Linux device | ||
180 | driver. | ||
181 | |||
182 | mtu=packet_size - Specifies the maximum packet size. default | ||
183 | is 1500. | ||
184 | |||
185 | media=media_type - Specifies the media type the NIC operates at. | ||
186 | autosense Autosensing active media. | ||
187 | 10mbps_hd 10Mbps half duplex. | ||
188 | 10mbps_fd 10Mbps full duplex. | ||
189 | 100mbps_hd 100Mbps half duplex. | ||
190 | 100mbps_fd 100Mbps full duplex. | ||
191 | 1000mbps_fd 1000Mbps full duplex. | ||
192 | 1000mbps_hd 1000Mbps half duplex. | ||
193 | 0 Autosensing active media. | ||
194 | 1 10Mbps half duplex. | ||
195 | 2 10Mbps full duplex. | ||
196 | 3 100Mbps half duplex. | ||
197 | 4 100Mbps full duplex. | ||
198 | 5 1000Mbps half duplex. | ||
199 | 6 1000Mbps full duplex. | ||
200 | |||
201 | By default, the NIC operates at autosense. | ||
202 | 1000mbps_fd and 1000mbps_hd types are only | ||
203 | available for fiber adapter. | ||
204 | |||
205 | vlan=n - Specifies the VLAN ID. If vlan=0, the | ||
206 | Virtual Local Area Network (VLAN) function is | ||
207 | disable. | ||
208 | |||
209 | jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1, | ||
210 | the NIC accept jumbo frames. By default, this | ||
211 | function is disabled. | ||
212 | Jumbo frame usually improve the performance | ||
213 | int gigabit. | ||
214 | This feature need jumbo frame compatible | ||
215 | remote. | ||
216 | |||
217 | rx_coalesce=m - Number of rx frame handled each interrupt. | ||
218 | rx_timeout=n - Rx DMA wait time for an interrupt. | ||
219 | If set rx_coalesce > 0, hardware only assert | ||
220 | an interrupt for m frames. Hardware won't | ||
221 | assert rx interrupt until m frames received or | ||
222 | reach timeout of n * 640 nano seconds. | ||
223 | Set proper rx_coalesce and rx_timeout can | ||
224 | reduce congestion collapse and overload which | ||
225 | has been a bottlenect for high speed network. | ||
226 | |||
227 | For example, rx_coalesce=10 rx_timeout=800. | ||
228 | that is, hardware assert only 1 interrupt | ||
229 | for 10 frames received or timeout of 512 us. | ||
230 | |||
231 | tx_coalesce=n - Number of tx frame handled each interrupt. | ||
232 | Set n > 1 can reduce the interrupts | ||
233 | congestion usually lower performance of | ||
234 | high speed network card. Default is 16. | ||
235 | |||
236 | tx_flow=[1|0] - Specifies the Tx flow control. If tx_flow=0, | ||
237 | the Tx flow control disable else driver | ||
238 | autodetect. | ||
239 | rx_flow=[1|0] - Specifies the Rx flow control. If rx_flow=0, | ||
240 | the Rx flow control enable else driver | ||
241 | autodetect. | ||
242 | |||
243 | |||
244 | Configuration Script Sample | ||
245 | =========================== | ||
246 | Here is a sample of a simple configuration script: | ||
247 | |||
248 | DEVICE=eth0 | ||
249 | USERCTL=no | ||
250 | ONBOOT=yes | ||
251 | POOTPROTO=none | ||
252 | BROADCAST=207.200.5.255 | ||
253 | NETWORK=207.200.5.0 | ||
254 | NETMASK=255.255.255.0 | ||
255 | IPADDR=207.200.5.2 | ||
256 | |||
257 | |||
258 | Troubleshooting | ||
259 | =============== | ||
260 | Q1. Source files contain ^ M behind every line. | ||
261 | Make sure all files are Unix file format (no LF). Try the following | ||
262 | shell command to convert files. | ||
263 | |||
264 | cat dl2k.c | col -b > dl2k.tmp | ||
265 | mv dl2k.tmp dl2k.c | ||
266 | |||
267 | OR | ||
268 | |||
269 | cat dl2k.c | tr -d "\r" > dl2k.tmp | ||
270 | mv dl2k.tmp dl2k.c | ||
271 | |||
272 | Q2: Could not find header files (*.h) ? | ||
273 | To compile the driver, you need kernel header files. After | ||
274 | installing the kernel source, the header files are usually located in | ||
275 | /usr/src/linux/include, which is the default include directory configured | ||
276 | in Makefile. For some distributions, there is a copy of header files in | ||
277 | /usr/src/include/linux and /usr/src/include/asm, that you can change the | ||
278 | INCLUDEDIR in Makefile to /usr/include without installing kernel source. | ||
279 | Note that RH 7.0 didn't provide correct header files in /usr/include, | ||
280 | including those files will make a wrong version driver. | ||
281 | |||
diff --git a/Documentation/networking/dmfe.txt b/Documentation/networking/dmfe.txt new file mode 100644 index 000000000000..c0e8398674ef --- /dev/null +++ b/Documentation/networking/dmfe.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | dmfe.c: Version 1.28 01/18/2000 | ||
2 | |||
3 | A Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver for Linux. | ||
4 | Copyright (C) 1997 Sten Wang | ||
5 | |||
6 | This program is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU General Public License | ||
8 | as published by the Free Software Foundation; either version 2 | ||
9 | of the License, or (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | |||
17 | A. Compiler command: | ||
18 | |||
19 | A-1: For normal single or multiple processor kernel | ||
20 | "gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall | ||
21 | -Wstrict-prototypes -O6 -c dmfe.c" | ||
22 | |||
23 | A-2: For single or multiple processor with kernel module version function | ||
24 | "gcc -DMODULE -DMODVERSIONS -D__KERNEL__ -I/usr/src/linux/net/inet | ||
25 | -Wall -Wstrict-prototypes -O6 -c dmfe.c" | ||
26 | |||
27 | |||
28 | B. The following steps teach you how to activate a DM9102 board: | ||
29 | |||
30 | 1. Used the upper compiler command to compile dmfe.c | ||
31 | |||
32 | 2. Insert dmfe module into kernel | ||
33 | "insmod dmfe" ;;Auto Detection Mode (Suggest) | ||
34 | "insmod dmfe mode=0" ;;Force 10M Half Duplex | ||
35 | "insmod dmfe mode=1" ;;Force 100M Half Duplex | ||
36 | "insmod dmfe mode=4" ;;Force 10M Full Duplex | ||
37 | "insmod dmfe mode=5" ;;Force 100M Full Duplex | ||
38 | |||
39 | 3. Config a dm9102 network interface | ||
40 | "ifconfig eth0 172.22.3.18" | ||
41 | ^^^^^^^^^^^ Your IP address | ||
42 | |||
43 | 4. Activate the IP routing table. For some distributions, it is not | ||
44 | necessary. You can type "route" to check. | ||
45 | |||
46 | "route add default eth0" | ||
47 | |||
48 | |||
49 | 5. Well done. Your DM9102 adapter is now activated. | ||
50 | |||
51 | |||
52 | C. Object files description: | ||
53 | 1. dmfe_rh61.o: For Redhat 6.1 | ||
54 | |||
55 | If you can make sure your kernel version, you can rename | ||
56 | to dmfe.o and directly use it without re-compiling. | ||
57 | |||
58 | |||
59 | Author: Sten Wang, 886-3-5798797-8517, E-mail: sten_wang@davicom.com.tw | ||
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt new file mode 100644 index 000000000000..11fd0ef5ff57 --- /dev/null +++ b/Documentation/networking/driver.txt | |||
@@ -0,0 +1,94 @@ | |||
1 | Documents about softnet driver issues in general can be found | ||
2 | at: | ||
3 | |||
4 | http://www.firstfloor.org/~andi/softnet/ | ||
5 | |||
6 | Transmit path guidelines: | ||
7 | |||
8 | 1) The hard_start_xmit method must never return '1' under any | ||
9 | normal circumstances. It is considered a hard error unless | ||
10 | there is no way your device can tell ahead of time when it's | ||
11 | transmit function will become busy. | ||
12 | |||
13 | Instead it must maintain the queue properly. For example, | ||
14 | for a driver implementing scatter-gather this means: | ||
15 | |||
16 | static int drv_hard_start_xmit(struct sk_buff *skb, | ||
17 | struct net_device *dev) | ||
18 | { | ||
19 | struct drv *dp = dev->priv; | ||
20 | |||
21 | lock_tx(dp); | ||
22 | ... | ||
23 | /* This is a hard error log it. */ | ||
24 | if (TX_BUFFS_AVAIL(dp) <= (skb_shinfo(skb)->nr_frags + 1)) { | ||
25 | netif_stop_queue(dev); | ||
26 | unlock_tx(dp); | ||
27 | printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", | ||
28 | dev->name); | ||
29 | return 1; | ||
30 | } | ||
31 | |||
32 | ... queue packet to card ... | ||
33 | ... update tx consumer index ... | ||
34 | |||
35 | if (TX_BUFFS_AVAIL(dp) <= (MAX_SKB_FRAGS + 1)) | ||
36 | netif_stop_queue(dev); | ||
37 | |||
38 | ... | ||
39 | unlock_tx(dp); | ||
40 | ... | ||
41 | } | ||
42 | |||
43 | And then at the end of your TX reclaimation event handling: | ||
44 | |||
45 | if (netif_queue_stopped(dp->dev) && | ||
46 | TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1)) | ||
47 | netif_wake_queue(dp->dev); | ||
48 | |||
49 | For a non-scatter-gather supporting card, the three tests simply become: | ||
50 | |||
51 | /* This is a hard error log it. */ | ||
52 | if (TX_BUFFS_AVAIL(dp) <= 0) | ||
53 | |||
54 | and: | ||
55 | |||
56 | if (TX_BUFFS_AVAIL(dp) == 0) | ||
57 | |||
58 | and: | ||
59 | |||
60 | if (netif_queue_stopped(dp->dev) && | ||
61 | TX_BUFFS_AVAIL(dp) > 0) | ||
62 | netif_wake_queue(dp->dev); | ||
63 | |||
64 | 2) Do not forget to update netdev->trans_start to jiffies after | ||
65 | each new tx packet is given to the hardware. | ||
66 | |||
67 | 3) Do not forget that once you return 0 from your hard_start_xmit | ||
68 | method, it is your driver's responsibility to free up the SKB | ||
69 | and in some finite amount of time. | ||
70 | |||
71 | For example, this means that it is not allowed for your TX | ||
72 | mitigation scheme to let TX packets "hang out" in the TX | ||
73 | ring unreclaimed forever if no new TX packets are sent. | ||
74 | This error can deadlock sockets waiting for send buffer room | ||
75 | to be freed up. | ||
76 | |||
77 | If you return 1 from the hard_start_xmit method, you must not keep | ||
78 | any reference to that SKB and you must not attempt to free it up. | ||
79 | |||
80 | Probing guidelines: | ||
81 | |||
82 | 1) Any hardware layer address you obtain for your device should | ||
83 | be verified. For example, for ethernet check it with | ||
84 | linux/etherdevice.h:is_valid_ether_addr() | ||
85 | |||
86 | Close/stop guidelines: | ||
87 | |||
88 | 1) After the dev->stop routine has been called, the hardware must | ||
89 | not receive or transmit any data. All in flight packets must | ||
90 | be aborted. If necessary, poll or wait for completion of | ||
91 | any reset commands. | ||
92 | |||
93 | 2) The dev->stop routine will be called by unregister_netdevice | ||
94 | if device is still UP. | ||
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt new file mode 100644 index 000000000000..4ef9f7cd5dc3 --- /dev/null +++ b/Documentation/networking/e100.txt | |||
@@ -0,0 +1,170 @@ | |||
1 | Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters | ||
2 | ============================================================== | ||
3 | |||
4 | November 17, 2004 | ||
5 | |||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - In This Release | ||
11 | - Identifying Your Adapter | ||
12 | - Driver Configuration Parameters | ||
13 | - Additional Configurations | ||
14 | - Support | ||
15 | |||
16 | |||
17 | In This Release | ||
18 | =============== | ||
19 | |||
20 | This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of | ||
21 | Adapters, version 3.3.x. This driver supports 2.4.x and 2.6.x kernels. | ||
22 | |||
23 | Identifying Your Adapter | ||
24 | ======================== | ||
25 | |||
26 | For more information on how to identify your adapter, go to the Adapter & | ||
27 | Driver ID Guide at: | ||
28 | |||
29 | http://support.intel.com/support/network/adapter/pro100/21397.htm | ||
30 | |||
31 | For the latest Intel network drivers for Linux, refer to the following | ||
32 | website. In the search field, enter your adapter name or type, or use the | ||
33 | networking link on the left to search for your adapter: | ||
34 | |||
35 | http://downloadfinder.intel.com/scripts-df/support_intel.asp | ||
36 | |||
37 | Driver Configuration Parameters | ||
38 | =============================== | ||
39 | |||
40 | The default value for each parameter is generally the recommended setting, | ||
41 | unless otherwise noted. | ||
42 | |||
43 | Rx Descriptors: Number of receive descriptors. A receive descriptor is a data | ||
44 | structure that describes a receive buffer and its attributes to the network | ||
45 | controller. The data in the descriptor is used by the controller to write | ||
46 | data from the controller to host memory. In the 3.0.x driver the valid | ||
47 | range for this parameter is 64-256. The default value is 64. This parameter | ||
48 | can be changed using the command | ||
49 | |||
50 | ethtool -G eth? rx n, where n is the number of desired rx descriptors. | ||
51 | |||
52 | Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a | ||
53 | data structure that describes a transmit buffer and its attributes to the | ||
54 | network controller. The data in the descriptor is used by the controller to | ||
55 | read data from the host memory to the controller. In the 3.0.x driver the | ||
56 | valid range for this parameter is 64-256. The default value is 64. This | ||
57 | parameter can be changed using the command | ||
58 | |||
59 | ethtool -G eth? tx n, where n is the number of desired tx descriptors. | ||
60 | |||
61 | Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by | ||
62 | default. Ethtool can be used as follows to force speed/duplex. | ||
63 | |||
64 | ethtool -s eth? autoneg off speed {10|100} duplex {full|half} | ||
65 | |||
66 | NOTE: setting the speed/duplex to incorrect values will cause the link to | ||
67 | fail. | ||
68 | |||
69 | Event Log Message Level: The driver uses the message level flag to log events | ||
70 | to syslog. The message level can be set at driver load time. It can also be | ||
71 | set using the command | ||
72 | |||
73 | ethtool -s eth? msglvl n | ||
74 | |||
75 | Additional Configurations | ||
76 | ========================= | ||
77 | |||
78 | Configuring the Driver on Different Distributions | ||
79 | ------------------------------------------------- | ||
80 | |||
81 | Configuring a network driver to load properly when the system is started is | ||
82 | distribution dependent. Typically, the configuration process involves adding | ||
83 | an alias line to /etc/modules.conf as well as editing other system startup | ||
84 | scripts and/or configuration files. Many popular Linux distributions ship | ||
85 | with tools to make these changes for you. To learn the proper way to | ||
86 | configure a network device for your system, refer to your distribution | ||
87 | documentation. If during this process you are asked for the driver or module | ||
88 | name, the name for the Linux Base Driver for the Intel PRO/100 Family of | ||
89 | Adapters is e100. | ||
90 | |||
91 | As an example, if you install the e100 driver for two PRO/100 adapters | ||
92 | (eth0 and eth1), add the following to modules.conf: | ||
93 | |||
94 | alias eth0 e100 | ||
95 | alias eth1 e100 | ||
96 | |||
97 | Viewing Link Messages | ||
98 | --------------------- | ||
99 | In order to see link messages and other Intel driver information on your | ||
100 | console, you must set the dmesg level up to six. This can be done by | ||
101 | entering the following on the command line before loading the e100 driver: | ||
102 | |||
103 | dmesg -n 8 | ||
104 | |||
105 | If you wish to see all messages issued by the driver, including debug | ||
106 | messages, set the dmesg level to eight. | ||
107 | |||
108 | NOTE: This setting is not saved across reboots. | ||
109 | |||
110 | Ethtool | ||
111 | ------- | ||
112 | |||
113 | The driver utilizes the ethtool interface for driver configuration and | ||
114 | diagnostics, as well as displaying statistical information. Ethtool | ||
115 | version 1.6 or later is required for this functionality. | ||
116 | |||
117 | The latest release of ethtool can be found at: | ||
118 | http://sf.net/projects/gkernel. | ||
119 | |||
120 | NOTE: This driver uses mii support from the kernel. As a result, when | ||
121 | there is no link, ethtool will report speed/duplex to be 10/half. | ||
122 | |||
123 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | ||
124 | for a more complete ethtool feature set can be enabled by upgrading | ||
125 | ethtool to ethtool-1.8.1. | ||
126 | |||
127 | Enabling Wake on LAN* (WoL) | ||
128 | --------------------------- | ||
129 | WoL is provided through the Ethtool* utility. Ethtool is included with Red | ||
130 | Hat* 8.0. For other Linux distributions, download and install Ethtool from | ||
131 | the following website: http://sourceforge.net/projects/gkernel. | ||
132 | |||
133 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man | ||
134 | page. | ||
135 | |||
136 | WoL will be enabled on the system during the next shut down or reboot. For | ||
137 | this driver version, in order to enable WoL, the e100 driver must be | ||
138 | loaded when shutting down or rebooting the system. | ||
139 | |||
140 | NAPI | ||
141 | ---- | ||
142 | |||
143 | NAPI (Rx polling mode) is supported in the e100 driver. | ||
144 | |||
145 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | ||
146 | |||
147 | Support | ||
148 | ======= | ||
149 | |||
150 | For general information, go to the Intel support website at: | ||
151 | |||
152 | http://support.intel.com | ||
153 | |||
154 | If an issue is identified with the released source code on the supported | ||
155 | kernel with a supported adapter, email the specific information related to | ||
156 | the issue to linux.nics@intel.com. | ||
157 | |||
158 | |||
159 | License | ||
160 | ======= | ||
161 | |||
162 | This software program is released under the terms of a license agreement | ||
163 | between you ('Licensee') and Intel. Do not use or load this software or any | ||
164 | associated materials (collectively, the 'Software') until you have carefully | ||
165 | read the full terms and conditions of the LICENSE located in this software | ||
166 | package. By loading or using the Software, you agree to the terms of this | ||
167 | Agreement. If you do not agree with the terms of this Agreement, do not | ||
168 | install or use the Software. | ||
169 | |||
170 | * Other names and brands may be claimed as the property of others. | ||
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt new file mode 100644 index 000000000000..2ebd4058d46d --- /dev/null +++ b/Documentation/networking/e1000.txt | |||
@@ -0,0 +1,401 @@ | |||
1 | Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters | ||
2 | =============================================================== | ||
3 | |||
4 | November 17, 2004 | ||
5 | |||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - In This Release | ||
11 | - Identifying Your Adapter | ||
12 | - Command Line Parameters | ||
13 | - Speed and Duplex Configuration | ||
14 | - Additional Configurations | ||
15 | - Known Issues | ||
16 | - Support | ||
17 | |||
18 | |||
19 | In This Release | ||
20 | =============== | ||
21 | |||
22 | This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family | ||
23 | of Adapters, version 5.x.x. | ||
24 | |||
25 | For questions related to hardware requirements, refer to the documentation | ||
26 | supplied with your Intel PRO/1000 adapter. All hardware requirements listed | ||
27 | apply to use with Linux. | ||
28 | |||
29 | Native VLANs are now available with supported kernels. | ||
30 | |||
31 | Identifying Your Adapter | ||
32 | ======================== | ||
33 | |||
34 | For more information on how to identify your adapter, go to the Adapter & | ||
35 | Driver ID Guide at: | ||
36 | |||
37 | http://support.intel.com/support/network/adapter/pro100/21397.htm | ||
38 | |||
39 | For the latest Intel network drivers for Linux, refer to the following | ||
40 | website. In the search field, enter your adapter name or type, or use the | ||
41 | networking link on the left to search for your adapter: | ||
42 | |||
43 | http://downloadfinder.intel.com/scripts-df/support_intel.asp | ||
44 | |||
45 | Command Line Parameters | ||
46 | ======================= | ||
47 | |||
48 | If the driver is built as a module, the following optional parameters are | ||
49 | used by entering them on the command line with the modprobe or insmod command | ||
50 | using this syntax: | ||
51 | |||
52 | modprobe e1000 [<option>=<VAL1>,<VAL2>,...] | ||
53 | |||
54 | insmod e1000 [<option>=<VAL1>,<VAL2>,...] | ||
55 | |||
56 | For example, with two PRO/1000 PCI adapters, entering: | ||
57 | |||
58 | insmod e1000 TxDescriptors=80,128 | ||
59 | |||
60 | loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX | ||
61 | descriptors for the second adapter. | ||
62 | |||
63 | The default value for each parameter is generally the recommended setting, | ||
64 | unless otherwise noted. Also, if the driver is statically built into the | ||
65 | kernel, the driver is loaded with the default values for all the parameters. | ||
66 | Ethtool can be used to change some of the parameters at runtime. | ||
67 | |||
68 | NOTES: For more information about the AutoNeg, Duplex, and Speed | ||
69 | parameters, see the "Speed and Duplex Configuration" section in | ||
70 | this document. | ||
71 | |||
72 | For more information about the InterruptThrottleRate, RxIntDelay, | ||
73 | TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the | ||
74 | application note at: | ||
75 | http://www.intel.com/design/network/applnots/ap450.htm | ||
76 | |||
77 | A descriptor describes a data buffer and attributes related to the | ||
78 | data buffer. This information is accessed by the hardware. | ||
79 | |||
80 | AutoNeg (adapters using copper connections only) | ||
81 | Valid Range: 0x01-0x0F, 0x20-0x2F | ||
82 | Default Value: 0x2F | ||
83 | This parameter is a bit mask that specifies which speed and duplex | ||
84 | settings the board advertises. When this parameter is used, the Speed and | ||
85 | Duplex parameters must not be specified. | ||
86 | NOTE: Refer to the Speed and Duplex section of this readme for more | ||
87 | information on the AutoNeg parameter. | ||
88 | |||
89 | Duplex (adapters using copper connections only) | ||
90 | Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) | ||
91 | Default Value: 0 | ||
92 | Defines the direction in which data is allowed to flow. Can be either one | ||
93 | or two-directional. If both Duplex and the link partner are set to auto- | ||
94 | negotiate, the board auto-detects the correct duplex. If the link partner | ||
95 | is forced (either full or half), Duplex defaults to half-duplex. | ||
96 | |||
97 | FlowControl | ||
98 | Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) | ||
99 | Default: Read flow control settings from the EEPROM | ||
100 | This parameter controls the automatic generation(Tx) and response(Rx) to | ||
101 | Ethernet PAUSE frames. | ||
102 | |||
103 | InterruptThrottleRate | ||
104 | Valid Range: 100-100000 (0=off, 1=dynamic) | ||
105 | Default Value: 8000 | ||
106 | This value represents the maximum number of interrupts per second the | ||
107 | controller generates. InterruptThrottleRate is another setting used in | ||
108 | interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust | ||
109 | InterruptThrottleRate based on the current traffic load. | ||
110 | Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 | ||
111 | or 82544-based adapters. | ||
112 | |||
113 | NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and | ||
114 | RxAbsIntDelay parameters. In other words, minimizing the receive | ||
115 | and/or transmit absolute delays does not force the controller to | ||
116 | generate more interrupts than what the Interrupt Throttle Rate | ||
117 | allows. | ||
118 | CAUTION: If you are using the Intel PRO/1000 CT Network Connection | ||
119 | (controller 82547), setting InterruptThrottleRate to a value | ||
120 | greater than 75,000, may hang (stop transmitting) adapters under | ||
121 | certain network conditions. If this occurs a NETDEV WATCHDOG | ||
122 | message is logged in the system event log. In addition, the | ||
123 | controller is automatically reset, restoring the network | ||
124 | connection. To eliminate the potential for the hang, ensure | ||
125 | that InterruptThrottleRate is set no greater than 75,000 and is | ||
126 | not set to 0. | ||
127 | NOTE: When e1000 is loaded with default settings and multiple adapters are | ||
128 | in use simultaneously, the CPU utilization may increase non-linearly. | ||
129 | In order to limit the CPU utilization without impacting the overall | ||
130 | throughput, we recommend that you load the driver as follows: | ||
131 | |||
132 | insmod e1000.o InterruptThrottleRate=3000,3000,3000 | ||
133 | |||
134 | This sets the InterruptThrottleRate to 3000 interrupts/sec for the | ||
135 | first, second, and third instances of the driver. The range of 2000 to | ||
136 | 3000 interrupts per second works on a majority of systems and is a | ||
137 | good starting point, but the optimal value will be platform-specific. | ||
138 | If CPU utilization is not a concern, use RX_POLLING (NAPI) and default | ||
139 | driver settings. | ||
140 | |||
141 | RxDescriptors | ||
142 | Valid Range: 80-256 for 82542 and 82543-based adapters | ||
143 | 80-4096 for all other supported adapters | ||
144 | Default Value: 256 | ||
145 | This value is the number of receive descriptors allocated by the driver. | ||
146 | Increasing this value allows the driver to buffer more incoming packets. | ||
147 | Each descriptor is 16 bytes. A receive buffer is allocated for each | ||
148 | descriptor and can either be 2048 or 4096 bytes long, depending on the MTU | ||
149 | |||
150 | setting. An incoming packet can span one or more receive descriptors. | ||
151 | The maximum MTU size is 16110. | ||
152 | |||
153 | NOTE: MTU designates the frame size. It only needs to be set for Jumbo | ||
154 | Frames. | ||
155 | NOTE: Depending on the available system resources, the request for a | ||
156 | higher number of receive descriptors may be denied. In this case, | ||
157 | use a lower number. | ||
158 | |||
159 | RxIntDelay | ||
160 | Valid Range: 0-65535 (0=off) | ||
161 | Default Value: 0 | ||
162 | This value delays the generation of receive interrupts in units of 1.024 | ||
163 | microseconds. Receive interrupt reduction can improve CPU efficiency if | ||
164 | properly tuned for specific network traffic. Increasing this value adds | ||
165 | extra latency to frame reception and can end up decreasing the throughput | ||
166 | of TCP traffic. If the system is reporting dropped receives, this value | ||
167 | may be set too high, causing the driver to run out of available receive | ||
168 | descriptors. | ||
169 | |||
170 | CAUTION: When setting RxIntDelay to a value other than 0, adapters may | ||
171 | hang (stop transmitting) under certain network conditions. If | ||
172 | this occurs a NETDEV WATCHDOG message is logged in the system | ||
173 | event log. In addition, the controller is automatically reset, | ||
174 | restoring the network connection. To eliminate the potential for | ||
175 | the hang ensure that RxIntDelay is set to 0. | ||
176 | |||
177 | RxAbsIntDelay (82540, 82545 and later adapters only) | ||
178 | Valid Range: 0-65535 (0=off) | ||
179 | Default Value: 128 | ||
180 | This value, in units of 1.024 microseconds, limits the delay in which a | ||
181 | receive interrupt is generated. Useful only if RxIntDelay is non-zero, | ||
182 | this value ensures that an interrupt is generated after the initial | ||
183 | packet is received within the set amount of time. Proper tuning, | ||
184 | along with RxIntDelay, may improve traffic throughput in specific network | ||
185 | conditions. | ||
186 | |||
187 | Speed (adapters using copper connections only) | ||
188 | Valid Settings: 0, 10, 100, 1000 | ||
189 | Default Value: 0 (auto-negotiate at all supported speeds) | ||
190 | Speed forces the line speed to the specified value in megabits per second | ||
191 | (Mbps). If this parameter is not specified or is set to 0 and the link | ||
192 | partner is set to auto-negotiate, the board will auto-detect the correct | ||
193 | speed. Duplex should also be set when Speed is set to either 10 or 100. | ||
194 | |||
195 | TxDescriptors | ||
196 | Valid Range: 80-256 for 82542 and 82543-based adapters | ||
197 | 80-4096 for all other supported adapters | ||
198 | Default Value: 256 | ||
199 | This value is the number of transmit descriptors allocated by the driver. | ||
200 | Increasing this value allows the driver to queue more transmits. Each | ||
201 | descriptor is 16 bytes. | ||
202 | |||
203 | NOTE: Depending on the available system resources, the request for a | ||
204 | higher number of transmit descriptors may be denied. In this case, | ||
205 | use a lower number. | ||
206 | |||
207 | TxIntDelay | ||
208 | Valid Range: 0-65535 (0=off) | ||
209 | Default Value: 64 | ||
210 | This value delays the generation of transmit interrupts in units of | ||
211 | 1.024 microseconds. Transmit interrupt reduction can improve CPU | ||
212 | efficiency if properly tuned for specific network traffic. If the | ||
213 | system is reporting dropped transmits, this value may be set too high | ||
214 | causing the driver to run out of available transmit descriptors. | ||
215 | |||
216 | TxAbsIntDelay (82540, 82545 and later adapters only) | ||
217 | Valid Range: 0-65535 (0=off) | ||
218 | Default Value: 64 | ||
219 | This value, in units of 1.024 microseconds, limits the delay in which a | ||
220 | transmit interrupt is generated. Useful only if TxIntDelay is non-zero, | ||
221 | this value ensures that an interrupt is generated after the initial | ||
222 | packet is sent on the wire within the set amount of time. Proper tuning, | ||
223 | along with TxIntDelay, may improve traffic throughput in specific | ||
224 | network conditions. | ||
225 | |||
226 | XsumRX (not available on the 82542-based adapter) | ||
227 | Valid Range: 0-1 | ||
228 | Default Value: 1 | ||
229 | A value of '1' indicates that the driver should enable IP checksum | ||
230 | offload for received packets (both UDP and TCP) to the adapter hardware. | ||
231 | |||
232 | Speed and Duplex Configuration | ||
233 | ============================== | ||
234 | |||
235 | Three keywords are used to control the speed and duplex configuration. These | ||
236 | keywords are Speed, Duplex, and AutoNeg. | ||
237 | |||
238 | If the board uses a fiber interface, these keywords are ignored, and the | ||
239 | fiber interface board only links at 1000 Mbps full-duplex. | ||
240 | |||
241 | For copper-based boards, the keywords interact as follows: | ||
242 | |||
243 | The default operation is auto-negotiate. The board advertises all supported | ||
244 | speed and duplex combinations, and it links at the highest common speed and | ||
245 | duplex mode IF the link partner is set to auto-negotiate. | ||
246 | |||
247 | If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps is | ||
248 | advertised (The 1000BaseT spec requires auto-negotiation.) | ||
249 | |||
250 | If Speed = 10 or 100, then both Speed and Duplex should be set. Auto- | ||
251 | negotiation is disabled, and the AutoNeg parameter is ignored. Partner SHOULD | ||
252 | also be forced. | ||
253 | |||
254 | The AutoNeg parameter is used when more control is required over the auto- | ||
255 | negotiation process. When this parameter is used, Speed and Duplex parameters | ||
256 | must not be specified. The following table describes supported values for the | ||
257 | AutoNeg parameter: | ||
258 | |||
259 | Speed (Mbps) 1000 100 100 10 10 | ||
260 | Duplex Full Full Half Full Half | ||
261 | Value (in base 16) 0x20 0x08 0x04 0x02 0x01 | ||
262 | |||
263 | Example: insmod e1000 AutoNeg=0x03, loads e1000 and specifies (10 full duplex, | ||
264 | 10 half duplex) for negotiation with the peer. | ||
265 | |||
266 | Note that setting AutoNeg does not guarantee that the board will link at the | ||
267 | highest specified speed or duplex mode, but the board will link at the | ||
268 | highest possible speed/duplex of the link partner IF the link partner is also | ||
269 | set to auto-negotiate. If the link partner is forced speed/duplex, the | ||
270 | adapter MUST be forced to the same speed/duplex. | ||
271 | |||
272 | |||
273 | Additional Configurations | ||
274 | ========================= | ||
275 | |||
276 | Configuring the Driver on Different Distributions | ||
277 | ------------------------------------------------- | ||
278 | |||
279 | Configuring a network driver to load properly when the system is started is | ||
280 | distribution dependent. Typically, the configuration process involves adding | ||
281 | an alias line to /etc/modules.conf as well as editing other system startup | ||
282 | scripts and/or configuration files. Many popular Linux distributions ship | ||
283 | with tools to make these changes for you. To learn the proper way to | ||
284 | configure a network device for your system, refer to your distribution | ||
285 | documentation. If during this process you are asked for the driver or module | ||
286 | name, the name for the Linux Base Driver for the Intel PRO/1000 Family of | ||
287 | Adapters is e1000. | ||
288 | |||
289 | As an example, if you install the e1000 driver for two PRO/1000 adapters | ||
290 | (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the | ||
291 | following to modules.conf: | ||
292 | |||
293 | alias eth0 e1000 | ||
294 | alias eth1 e1000 | ||
295 | options e1000 Speed=10,100 Duplex=2,1 | ||
296 | |||
297 | Viewing Link Messages | ||
298 | --------------------- | ||
299 | |||
300 | Link messages will not be displayed to the console if the distribution is | ||
301 | restricting system messages. In order to see network driver link messages on | ||
302 | your console, set dmesg to eight by entering the following: | ||
303 | |||
304 | dmesg -n 8 | ||
305 | |||
306 | NOTE: This setting is not saved across reboots. | ||
307 | |||
308 | Jumbo Frames | ||
309 | ------------ | ||
310 | |||
311 | The driver supports Jumbo Frames for all adapters except 82542-based | ||
312 | adapters. Jumbo Frames support is enabled by changing the MTU to a value | ||
313 | larger than the default of 1500. Use the ifconfig command to increase the | ||
314 | MTU size. For example: | ||
315 | |||
316 | ifconfig ethx mtu 9000 up | ||
317 | |||
318 | The maximum MTU setting for Jumbo Frames is 16110. This value coincides | ||
319 | with the maximum Jumbo Frames size of 16128. | ||
320 | |||
321 | NOTE: Jumbo Frames are supported at 1000 Mbps only. Using Jumbo Frames at | ||
322 | 10 or 100 Mbps may result in poor performance or loss of link. | ||
323 | |||
324 | |||
325 | NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the | ||
326 | MTU size on the interface beyond 1500. | ||
327 | |||
328 | Ethtool | ||
329 | ------- | ||
330 | |||
331 | The driver utilizes the ethtool interface for driver configuration and | ||
332 | diagnostics, as well as displaying statistical information. Ethtool | ||
333 | version 1.6 or later is required for this functionality. | ||
334 | |||
335 | The latest release of ethtool can be found from | ||
336 | http://sf.net/projects/gkernel. | ||
337 | |||
338 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | ||
339 | for a more complete ethtool feature set can be enabled by upgrading | ||
340 | ethtool to ethtool-1.8.1. | ||
341 | |||
342 | Enabling Wake on LAN* (WoL) | ||
343 | --------------------------- | ||
344 | |||
345 | WoL is configured through the Ethtool* utility. Ethtool is included with | ||
346 | all versions of Red Hat after Red Hat 7.2. For other Linux distributions, | ||
347 | download and install Ethtool from the following website: | ||
348 | http://sourceforge.net/projects/gkernel. | ||
349 | |||
350 | For instructions on enabling WoL with Ethtool, refer to the website listed | ||
351 | above. | ||
352 | |||
353 | WoL will be enabled on the system during the next shut down or reboot. | ||
354 | For this driver version, in order to enable WoL, the e1000 driver must be | ||
355 | loaded when shutting down or rebooting the system. | ||
356 | |||
357 | NAPI | ||
358 | ---- | ||
359 | |||
360 | NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled | ||
361 | or disabled based on the configuration of the kernel. | ||
362 | |||
363 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | ||
364 | |||
365 | |||
366 | Known Issues | ||
367 | ============ | ||
368 | |||
369 | Jumbo Frames System Requirement | ||
370 | ------------------------------- | ||
371 | |||
372 | Memory allocation failures have been observed on Linux systems with 64 MB | ||
373 | of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, | ||
374 | your system may require more than the advertised minimum requirement of 64 MB | ||
375 | of system memory. | ||
376 | |||
377 | |||
378 | Support | ||
379 | ======= | ||
380 | |||
381 | For general information, go to the Intel support website at: | ||
382 | |||
383 | http://support.intel.com | ||
384 | |||
385 | If an issue is identified with the released source code on the supported | ||
386 | kernel with a supported adapter, email the specific information related to | ||
387 | the issue to linux.nics@intel.com. | ||
388 | |||
389 | |||
390 | License | ||
391 | ======= | ||
392 | |||
393 | This software program is released under the terms of a license agreement | ||
394 | between you ('Licensee') and Intel. Do not use or load this software or any | ||
395 | associated materials (collectively, the 'Software') until you have carefully | ||
396 | read the full terms and conditions of the LICENSE located in this software | ||
397 | package. By loading or using the Software, you agree to the terms of this | ||
398 | Agreement. If you do not agree with the terms of this Agreement, do not | ||
399 | install or use the Software. | ||
400 | |||
401 | * Other names and brands may be claimed as the property of others. | ||
diff --git a/Documentation/networking/eql.txt b/Documentation/networking/eql.txt new file mode 100644 index 000000000000..0f1550150f05 --- /dev/null +++ b/Documentation/networking/eql.txt | |||
@@ -0,0 +1,528 @@ | |||
1 | EQL Driver: Serial IP Load Balancing HOWTO | ||
2 | Simon "Guru Aleph-Null" Janes, simon@ncm.com | ||
3 | v1.1, February 27, 1995 | ||
4 | |||
5 | This is the manual for the EQL device driver. EQL is a software device | ||
6 | that lets you load-balance IP serial links (SLIP or uncompressed PPP) | ||
7 | to increase your bandwidth. It will not reduce your latency (i.e. ping | ||
8 | times) except in the case where you already have lots of traffic on | ||
9 | your link, in which it will help them out. This driver has been tested | ||
10 | with the 1.1.75 kernel, and is known to have patched cleanly with | ||
11 | 1.1.86. Some testing with 1.1.92 has been done with the v1.1 patch | ||
12 | which was only created to patch cleanly in the very latest kernel | ||
13 | source trees. (Yes, it worked fine.) | ||
14 | |||
15 | 1. Introduction | ||
16 | |||
17 | Which is worse? A huge fee for a 56K leased line or two phone lines? | ||
18 | It's probably the former. If you find yourself craving more bandwidth, | ||
19 | and have a ISP that is flexible, it is now possible to bind modems | ||
20 | together to work as one point-to-point link to increase your | ||
21 | bandwidth. All without having to have a special black box on either | ||
22 | side. | ||
23 | |||
24 | |||
25 | The eql driver has only been tested with the Livingston PortMaster-2e | ||
26 | terminal server. I do not know if other terminal servers support load- | ||
27 | balancing, but I do know that the PortMaster does it, and does it | ||
28 | almost as well as the eql driver seems to do it (-- Unfortunately, in | ||
29 | my testing so far, the Livingston PortMaster 2e's load-balancing is a | ||
30 | good 1 to 2 KB/s slower than the test machine working with a 28.8 Kbps | ||
31 | and 14.4 Kbps connection. However, I am not sure that it really is | ||
32 | the PortMaster, or if it's Linux's TCP drivers. I'm told that Linux's | ||
33 | TCP implementation is pretty fast though.--) | ||
34 | |||
35 | |||
36 | I suggest to ISPs out there that it would probably be fair to charge | ||
37 | a load-balancing client 75% of the cost of the second line and 50% of | ||
38 | the cost of the third line etc... | ||
39 | |||
40 | |||
41 | Hey, we can all dream you know... | ||
42 | |||
43 | |||
44 | 2. Kernel Configuration | ||
45 | |||
46 | Here I describe the general steps of getting a kernel up and working | ||
47 | with the eql driver. From patching, building, to installing. | ||
48 | |||
49 | |||
50 | 2.1. Patching The Kernel | ||
51 | |||
52 | If you do not have or cannot get a copy of the kernel with the eql | ||
53 | driver folded into it, get your copy of the driver from | ||
54 | ftp://slaughter.ncm.com/pub/Linux/LOAD_BALANCING/eql-1.1.tar.gz. | ||
55 | Unpack this archive someplace obvious like /usr/local/src/. It will | ||
56 | create the following files: | ||
57 | |||
58 | |||
59 | |||
60 | ______________________________________________________________________ | ||
61 | -rw-r--r-- guru/ncm 198 Jan 19 18:53 1995 eql-1.1/NO-WARRANTY | ||
62 | -rw-r--r-- guru/ncm 30620 Feb 27 21:40 1995 eql-1.1/eql-1.1.patch | ||
63 | -rwxr-xr-x guru/ncm 16111 Jan 12 22:29 1995 eql-1.1/eql_enslave | ||
64 | -rw-r--r-- guru/ncm 2195 Jan 10 21:48 1995 eql-1.1/eql_enslave.c | ||
65 | ______________________________________________________________________ | ||
66 | |||
67 | Unpack a recent kernel (something after 1.1.92) someplace convenient | ||
68 | like say /usr/src/linux-1.1.92.eql. Use symbolic links to point | ||
69 | /usr/src/linux to this development directory. | ||
70 | |||
71 | |||
72 | Apply the patch by running the commands: | ||
73 | |||
74 | |||
75 | ______________________________________________________________________ | ||
76 | cd /usr/src | ||
77 | patch </usr/local/src/eql-1.1/eql-1.1.patch | ||
78 | ______________________________________________________________________ | ||
79 | |||
80 | |||
81 | |||
82 | |||
83 | |||
84 | 2.2. Building The Kernel | ||
85 | |||
86 | After patching the kernel, run make config and configure the kernel | ||
87 | for your hardware. | ||
88 | |||
89 | |||
90 | After configuration, make and install according to your habit. | ||
91 | |||
92 | |||
93 | 3. Network Configuration | ||
94 | |||
95 | So far, I have only used the eql device with the DSLIP SLIP connection | ||
96 | manager by Matt Dillon (-- "The man who sold his soul to code so much | ||
97 | so quickly."--) . How you configure it for other "connection" | ||
98 | managers is up to you. Most other connection managers that I've seen | ||
99 | don't do a very good job when it comes to handling more than one | ||
100 | connection. | ||
101 | |||
102 | |||
103 | 3.1. /etc/rc.d/rc.inet1 | ||
104 | |||
105 | In rc.inet1, ifconfig the eql device to the IP address you usually use | ||
106 | for your machine, and the MTU you prefer for your SLIP lines. One | ||
107 | could argue that MTU should be roughly half the usual size for two | ||
108 | modems, one-third for three, one-fourth for four, etc... But going | ||
109 | too far below 296 is probably overkill. Here is an example ifconfig | ||
110 | command that sets up the eql device: | ||
111 | |||
112 | |||
113 | |||
114 | ______________________________________________________________________ | ||
115 | ifconfig eql 198.67.33.239 mtu 1006 | ||
116 | ______________________________________________________________________ | ||
117 | |||
118 | |||
119 | |||
120 | |||
121 | |||
122 | Once the eql device is up and running, add a static default route to | ||
123 | it in the routing table using the cool new route syntax that makes | ||
124 | life so much easier: | ||
125 | |||
126 | |||
127 | |||
128 | ______________________________________________________________________ | ||
129 | route add default eql | ||
130 | ______________________________________________________________________ | ||
131 | |||
132 | |||
133 | 3.2. Enslaving Devices By Hand | ||
134 | |||
135 | Enslaving devices by hand requires two utility programs: eql_enslave | ||
136 | and eql_emancipate (-- eql_emancipate hasn't been written because when | ||
137 | an enslaved device "dies", it is automatically taken out of the queue. | ||
138 | I haven't found a good reason to write it yet... other than for | ||
139 | completeness, but that isn't a good motivator is it?--) | ||
140 | |||
141 | |||
142 | The syntax for enslaving a device is "eql_enslave <master-name> | ||
143 | <slave-name> <estimated-bps>". Here are some example enslavings: | ||
144 | |||
145 | |||
146 | |||
147 | ______________________________________________________________________ | ||
148 | eql_enslave eql sl0 28800 | ||
149 | eql_enslave eql ppp0 14400 | ||
150 | eql_enslave eql sl1 57600 | ||
151 | ______________________________________________________________________ | ||
152 | |||
153 | |||
154 | |||
155 | |||
156 | |||
157 | When you want to free a device from its life of slavery, you can | ||
158 | either down the device with ifconfig (eql will automatically bury the | ||
159 | dead slave and remove it from its queue) or use eql_emancipate to free | ||
160 | it. (-- Or just ifconfig it down, and the eql driver will take it out | ||
161 | for you.--) | ||
162 | |||
163 | |||
164 | |||
165 | ______________________________________________________________________ | ||
166 | eql_emancipate eql sl0 | ||
167 | eql_emancipate eql ppp0 | ||
168 | eql_emancipate eql sl1 | ||
169 | ______________________________________________________________________ | ||
170 | |||
171 | |||
172 | |||
173 | |||
174 | |||
175 | 3.3. DSLIP Configuration for the eql Device | ||
176 | |||
177 | The general idea is to bring up and keep up as many SLIP connections | ||
178 | as you need, automatically. | ||
179 | |||
180 | |||
181 | 3.3.1. /etc/slip/runslip.conf | ||
182 | |||
183 | Here is an example runslip.conf: | ||
184 | |||
185 | |||
186 | |||
187 | |||
188 | |||
189 | |||
190 | |||
191 | |||
192 | |||
193 | |||
194 | |||
195 | |||
196 | |||
197 | |||
198 | |||
199 | ______________________________________________________________________ | ||
200 | name sl-line-1 | ||
201 | enabled | ||
202 | baud 38400 | ||
203 | mtu 576 | ||
204 | ducmd -e /etc/slip/dialout/cua2-288.xp -t 9 | ||
205 | command eql_enslave eql $interface 28800 | ||
206 | address 198.67.33.239 | ||
207 | line /dev/cua2 | ||
208 | |||
209 | name sl-line-2 | ||
210 | enabled | ||
211 | baud 38400 | ||
212 | mtu 576 | ||
213 | ducmd -e /etc/slip/dialout/cua3-288.xp -t 9 | ||
214 | command eql_enslave eql $interface 28800 | ||
215 | address 198.67.33.239 | ||
216 | line /dev/cua3 | ||
217 | ______________________________________________________________________ | ||
218 | |||
219 | |||
220 | |||
221 | |||
222 | |||
223 | 3.4. Using PPP and the eql Device | ||
224 | |||
225 | I have not yet done any load-balancing testing for PPP devices, mainly | ||
226 | because I don't have a PPP-connection manager like SLIP has with | ||
227 | DSLIP. I did find a good tip from LinuxNET:Billy for PPP performance: | ||
228 | make sure you have asyncmap set to something so that control | ||
229 | characters are not escaped. | ||
230 | |||
231 | |||
232 | I tried to fix up a PPP script/system for redialing lost PPP | ||
233 | connections for use with the eql driver the weekend of Feb 25-26 '95 | ||
234 | (Hereafter known as the 8-hour PPP Hate Festival). Perhaps later this | ||
235 | year. | ||
236 | |||
237 | |||
238 | 4. About the Slave Scheduler Algorithm | ||
239 | |||
240 | The slave scheduler probably could be replaced with a dozen other | ||
241 | things and push traffic much faster. The formula in the current set | ||
242 | up of the driver was tuned to handle slaves with wildly different | ||
243 | bits-per-second "priorities". | ||
244 | |||
245 | |||
246 | All testing I have done was with two 28.8 V.FC modems, one connecting | ||
247 | at 28800 bps or slower, and the other connecting at 14400 bps all the | ||
248 | time. | ||
249 | |||
250 | |||
251 | One version of the scheduler was able to push 5.3 K/s through the | ||
252 | 28800 and 14400 connections, but when the priorities on the links were | ||
253 | very wide apart (57600 vs. 14400) the "faster" modem received all | ||
254 | traffic and the "slower" modem starved. | ||
255 | |||
256 | |||
257 | 5. Testers' Reports | ||
258 | |||
259 | Some people have experimented with the eql device with newer | ||
260 | kernels (than 1.1.75). I have since updated the driver to patch | ||
261 | cleanly in newer kernels because of the removal of the old "slave- | ||
262 | balancing" driver config option. | ||
263 | |||
264 | |||
265 | o icee from LinuxNET patched 1.1.86 without any rejects and was able | ||
266 | to boot the kernel and enslave a couple of ISDN PPP links. | ||
267 | |||
268 | 5.1. Randolph Bentson's Test Report | ||
269 | |||
270 | |||
271 | |||
272 | |||
273 | |||
274 | |||
275 | |||
276 | |||
277 | |||
278 | |||
279 | |||
280 | |||
281 | |||
282 | |||
283 | |||
284 | |||
285 | |||
286 | |||
287 | |||
288 | |||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
294 | |||
295 | |||
296 | |||
297 | |||
298 | |||
299 | |||
300 | |||
301 | |||
302 | |||
303 | |||
304 | |||
305 | |||
306 | |||
307 | |||
308 | |||
309 | |||
310 | |||
311 | |||
312 | |||
313 | |||
314 | |||
315 | |||
316 | |||
317 | |||
318 | |||
319 | |||
320 | |||
321 | |||
322 | |||
323 | |||
324 | |||
325 | |||
326 | |||
327 | |||
328 | |||
329 | |||
330 | |||
331 | From bentson@grieg.seaslug.org Wed Feb 8 19:08:09 1995 | ||
332 | Date: Tue, 7 Feb 95 22:57 PST | ||
333 | From: Randolph Bentson <bentson@grieg.seaslug.org> | ||
334 | To: guru@ncm.com | ||
335 | Subject: EQL driver tests | ||
336 | |||
337 | |||
338 | I have been checking out your eql driver. (Nice work, that!) | ||
339 | Although you may already done this performance testing, here | ||
340 | are some data I've discovered. | ||
341 | |||
342 | Randolph Bentson | ||
343 | bentson@grieg.seaslug.org | ||
344 | |||
345 | --------------------------------------------------------- | ||
346 | |||
347 | |||
348 | A pseudo-device driver, EQL, written by Simon Janes, can be used | ||
349 | to bundle multiple SLIP connections into what appears to be a | ||
350 | single connection. This allows one to improve dial-up network | ||
351 | connectivity gradually, without having to buy expensive DSU/CSU | ||
352 | hardware and services. | ||
353 | |||
354 | I have done some testing of this software, with two goals in | ||
355 | mind: first, to ensure it actually works as described and | ||
356 | second, as a method of exercising my device driver. | ||
357 | |||
358 | The following performance measurements were derived from a set | ||
359 | of SLIP connections run between two Linux systems (1.1.84) using | ||
360 | a 486DX2/66 with a Cyclom-8Ys and a 486SLC/40 with a Cyclom-16Y. | ||
361 | (Ports 0,1,2,3 were used. A later configuration will distribute | ||
362 | port selection across the different Cirrus chips on the boards.) | ||
363 | Once a link was established, I timed a binary ftp transfer of | ||
364 | 289284 bytes of data. If there were no overhead (packet headers, | ||
365 | inter-character and inter-packet delays, etc.) the transfers | ||
366 | would take the following times: | ||
367 | |||
368 | bits/sec seconds | ||
369 | 345600 8.3 | ||
370 | 234600 12.3 | ||
371 | 172800 16.7 | ||
372 | 153600 18.8 | ||
373 | 76800 37.6 | ||
374 | 57600 50.2 | ||
375 | 38400 75.3 | ||
376 | 28800 100.4 | ||
377 | 19200 150.6 | ||
378 | 9600 301.3 | ||
379 | |||
380 | A single line running at the lower speeds and with large packets | ||
381 | comes to within 2% of this. Performance is limited for the higher | ||
382 | speeds (as predicted by the Cirrus databook) to an aggregate of | ||
383 | about 160 kbits/sec. The next round of testing will distribute | ||
384 | the load across two or more Cirrus chips. | ||
385 | |||
386 | The good news is that one gets nearly the full advantage of the | ||
387 | second, third, and fourth line's bandwidth. (The bad news is | ||
388 | that the connection establishment seemed fragile for the higher | ||
389 | speeds. Once established, the connection seemed robust enough.) | ||
390 | |||
391 | #lines speed mtu seconds theory actual %of | ||
392 | kbit/sec duration speed speed max | ||
393 | 3 115200 900 _ 345600 | ||
394 | 3 115200 400 18.1 345600 159825 46 | ||
395 | 2 115200 900 _ 230400 | ||
396 | 2 115200 600 18.1 230400 159825 69 | ||
397 | 2 115200 400 19.3 230400 149888 65 | ||
398 | 4 57600 900 _ 234600 | ||
399 | 4 57600 600 _ 234600 | ||
400 | 4 57600 400 _ 234600 | ||
401 | 3 57600 600 20.9 172800 138413 80 | ||
402 | 3 57600 900 21.2 172800 136455 78 | ||
403 | 3 115200 600 21.7 345600 133311 38 | ||
404 | 3 57600 400 22.5 172800 128571 74 | ||
405 | 4 38400 900 25.2 153600 114795 74 | ||
406 | 4 38400 600 26.4 153600 109577 71 | ||
407 | 4 38400 400 27.3 153600 105965 68 | ||
408 | 2 57600 900 29.1 115200 99410.3 86 | ||
409 | 1 115200 900 30.7 115200 94229.3 81 | ||
410 | 2 57600 600 30.2 115200 95789.4 83 | ||
411 | 3 38400 900 30.3 115200 95473.3 82 | ||
412 | 3 38400 600 31.2 115200 92719.2 80 | ||
413 | 1 115200 600 31.3 115200 92423 80 | ||
414 | 2 57600 400 32.3 115200 89561.6 77 | ||
415 | 1 115200 400 32.8 115200 88196.3 76 | ||
416 | 3 38400 400 33.5 115200 86353.4 74 | ||
417 | 2 38400 900 43.7 76800 66197.7 86 | ||
418 | 2 38400 600 44 76800 65746.4 85 | ||
419 | 2 38400 400 47.2 76800 61289 79 | ||
420 | 4 19200 900 50.8 76800 56945.7 74 | ||
421 | 4 19200 400 53.2 76800 54376.7 70 | ||
422 | 4 19200 600 53.7 76800 53870.4 70 | ||
423 | 1 57600 900 54.6 57600 52982.4 91 | ||
424 | 1 57600 600 56.2 57600 51474 89 | ||
425 | 3 19200 900 60.5 57600 47815.5 83 | ||
426 | 1 57600 400 60.2 57600 48053.8 83 | ||
427 | 3 19200 600 62 57600 46658.7 81 | ||
428 | 3 19200 400 64.7 57600 44711.6 77 | ||
429 | 1 38400 900 79.4 38400 36433.8 94 | ||
430 | 1 38400 600 82.4 38400 35107.3 91 | ||
431 | 2 19200 900 84.4 38400 34275.4 89 | ||
432 | 1 38400 400 86.8 38400 33327.6 86 | ||
433 | 2 19200 600 87.6 38400 33023.3 85 | ||
434 | 2 19200 400 91.2 38400 31719.7 82 | ||
435 | 4 9600 900 94.7 38400 30547.4 79 | ||
436 | 4 9600 400 106 38400 27290.9 71 | ||
437 | 4 9600 600 110 38400 26298.5 68 | ||
438 | 3 9600 900 118 28800 24515.6 85 | ||
439 | 3 9600 600 120 28800 24107 83 | ||
440 | 3 9600 400 131 28800 22082.7 76 | ||
441 | 1 19200 900 155 19200 18663.5 97 | ||
442 | 1 19200 600 161 19200 17968 93 | ||
443 | 1 19200 400 170 19200 17016.7 88 | ||
444 | 2 9600 600 176 19200 16436.6 85 | ||
445 | 2 9600 900 180 19200 16071.3 83 | ||
446 | 2 9600 400 181 19200 15982.5 83 | ||
447 | 1 9600 900 305 9600 9484.72 98 | ||
448 | 1 9600 600 314 9600 9212.87 95 | ||
449 | 1 9600 400 332 9600 8713.37 90 | ||
450 | |||
451 | |||
452 | |||
453 | |||
454 | |||
455 | 5.2. Anthony Healy's Report | ||
456 | |||
457 | |||
458 | |||
459 | |||
460 | |||
461 | |||
462 | |||
463 | Date: Mon, 13 Feb 1995 16:17:29 +1100 (EST) | ||
464 | From: Antony Healey <ahealey@st.nepean.uws.edu.au> | ||
465 | To: Simon Janes <guru@ncm.com> | ||
466 | Subject: Re: Load Balancing | ||
467 | |||
468 | Hi Simon, | ||
469 | I've installed your patch and it works great. I have trialed | ||
470 | it over twin SL/IP lines, just over null modems, but I was | ||
471 | able to data at over 48Kb/s [ISDN link -Simon]. I managed a | ||
472 | transfer of up to 7.5 Kbyte/s on one go, but averaged around | ||
473 | 6.4 Kbyte/s, which I think is pretty cool. :) | ||
474 | |||
475 | |||
476 | |||
477 | |||
478 | |||
479 | |||
480 | |||
481 | |||
482 | |||
483 | |||
484 | |||
485 | |||
486 | |||
487 | |||
488 | |||
489 | |||
490 | |||
491 | |||
492 | |||
493 | |||
494 | |||
495 | |||
496 | |||
497 | |||
498 | |||
499 | |||
500 | |||
501 | |||
502 | |||
503 | |||
504 | |||
505 | |||
506 | |||
507 | |||
508 | |||
509 | |||
510 | |||
511 | |||
512 | |||
513 | |||
514 | |||
515 | |||
516 | |||
517 | |||
518 | |||
519 | |||
520 | |||
521 | |||
522 | |||
523 | |||
524 | |||
525 | |||
526 | |||
527 | |||
528 | |||
diff --git a/Documentation/networking/ewrk3.txt b/Documentation/networking/ewrk3.txt new file mode 100644 index 000000000000..90e9e5f16e6b --- /dev/null +++ b/Documentation/networking/ewrk3.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | The EtherWORKS 3 driver in this distribution is designed to work with all | ||
2 | kernels > 1.1.33 (approx) and includes tools in the 'ewrk3tools' | ||
3 | subdirectory to allow set up of the card, similar to the MSDOS | ||
4 | 'NICSETUP.EXE' tools provided on the DOS drivers disk (type 'make' in that | ||
5 | subdirectory to make the tools). | ||
6 | |||
7 | The supported cards are DE203, DE204 and DE205. All other cards are NOT | ||
8 | supported - refer to 'depca.c' for running the LANCE based network cards and | ||
9 | 'de4x5.c' for the DIGITAL Semiconductor PCI chip based adapters from | ||
10 | Digital. | ||
11 | |||
12 | The ability to load this driver as a loadable module has been included and | ||
13 | used extensively during the driver development (to save those long reboot | ||
14 | sequences). To utilise this ability, you have to do 8 things: | ||
15 | |||
16 | 0) have a copy of the loadable modules code installed on your system. | ||
17 | 1) copy ewrk3.c from the /linux/drivers/net directory to your favourite | ||
18 | temporary directory. | ||
19 | 2) edit the source code near line 1898 to reflect the I/O address and | ||
20 | IRQ you're using. | ||
21 | 3) compile ewrk3.c, but include -DMODULE in the command line to ensure | ||
22 | that the correct bits are compiled (see end of source code). | ||
23 | 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a | ||
24 | kernel with the ewrk3 configuration turned off and reboot. | ||
25 | 5) insmod ewrk3.o | ||
26 | [Alan Cox: Changed this so you can insmod ewrk3.o irq=x io=y] | ||
27 | [Adam Kropelin: Multiple cards now supported by irq=x1,x2 io=y1,y2] | ||
28 | 6) run the net startup bits for your new eth?? interface manually | ||
29 | (usually /etc/rc.inet[12] at boot time). | ||
30 | 7) enjoy! | ||
31 | |||
32 | Note that autoprobing is not allowed in loadable modules - the system is | ||
33 | already up and running and you're messing with interrupts. | ||
34 | |||
35 | To unload a module, turn off the associated interface | ||
36 | 'ifconfig eth?? down' then 'rmmod ewrk3'. | ||
37 | |||
38 | The performance we've achieved so far has been measured through the 'ttcp' | ||
39 | tool at 975kB/s. This measures the total TCP stack performance which | ||
40 | includes the card, so don't expect to get much nearer the 1.25MB/s | ||
41 | theoretical Ethernet rate. | ||
42 | |||
43 | |||
44 | Enjoy! | ||
45 | |||
46 | Dave | ||
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt new file mode 100644 index 000000000000..bbf2005270b5 --- /dev/null +++ b/Documentation/networking/filter.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | filter.txt: Linux Socket Filtering | ||
2 | Written by: Jay Schulist <jschlst@samba.org> | ||
3 | |||
4 | Introduction | ||
5 | ============ | ||
6 | |||
7 | Linux Socket Filtering is derived from the Berkeley | ||
8 | Packet Filter. There are some distinct differences between | ||
9 | the BSD and Linux Kernel Filtering. | ||
10 | |||
11 | Linux Socket Filtering (LSF) allows a user-space program to | ||
12 | attach a filter onto any socket and allow or disallow certain | ||
13 | types of data to come through the socket. LSF follows exactly | ||
14 | the same filter code structure as the BSD Berkeley Packet Filter | ||
15 | (BPF), so referring to the BSD bpf.4 manpage is very helpful in | ||
16 | creating filters. | ||
17 | |||
18 | LSF is much simpler than BPF. One does not have to worry about | ||
19 | devices or anything like that. You simply create your filter | ||
20 | code, send it to the kernel via the SO_ATTACH_FILTER ioctl and | ||
21 | if your filter code passes the kernel check on it, you then | ||
22 | immediately begin filtering data on that socket. | ||
23 | |||
24 | You can also detach filters from your socket via the | ||
25 | SO_DETACH_FILTER ioctl. This will probably not be used much | ||
26 | since when you close a socket that has a filter on it the | ||
27 | filter is automagically removed. The other less common case | ||
28 | may be adding a different filter on the same socket where you had another | ||
29 | filter that is still running: the kernel takes care of removing | ||
30 | the old one and placing your new one in its place, assuming your | ||
31 | filter has passed the checks, otherwise if it fails the old filter | ||
32 | will remain on that socket. | ||
33 | |||
34 | Examples | ||
35 | ======== | ||
36 | |||
37 | Ioctls- | ||
38 | setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &Filter, sizeof(Filter)); | ||
39 | setsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &value, sizeof(value)); | ||
40 | |||
41 | See the BSD bpf.4 manpage and the BSD Packet Filter paper written by | ||
42 | Steven McCanne and Van Jacobson of Lawrence Berkeley Laboratory. | ||
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt new file mode 100644 index 000000000000..b1f337f0f4ca --- /dev/null +++ b/Documentation/networking/fore200e.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | |||
2 | FORE Systems PCA-200E/SBA-200E ATM NIC driver | ||
3 | --------------------------------------------- | ||
4 | |||
5 | This driver adds support for the FORE Systems 200E-series ATM adapters | ||
6 | to the Linux operating system. It is based on the earlier PCA-200E driver | ||
7 | written by Uwe Dannowski. | ||
8 | |||
9 | The driver simultaneously supports PCA-200E and SBA-200E adapters on | ||
10 | i386, alpha (untested), powerpc, sparc and sparc64 archs. | ||
11 | |||
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, | ||
14 | PCI+MCA or PCI+EISA). | ||
15 | |||
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 (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). | ||
20 | |||
21 | |||
22 | Firmware Copyright Notice | ||
23 | ------------------------- | ||
24 | |||
25 | Please read the fore200e_firmware_copyright file present | ||
26 | in the linux/drivers/atm directory for details and restrictions. | ||
27 | |||
28 | |||
29 | Firmware Updates | ||
30 | ---------------- | ||
31 | |||
32 | The FORE Systems 200E-series driver is shipped with firmware data being | ||
33 | uploaded to the ATM adapters at system boot time or at module loading time. | ||
34 | The supplied firmware images should work with all adapters. | ||
35 | |||
36 | However, if you encounter problems (the firmware doesn't start or the driver | ||
37 | is unable to read the PROM data), you may consider trying another firmware | ||
38 | version. Alternative binary firmware images can be found somewhere on the | ||
39 | ForeThought CD-ROM supplied with your adapter by FORE Systems. | ||
40 | |||
41 | You can also get the latest firmware images from FORE Systems at | ||
42 | http://www.fore.com. Register TACTics Online and go to | ||
43 | the 'software updates' pages. The firmware binaries are part of | ||
44 | the various ForeThought software distributions. | ||
45 | |||
46 | Notice that different versions of the PCA-200E firmware exist, depending | ||
47 | on the endianess of the host architecture. The driver is shipped with | ||
48 | both little and big endian PCA firmware images. | ||
49 | |||
50 | Name and location of the new firmware images can be set at kernel | ||
51 | configuration time: | ||
52 | |||
53 | 1. Copy the new firmware binary files (with .bin, .bin1 or .bin2 suffix) | ||
54 | to some directory, such as linux/drivers/atm. | ||
55 | |||
56 | 2. Reconfigure your kernel to set the new firmware name and location. | ||
57 | Expected pathnames are absolute or relative to the drivers/atm directory. | ||
58 | |||
59 | 3. Rebuild and re-install your kernel or your module. | ||
60 | |||
61 | |||
62 | Feedback | ||
63 | -------- | ||
64 | |||
65 | Feedback is welcome. Please send success stories/bug reports/ | ||
66 | patches/improvement/comments/flames to <lizzi@cnam.fr>. | ||
diff --git a/Documentation/networking/framerelay.txt b/Documentation/networking/framerelay.txt new file mode 100644 index 000000000000..1a0b720440dd --- /dev/null +++ b/Documentation/networking/framerelay.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | Frame Relay (FR) support for linux is built into a two tiered system of device | ||
2 | drivers. The upper layer implements RFC1490 FR specification, and uses the | ||
3 | Data Link Connection Identifier (DLCI) as its hardware address. Usually these | ||
4 | are assigned by your network supplier, they give you the number/numbers of | ||
5 | the Virtual Connections (VC) assigned to you. | ||
6 | |||
7 | Each DLCI is a point-to-point link between your machine and a remote one. | ||
8 | As such, a separate device is needed to accommodate the routing. Within the | ||
9 | net-tools archives is 'dlcicfg'. This program will communicate with the | ||
10 | base "DLCI" device, and create new net devices named 'dlci00', 'dlci01'... | ||
11 | The configuration script will ask you how many DLCIs you need, as well as | ||
12 | how many DLCIs you want to assign to each Frame Relay Access Device (FRAD). | ||
13 | |||
14 | The DLCI uses a number of function calls to communicate with the FRAD, all | ||
15 | of which are stored in the FRAD's private data area. assoc/deassoc, | ||
16 | activate/deactivate and dlci_config. The DLCI supplies a receive function | ||
17 | to the FRAD to accept incoming packets. | ||
18 | |||
19 | With this initial offering, only 1 FRAD driver is available. With many thanks | ||
20 | to Sangoma Technologies, David Mandelstam & Gene Kozin, the S502A, S502E & | ||
21 | S508 are supported. This driver is currently set up for only FR, but as | ||
22 | Sangoma makes more firmware modules available, it can be updated to provide | ||
23 | them as well. | ||
24 | |||
25 | Configuration of the FRAD makes use of another net-tools program, 'fradcfg'. | ||
26 | This program makes use of a configuration file (which dlcicfg can also read) | ||
27 | to specify the types of boards to be configured as FRADs, as well as perform | ||
28 | any board specific configuration. The Sangoma module of fradcfg loads the | ||
29 | FR firmware into the card, sets the irq/port/memory information, and provides | ||
30 | an initial configuration. | ||
31 | |||
32 | Additional FRAD device drivers can be added as hardware is available. | ||
33 | |||
34 | At this time, the dlcicfg and fradcfg programs have not been incorporated into | ||
35 | the net-tools distribution. They can be found at ftp.invlogic.com, in | ||
36 | /pub/linux. Note that with OS/2 FTPD, you end up in /pub by default, so just | ||
37 | use 'cd linux'. v0.10 is for use on pre-2.0.3 and earlier, v0.15 is for | ||
38 | pre-2.0.4 and later. | ||
39 | |||
diff --git a/Documentation/networking/gen_stats.txt b/Documentation/networking/gen_stats.txt new file mode 100644 index 000000000000..c3297f79c137 --- /dev/null +++ b/Documentation/networking/gen_stats.txt | |||
@@ -0,0 +1,117 @@ | |||
1 | Generic networking statistics for netlink users | ||
2 | ====================================================================== | ||
3 | |||
4 | Statistic counters are grouped into structs: | ||
5 | |||
6 | Struct TLV type Description | ||
7 | ---------------------------------------------------------------------- | ||
8 | gnet_stats_basic TCA_STATS_BASIC Basic statistics | ||
9 | gnet_stats_rate_est TCA_STATS_RATE_EST Rate estimator | ||
10 | gnet_stats_queue TCA_STATS_QUEUE Queue statistics | ||
11 | none TCA_STATS_APP Application specific | ||
12 | |||
13 | |||
14 | Collecting: | ||
15 | ----------- | ||
16 | |||
17 | Declare the statistic structs you need: | ||
18 | struct mystruct { | ||
19 | struct gnet_stats_basic bstats; | ||
20 | struct gnet_stats_queue qstats; | ||
21 | ... | ||
22 | }; | ||
23 | |||
24 | Update statistics: | ||
25 | mystruct->tstats.packet++; | ||
26 | mystruct->qstats.backlog += skb->pkt_len; | ||
27 | |||
28 | |||
29 | Export to userspace (Dump): | ||
30 | --------------------------- | ||
31 | |||
32 | my_dumping_routine(struct sk_buff *skb, ...) | ||
33 | { | ||
34 | struct gnet_dump dump; | ||
35 | |||
36 | if (gnet_stats_start_copy(skb, TCA_STATS2, &mystruct->lock, &dump) < 0) | ||
37 | goto rtattr_failure; | ||
38 | |||
39 | if (gnet_stats_copy_basic(&dump, &mystruct->bstats) < 0 || | ||
40 | gnet_stats_copy_queue(&dump, &mystruct->qstats) < 0 || | ||
41 | gnet_stats_copy_app(&dump, &xstats, sizeof(xstats)) < 0) | ||
42 | goto rtattr_failure; | ||
43 | |||
44 | if (gnet_stats_finish_copy(&dump) < 0) | ||
45 | goto rtattr_failure; | ||
46 | ... | ||
47 | } | ||
48 | |||
49 | TCA_STATS/TCA_XSTATS backward compatibility: | ||
50 | -------------------------------------------- | ||
51 | |||
52 | Prior users of struct tc_stats and xstats can maintain backward | ||
53 | compatibility by calling the compat wrappers to keep providing the | ||
54 | existing TLV types. | ||
55 | |||
56 | my_dumping_routine(struct sk_buff *skb, ...) | ||
57 | { | ||
58 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, | ||
59 | TCA_XSTATS, &mystruct->lock, &dump) < 0) | ||
60 | goto rtattr_failure; | ||
61 | ... | ||
62 | } | ||
63 | |||
64 | A struct tc_stats will be filled out during gnet_stats_copy_* calls | ||
65 | and appended to the skb. TCA_XSTATS is provided if gnet_stats_copy_app | ||
66 | was called. | ||
67 | |||
68 | |||
69 | Locking: | ||
70 | -------- | ||
71 | |||
72 | Locks are taken before writing and released once all statistics have | ||
73 | been written. Locks are always released in case of an error. You | ||
74 | are responsible for making sure that the lock is initialized. | ||
75 | |||
76 | |||
77 | Rate Estimator: | ||
78 | -------------- | ||
79 | |||
80 | 0) Prepare an estimator attribute. Most likely this would be in user | ||
81 | space. The value of this TLV should contain a tc_estimator structure. | ||
82 | As usual, such a TLV nees to be 32 bit aligned and therefore the | ||
83 | length needs to be appropriately set etc. The estimator interval | ||
84 | and ewma log need to be converted to the appropriate values. | ||
85 | tc_estimator.c::tc_setup_estimator() is advisable to be used as the | ||
86 | conversion routine. It does a few clever things. It takes a time | ||
87 | interval in microsecs, a time constant also in microsecs and a struct | ||
88 | tc_estimator to be populated. The returned tc_estimator can be | ||
89 | transported to the kernel. Transfer such a structure in a TLV of type | ||
90 | TCA_RATE to your code in the kernel. | ||
91 | |||
92 | In the kernel when setting up: | ||
93 | 1) make sure you have basic stats and rate stats setup first. | ||
94 | 2) make sure you have initialized stats lock that is used to setup such | ||
95 | stats. | ||
96 | 3) Now initialize a new estimator: | ||
97 | |||
98 | int ret = gen_new_estimator(my_basicstats,my_rate_est_stats, | ||
99 | mystats_lock, attr_with_tcestimator_struct); | ||
100 | |||
101 | if ret == 0 | ||
102 | success | ||
103 | else | ||
104 | failed | ||
105 | |||
106 | From now on, everytime you dump my_rate_est_stats it will contain | ||
107 | uptodate info. | ||
108 | |||
109 | Once you are done, call gen_kill_estimator(my_basicstats, | ||
110 | my_rate_est_stats) Make sure that my_basicstats and my_rate_est_stats | ||
111 | are still valid (i.e still exist) at the time of making this call. | ||
112 | |||
113 | |||
114 | Authors: | ||
115 | -------- | ||
116 | Thomas Graf <tgraf@suug.ch> | ||
117 | Jamal Hadi Salim <hadi@cyberus.ca> | ||
diff --git a/Documentation/networking/generic-hdlc.txt b/Documentation/networking/generic-hdlc.txt new file mode 100644 index 000000000000..7d1dc6b884f3 --- /dev/null +++ b/Documentation/networking/generic-hdlc.txt | |||
@@ -0,0 +1,131 @@ | |||
1 | Generic HDLC layer | ||
2 | Krzysztof Halasa <khc@pm.waw.pl> | ||
3 | January, 2003 | ||
4 | |||
5 | |||
6 | Generic HDLC layer currently supports: | ||
7 | - Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP). | ||
8 | Normal (routed) and Ethernet-bridged (Ethernet device emulation) | ||
9 | interfaces can share a single PVC. | ||
10 | - raw HDLC - either IP (IPv4) interface or Ethernet device emulation. | ||
11 | - Cisco HDLC, | ||
12 | - PPP (uses syncppp.c), | ||
13 | - X.25 (uses X.25 routines). | ||
14 | |||
15 | There are hardware drivers for the following cards: | ||
16 | - C101 by Moxa Technologies Co., Ltd. | ||
17 | - RISCom/N2 by SDL Communications Inc. | ||
18 | - and others, some not in the official kernel. | ||
19 | |||
20 | Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible | ||
21 | with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). | ||
22 | |||
23 | |||
24 | Make sure the hdlc.o and the hardware driver are loaded. It should | ||
25 | create a number of "hdlc" (hdlc0 etc) network devices, one for each | ||
26 | WAN port. You'll need the "sethdlc" utility, get it from: | ||
27 | http://hq.pm.waw.pl/hdlc/ | ||
28 | |||
29 | Compile sethdlc.c utility: | ||
30 | gcc -O2 -Wall -o sethdlc sethdlc.c | ||
31 | Make sure you're using a correct version of sethdlc for your kernel. | ||
32 | |||
33 | Use sethdlc to set physical interface, clock rate, HDLC mode used, | ||
34 | and add any required PVCs if using Frame Relay. | ||
35 | Usually you want something like: | ||
36 | |||
37 | sethdlc hdlc0 clock int rate 128000 | ||
38 | sethdlc hdlc0 cisco interval 10 timeout 25 | ||
39 | or | ||
40 | sethdlc hdlc0 rs232 clock ext | ||
41 | sethdlc hdlc0 fr lmi ansi | ||
42 | sethdlc hdlc0 create 99 | ||
43 | ifconfig hdlc0 up | ||
44 | ifconfig pvc0 localIP pointopoint remoteIP | ||
45 | |||
46 | In Frame Relay mode, ifconfig master hdlc device up (without assigning | ||
47 | any IP address to it) before using pvc devices. | ||
48 | |||
49 | |||
50 | Setting interface: | ||
51 | |||
52 | * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port | ||
53 | if the card has software-selectable interfaces | ||
54 | loopback - activate hardware loopback (for testing only) | ||
55 | * clock ext - external clock (uses DTE RX and TX clock) | ||
56 | * clock int - internal clock (provides clock signal on DCE clock output) | ||
57 | * clock txint - TX internal, RX external (provides TX clock on DCE output) | ||
58 | * clock txfromrx - TX clock derived from RX clock (TX clock on DCE output) | ||
59 | * rate - sets clock rate in bps (not required for external clock or | ||
60 | for txfromrx) | ||
61 | |||
62 | Setting protocol: | ||
63 | |||
64 | * hdlc - sets raw HDLC (IP-only) mode | ||
65 | nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code | ||
66 | no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu | ||
67 | crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity | ||
68 | |||
69 | * hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding | ||
70 | as above. | ||
71 | |||
72 | * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported) | ||
73 | interval - time in seconds between keepalive packets | ||
74 | timeout - time in seconds after last received keepalive packet before | ||
75 | we assume the link is down | ||
76 | |||
77 | * ppp - sets synchronous PPP mode | ||
78 | |||
79 | * x25 - sets X.25 mode | ||
80 | |||
81 | * fr - Frame Relay mode | ||
82 | lmi ansi / ccitt / none - LMI (link management) type | ||
83 | dce - Frame Relay DCE (network) side LMI instead of default DTE (user). | ||
84 | It has nothing to do with clocks! | ||
85 | t391 - link integrity verification polling timer (in seconds) - user | ||
86 | t392 - polling verification timer (in seconds) - network | ||
87 | n391 - full status polling counter - user | ||
88 | n392 - error threshold - both user and network | ||
89 | n393 - monitored events count - both user and network | ||
90 | |||
91 | Frame-Relay only: | ||
92 | * create n | delete n - adds / deletes PVC interface with DLCI #n. | ||
93 | Newly created interface will be named pvc0, pvc1 etc. | ||
94 | |||
95 | * create ether n | delete ether n - adds a device for Ethernet-bridged | ||
96 | frames. The device will be named pvceth0, pvceth1 etc. | ||
97 | |||
98 | |||
99 | |||
100 | |||
101 | Board-specific issues | ||
102 | --------------------- | ||
103 | |||
104 | n2.o and c101.o need parameters to work: | ||
105 | |||
106 | insmod n2 hw=io,irq,ram,ports[:io,irq,...] | ||
107 | example: | ||
108 | insmod n2 hw=0x300,10,0xD0000,01 | ||
109 | |||
110 | or | ||
111 | insmod c101 hw=irq,ram[:irq,...] | ||
112 | example: | ||
113 | insmod c101 hw=9,0xdc000 | ||
114 | |||
115 | If built into the kernel, these drivers need kernel (command line) parameters: | ||
116 | n2.hw=io,irq,ram,ports:... | ||
117 | or | ||
118 | c101.hw=irq,ram:... | ||
119 | |||
120 | |||
121 | |||
122 | If you have a problem with N2 or C101 card, you can issue the "private" | ||
123 | command to see port's packet descriptor rings (in kernel logs): | ||
124 | |||
125 | sethdlc hdlc0 private | ||
126 | |||
127 | The hardware driver has to be build with CONFIG_HDLC_DEBUG_RINGS. | ||
128 | Attaching this info to bug reports would be helpful. Anyway, let me know | ||
129 | if you have problems using this. | ||
130 | |||
131 | For patches and other info look at http://hq.pm.waw.pl/hdlc/ | ||
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c new file mode 100644 index 000000000000..f315d20d3867 --- /dev/null +++ b/Documentation/networking/ifenslave.c | |||
@@ -0,0 +1,1110 @@ | |||
1 | /* Mode: C; | ||
2 | * ifenslave.c: Configure network interfaces for parallel routing. | ||
3 | * | ||
4 | * This program controls the Linux implementation of running multiple | ||
5 | * network interfaces in parallel. | ||
6 | * | ||
7 | * Author: Donald Becker <becker@cesdis.gsfc.nasa.gov> | ||
8 | * Copyright 1994-1996 Donald Becker | ||
9 | * | ||
10 | * This program is free software; you can redistribute it | ||
11 | * and/or modify it under the terms of the GNU General Public | ||
12 | * License as published by the Free Software Foundation. | ||
13 | * | ||
14 | * The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O | ||
15 | * Center of Excellence in Space Data and Information Sciences | ||
16 | * Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771 | ||
17 | * | ||
18 | * Changes : | ||
19 | * - 2000/10/02 Willy Tarreau <willy at meta-x.org> : | ||
20 | * - few fixes. Master's MAC address is now correctly taken from | ||
21 | * the first device when not previously set ; | ||
22 | * - detach support : call BOND_RELEASE to detach an enslaved interface. | ||
23 | * - give a mini-howto from command-line help : # ifenslave -h | ||
24 | * | ||
25 | * - 2001/02/16 Chad N. Tindel <ctindel at ieee dot org> : | ||
26 | * - Master is now brought down before setting the MAC address. In | ||
27 | * the 2.4 kernel you can't change the MAC address while the device is | ||
28 | * up because you get EBUSY. | ||
29 | * | ||
30 | * - 2001/09/13 Takao Indoh <indou dot takao at jp dot fujitsu dot com> | ||
31 | * - Added the ability to change the active interface on a mode 1 bond | ||
32 | * at runtime. | ||
33 | * | ||
34 | * - 2001/10/23 Chad N. Tindel <ctindel at ieee dot org> : | ||
35 | * - No longer set the MAC address of the master. The bond device will | ||
36 | * take care of this itself | ||
37 | * - Try the SIOC*** versions of the bonding ioctls before using the | ||
38 | * old versions | ||
39 | * - 2002/02/18 Erik Habbinga <erik_habbinga @ hp dot com> : | ||
40 | * - ifr2.ifr_flags was not initialized in the hwaddr_notset case, | ||
41 | * SIOCGIFFLAGS now called before hwaddr_notset test | ||
42 | * | ||
43 | * - 2002/10/31 Tony Cureington <tony.cureington * hp_com> : | ||
44 | * - If the master does not have a hardware address when the first slave | ||
45 | * is enslaved, the master is assigned the hardware address of that | ||
46 | * slave - there is a comment in bonding.c stating "ifenslave takes | ||
47 | * care of this now." This corrects the problem of slaves having | ||
48 | * different hardware addresses in active-backup mode when | ||
49 | * multiple interfaces are specified on a single ifenslave command | ||
50 | * (ifenslave bond0 eth0 eth1). | ||
51 | * | ||
52 | * - 2003/03/18 - Tsippy Mendelson <tsippy.mendelson at intel dot com> and | ||
53 | * Shmulik Hen <shmulik.hen at intel dot com> | ||
54 | * - Moved setting the slave's mac address and openning it, from | ||
55 | * the application to the driver. This enables support of modes | ||
56 | * that need to use the unique mac address of each slave. | ||
57 | * The driver also takes care of closing the slave and restoring its | ||
58 | * original mac address upon release. | ||
59 | * In addition, block possibility of enslaving before the master is up. | ||
60 | * This prevents putting the system in an undefined state. | ||
61 | * | ||
62 | * - 2003/05/01 - Amir Noam <amir.noam at intel dot com> | ||
63 | * - Added ABI version control to restore compatibility between | ||
64 | * new/old ifenslave and new/old bonding. | ||
65 | * - Prevent adding an adapter that is already a slave. | ||
66 | * Fixes the problem of stalling the transmission and leaving | ||
67 | * the slave in a down state. | ||
68 | * | ||
69 | * - 2003/05/01 - Shmulik Hen <shmulik.hen at intel dot com> | ||
70 | * - Prevent enslaving if the bond device is down. | ||
71 | * Fixes the problem of leaving the system in unstable state and | ||
72 | * halting when trying to remove the module. | ||
73 | * - Close socket on all abnormal exists. | ||
74 | * - Add versioning scheme that follows that of the bonding driver. | ||
75 | * current version is 1.0.0 as a base line. | ||
76 | * | ||
77 | * - 2003/05/22 - Jay Vosburgh <fubar at us dot ibm dot com> | ||
78 | * - ifenslave -c was broken; it's now fixed | ||
79 | * - Fixed problem with routes vanishing from master during enslave | ||
80 | * processing. | ||
81 | * | ||
82 | * - 2003/05/27 - Amir Noam <amir.noam at intel dot com> | ||
83 | * - Fix backward compatibility issues: | ||
84 | * For drivers not using ABI versions, slave was set down while | ||
85 | * it should be left up before enslaving. | ||
86 | * Also, master was not set down and the default set_mac_address() | ||
87 | * would fail and generate an error message in the system log. | ||
88 | * - For opt_c: slave should not be set to the master's setting | ||
89 | * while it is running. It was already set during enslave. To | ||
90 | * simplify things, it is now handeled separately. | ||
91 | * | ||
92 | * - 2003/12/01 - Shmulik Hen <shmulik.hen at intel dot com> | ||
93 | * - Code cleanup and style changes | ||
94 | * set version to 1.1.0 | ||
95 | */ | ||
96 | |||
97 | #define APP_VERSION "1.1.0" | ||
98 | #define APP_RELDATE "December 1, 2003" | ||
99 | #define APP_NAME "ifenslave" | ||
100 | |||
101 | static char *version = | ||
102 | APP_NAME ".c:v" APP_VERSION " (" APP_RELDATE ")\n" | ||
103 | "o Donald Becker (becker@cesdis.gsfc.nasa.gov).\n" | ||
104 | "o Detach support added on 2000/10/02 by Willy Tarreau (willy at meta-x.org).\n" | ||
105 | "o 2.4 kernel support added on 2001/02/16 by Chad N. Tindel\n" | ||
106 | " (ctindel at ieee dot org).\n"; | ||
107 | |||
108 | static const char *usage_msg = | ||
109 | "Usage: ifenslave [-f] <master-if> <slave-if> [<slave-if>...]\n" | ||
110 | " ifenslave -d <master-if> <slave-if> [<slave-if>...]\n" | ||
111 | " ifenslave -c <master-if> <slave-if>\n" | ||
112 | " ifenslave --help\n"; | ||
113 | |||
114 | static const char *help_msg = | ||
115 | "\n" | ||
116 | " To create a bond device, simply follow these three steps :\n" | ||
117 | " - ensure that the required drivers are properly loaded :\n" | ||
118 | " # modprobe bonding ; modprobe <3c59x|eepro100|pcnet32|tulip|...>\n" | ||
119 | " - assign an IP address to the bond device :\n" | ||
120 | " # ifconfig bond0 <addr> netmask <mask> broadcast <bcast>\n" | ||
121 | " - attach all the interfaces you need to the bond device :\n" | ||
122 | " # ifenslave [{-f|--force}] bond0 eth0 [eth1 [eth2]...]\n" | ||
123 | " If bond0 didn't have a MAC address, it will take eth0's. Then, all\n" | ||
124 | " interfaces attached AFTER this assignment will get the same MAC addr.\n" | ||
125 | " (except for ALB/TLB modes)\n" | ||
126 | "\n" | ||
127 | " To set the bond device down and automatically release all the slaves :\n" | ||
128 | " # ifconfig bond0 down\n" | ||
129 | "\n" | ||
130 | " To detach a dead interface without setting the bond device down :\n" | ||
131 | " # ifenslave {-d|--detach} bond0 eth0 [eth1 [eth2]...]\n" | ||
132 | "\n" | ||
133 | " To change active slave :\n" | ||
134 | " # ifenslave {-c|--change-active} bond0 eth0\n" | ||
135 | "\n" | ||
136 | " To show master interface info\n" | ||
137 | " # ifenslave bond0\n" | ||
138 | "\n" | ||
139 | " To show all interfaces info\n" | ||
140 | " # ifenslave {-a|--all-interfaces}\n" | ||
141 | "\n" | ||
142 | " To be more verbose\n" | ||
143 | " # ifenslave {-v|--verbose} ...\n" | ||
144 | "\n" | ||
145 | " # ifenslave {-u|--usage} Show usage\n" | ||
146 | " # ifenslave {-V|--version} Show version\n" | ||
147 | " # ifenslave {-h|--help} This message\n" | ||
148 | "\n"; | ||
149 | |||
150 | #include <unistd.h> | ||
151 | #include <stdlib.h> | ||
152 | #include <stdio.h> | ||
153 | #include <ctype.h> | ||
154 | #include <string.h> | ||
155 | #include <errno.h> | ||
156 | #include <fcntl.h> | ||
157 | #include <getopt.h> | ||
158 | #include <sys/types.h> | ||
159 | #include <sys/socket.h> | ||
160 | #include <sys/ioctl.h> | ||
161 | #include <linux/if.h> | ||
162 | #include <net/if_arp.h> | ||
163 | #include <linux/if_ether.h> | ||
164 | #include <linux/if_bonding.h> | ||
165 | #include <linux/sockios.h> | ||
166 | |||
167 | typedef unsigned long long u64; /* hack, so we may include kernel's ethtool.h */ | ||
168 | typedef __uint32_t u32; /* ditto */ | ||
169 | typedef __uint16_t u16; /* ditto */ | ||
170 | typedef __uint8_t u8; /* ditto */ | ||
171 | #include <linux/ethtool.h> | ||
172 | |||
173 | struct option longopts[] = { | ||
174 | /* { name has_arg *flag val } */ | ||
175 | {"all-interfaces", 0, 0, 'a'}, /* Show all interfaces. */ | ||
176 | {"change-active", 0, 0, 'c'}, /* Change the active slave. */ | ||
177 | {"detach", 0, 0, 'd'}, /* Detach a slave interface. */ | ||
178 | {"force", 0, 0, 'f'}, /* Force the operation. */ | ||
179 | {"help", 0, 0, 'h'}, /* Give help */ | ||
180 | {"usage", 0, 0, 'u'}, /* Give usage */ | ||
181 | {"verbose", 0, 0, 'v'}, /* Report each action taken. */ | ||
182 | {"version", 0, 0, 'V'}, /* Emit version information. */ | ||
183 | { 0, 0, 0, 0} | ||
184 | }; | ||
185 | |||
186 | /* Command-line flags. */ | ||
187 | unsigned int | ||
188 | opt_a = 0, /* Show-all-interfaces flag. */ | ||
189 | opt_c = 0, /* Change-active-slave flag. */ | ||
190 | opt_d = 0, /* Detach a slave interface. */ | ||
191 | opt_f = 0, /* Force the operation. */ | ||
192 | opt_h = 0, /* Help */ | ||
193 | opt_u = 0, /* Usage */ | ||
194 | opt_v = 0, /* Verbose flag. */ | ||
195 | opt_V = 0; /* Version */ | ||
196 | |||
197 | int skfd = -1; /* AF_INET socket for ioctl() calls.*/ | ||
198 | int abi_ver = 0; /* userland - kernel ABI version */ | ||
199 | int hwaddr_set = 0; /* Master's hwaddr is set */ | ||
200 | int saved_errno; | ||
201 | |||
202 | struct ifreq master_mtu, master_flags, master_hwaddr; | ||
203 | struct ifreq slave_mtu, slave_flags, slave_hwaddr; | ||
204 | |||
205 | struct dev_ifr { | ||
206 | struct ifreq *req_ifr; | ||
207 | char *req_name; | ||
208 | int req_type; | ||
209 | }; | ||
210 | |||
211 | struct dev_ifr master_ifra[] = { | ||
212 | {&master_mtu, "SIOCGIFMTU", SIOCGIFMTU}, | ||
213 | {&master_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS}, | ||
214 | {&master_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR}, | ||
215 | {NULL, "", 0} | ||
216 | }; | ||
217 | |||
218 | struct dev_ifr slave_ifra[] = { | ||
219 | {&slave_mtu, "SIOCGIFMTU", SIOCGIFMTU}, | ||
220 | {&slave_flags, "SIOCGIFFLAGS", SIOCGIFFLAGS}, | ||
221 | {&slave_hwaddr, "SIOCGIFHWADDR", SIOCGIFHWADDR}, | ||
222 | {NULL, "", 0} | ||
223 | }; | ||
224 | |||
225 | static void if_print(char *ifname); | ||
226 | static int get_drv_info(char *master_ifname); | ||
227 | static int get_if_settings(char *ifname, struct dev_ifr ifra[]); | ||
228 | static int get_slave_flags(char *slave_ifname); | ||
229 | static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr); | ||
230 | static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr); | ||
231 | static int set_slave_mtu(char *slave_ifname, int mtu); | ||
232 | static int set_if_flags(char *ifname, short flags); | ||
233 | static int set_if_up(char *ifname, short flags); | ||
234 | static int set_if_down(char *ifname, short flags); | ||
235 | static int clear_if_addr(char *ifname); | ||
236 | static int set_if_addr(char *master_ifname, char *slave_ifname); | ||
237 | static int change_active(char *master_ifname, char *slave_ifname); | ||
238 | static int enslave(char *master_ifname, char *slave_ifname); | ||
239 | static int release(char *master_ifname, char *slave_ifname); | ||
240 | #define v_print(fmt, args...) \ | ||
241 | if (opt_v) \ | ||
242 | fprintf(stderr, fmt, ## args ) | ||
243 | |||
244 | int main(int argc, char *argv[]) | ||
245 | { | ||
246 | char **spp, *master_ifname, *slave_ifname; | ||
247 | int c, i, rv; | ||
248 | int res = 0; | ||
249 | int exclusive = 0; | ||
250 | |||
251 | while ((c = getopt_long(argc, argv, "acdfhuvV", longopts, 0)) != EOF) { | ||
252 | switch (c) { | ||
253 | case 'a': opt_a++; exclusive++; break; | ||
254 | case 'c': opt_c++; exclusive++; break; | ||
255 | case 'd': opt_d++; exclusive++; break; | ||
256 | case 'f': opt_f++; exclusive++; break; | ||
257 | case 'h': opt_h++; exclusive++; break; | ||
258 | case 'u': opt_u++; exclusive++; break; | ||
259 | case 'v': opt_v++; break; | ||
260 | case 'V': opt_V++; exclusive++; break; | ||
261 | |||
262 | case '?': | ||
263 | fprintf(stderr, usage_msg); | ||
264 | res = 2; | ||
265 | goto out; | ||
266 | } | ||
267 | } | ||
268 | |||
269 | /* options check */ | ||
270 | if (exclusive > 1) { | ||
271 | fprintf(stderr, usage_msg); | ||
272 | res = 2; | ||
273 | goto out; | ||
274 | } | ||
275 | |||
276 | if (opt_v || opt_V) { | ||
277 | printf(version); | ||
278 | if (opt_V) { | ||
279 | res = 0; | ||
280 | goto out; | ||
281 | } | ||
282 | } | ||
283 | |||
284 | if (opt_u) { | ||
285 | printf(usage_msg); | ||
286 | res = 0; | ||
287 | goto out; | ||
288 | } | ||
289 | |||
290 | if (opt_h) { | ||
291 | printf(usage_msg); | ||
292 | printf(help_msg); | ||
293 | res = 0; | ||
294 | goto out; | ||
295 | } | ||
296 | |||
297 | /* Open a basic socket */ | ||
298 | if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { | ||
299 | perror("socket"); | ||
300 | res = 1; | ||
301 | goto out; | ||
302 | } | ||
303 | |||
304 | if (opt_a) { | ||
305 | if (optind == argc) { | ||
306 | /* No remaining args */ | ||
307 | /* show all interfaces */ | ||
308 | if_print((char *)NULL); | ||
309 | goto out; | ||
310 | } else { | ||
311 | /* Just show usage */ | ||
312 | fprintf(stderr, usage_msg); | ||
313 | res = 2; | ||
314 | goto out; | ||
315 | } | ||
316 | } | ||
317 | |||
318 | /* Copy the interface name */ | ||
319 | spp = argv + optind; | ||
320 | master_ifname = *spp++; | ||
321 | |||
322 | if (master_ifname == NULL) { | ||
323 | fprintf(stderr, usage_msg); | ||
324 | res = 2; | ||
325 | goto out; | ||
326 | } | ||
327 | |||
328 | /* exchange abi version with bonding module */ | ||
329 | res = get_drv_info(master_ifname); | ||
330 | if (res) { | ||
331 | fprintf(stderr, | ||
332 | "Master '%s': Error: handshake with driver failed. " | ||
333 | "Aborting\n", | ||
334 | master_ifname); | ||
335 | goto out; | ||
336 | } | ||
337 | |||
338 | slave_ifname = *spp++; | ||
339 | |||
340 | if (slave_ifname == NULL) { | ||
341 | if (opt_d || opt_c) { | ||
342 | fprintf(stderr, usage_msg); | ||
343 | res = 2; | ||
344 | goto out; | ||
345 | } | ||
346 | |||
347 | /* A single arg means show the | ||
348 | * configuration for this interface | ||
349 | */ | ||
350 | if_print(master_ifname); | ||
351 | goto out; | ||
352 | } | ||
353 | |||
354 | res = get_if_settings(master_ifname, master_ifra); | ||
355 | if (res) { | ||
356 | /* Probably a good reason not to go on */ | ||
357 | fprintf(stderr, | ||
358 | "Master '%s': Error: get settings failed: %s. " | ||
359 | "Aborting\n", | ||
360 | master_ifname, strerror(res)); | ||
361 | goto out; | ||
362 | } | ||
363 | |||
364 | /* check if master is indeed a master; | ||
365 | * if not then fail any operation | ||
366 | */ | ||
367 | if (!(master_flags.ifr_flags & IFF_MASTER)) { | ||
368 | fprintf(stderr, | ||
369 | "Illegal operation; the specified interface '%s' " | ||
370 | "is not a master. Aborting\n", | ||
371 | master_ifname); | ||
372 | res = 1; | ||
373 | goto out; | ||
374 | } | ||
375 | |||
376 | /* check if master is up; if not then fail any operation */ | ||
377 | if (!(master_flags.ifr_flags & IFF_UP)) { | ||
378 | fprintf(stderr, | ||
379 | "Illegal operation; the specified master interface " | ||
380 | "'%s' is not up.\n", | ||
381 | master_ifname); | ||
382 | res = 1; | ||
383 | goto out; | ||
384 | } | ||
385 | |||
386 | /* Only for enslaving */ | ||
387 | if (!opt_c && !opt_d) { | ||
388 | sa_family_t master_family = master_hwaddr.ifr_hwaddr.sa_family; | ||
389 | unsigned char *hwaddr = | ||
390 | (unsigned char *)master_hwaddr.ifr_hwaddr.sa_data; | ||
391 | |||
392 | /* The family '1' is ARPHRD_ETHER for ethernet. */ | ||
393 | if (master_family != 1 && !opt_f) { | ||
394 | fprintf(stderr, | ||
395 | "Illegal operation: The specified master " | ||
396 | "interface '%s' is not ethernet-like.\n " | ||
397 | "This program is designed to work with " | ||
398 | "ethernet-like network interfaces.\n " | ||
399 | "Use the '-f' option to force the " | ||
400 | "operation.\n", | ||
401 | master_ifname); | ||
402 | res = 1; | ||
403 | goto out; | ||
404 | } | ||
405 | |||
406 | /* Check master's hw addr */ | ||
407 | for (i = 0; i < 6; i++) { | ||
408 | if (hwaddr[i] != 0) { | ||
409 | hwaddr_set = 1; | ||
410 | break; | ||
411 | } | ||
412 | } | ||
413 | |||
414 | if (hwaddr_set) { | ||
415 | v_print("current hardware address of master '%s' " | ||
416 | "is %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " | ||
417 | "type %d\n", | ||
418 | master_ifname, | ||
419 | hwaddr[0], hwaddr[1], | ||
420 | hwaddr[2], hwaddr[3], | ||
421 | hwaddr[4], hwaddr[5], | ||
422 | master_family); | ||
423 | } | ||
424 | } | ||
425 | |||
426 | /* Accepts only one slave */ | ||
427 | if (opt_c) { | ||
428 | /* change active slave */ | ||
429 | res = get_slave_flags(slave_ifname); | ||
430 | if (res) { | ||
431 | fprintf(stderr, | ||
432 | "Slave '%s': Error: get flags failed. " | ||
433 | "Aborting\n", | ||
434 | slave_ifname); | ||
435 | goto out; | ||
436 | } | ||
437 | res = change_active(master_ifname, slave_ifname); | ||
438 | if (res) { | ||
439 | fprintf(stderr, | ||
440 | "Master '%s', Slave '%s': Error: " | ||
441 | "Change active failed\n", | ||
442 | master_ifname, slave_ifname); | ||
443 | } | ||
444 | } else { | ||
445 | /* Accept multiple slaves */ | ||
446 | do { | ||
447 | if (opt_d) { | ||
448 | /* detach a slave interface from the master */ | ||
449 | rv = get_slave_flags(slave_ifname); | ||
450 | if (rv) { | ||
451 | /* Can't work with this slave. */ | ||
452 | /* remember the error and skip it*/ | ||
453 | fprintf(stderr, | ||
454 | "Slave '%s': Error: get flags " | ||
455 | "failed. Skipping\n", | ||
456 | slave_ifname); | ||
457 | res = rv; | ||
458 | continue; | ||
459 | } | ||
460 | rv = release(master_ifname, slave_ifname); | ||
461 | if (rv) { | ||
462 | fprintf(stderr, | ||
463 | "Master '%s', Slave '%s': Error: " | ||
464 | "Release failed\n", | ||
465 | master_ifname, slave_ifname); | ||
466 | res = rv; | ||
467 | } | ||
468 | } else { | ||
469 | /* attach a slave interface to the master */ | ||
470 | rv = get_if_settings(slave_ifname, slave_ifra); | ||
471 | if (rv) { | ||
472 | /* Can't work with this slave. */ | ||
473 | /* remember the error and skip it*/ | ||
474 | fprintf(stderr, | ||
475 | "Slave '%s': Error: get " | ||
476 | "settings failed: %s. " | ||
477 | "Skipping\n", | ||
478 | slave_ifname, strerror(rv)); | ||
479 | res = rv; | ||
480 | continue; | ||
481 | } | ||
482 | rv = enslave(master_ifname, slave_ifname); | ||
483 | if (rv) { | ||
484 | fprintf(stderr, | ||
485 | "Master '%s', Slave '%s': Error: " | ||
486 | "Enslave failed\n", | ||
487 | master_ifname, slave_ifname); | ||
488 | res = rv; | ||
489 | } | ||
490 | } | ||
491 | } while ((slave_ifname = *spp++) != NULL); | ||
492 | } | ||
493 | |||
494 | out: | ||
495 | if (skfd >= 0) { | ||
496 | close(skfd); | ||
497 | } | ||
498 | |||
499 | return res; | ||
500 | } | ||
501 | |||
502 | static short mif_flags; | ||
503 | |||
504 | /* Get the inteface configuration from the kernel. */ | ||
505 | static int if_getconfig(char *ifname) | ||
506 | { | ||
507 | struct ifreq ifr; | ||
508 | int metric, mtu; /* Parameters of the master interface. */ | ||
509 | struct sockaddr dstaddr, broadaddr, netmask; | ||
510 | unsigned char *hwaddr; | ||
511 | |||
512 | strcpy(ifr.ifr_name, ifname); | ||
513 | if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) | ||
514 | return -1; | ||
515 | mif_flags = ifr.ifr_flags; | ||
516 | printf("The result of SIOCGIFFLAGS on %s is %x.\n", | ||
517 | ifname, ifr.ifr_flags); | ||
518 | |||
519 | strcpy(ifr.ifr_name, ifname); | ||
520 | if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0) | ||
521 | return -1; | ||
522 | printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n", | ||
523 | ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1], | ||
524 | ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]); | ||
525 | |||
526 | strcpy(ifr.ifr_name, ifname); | ||
527 | if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) | ||
528 | return -1; | ||
529 | |||
530 | /* Gotta convert from 'char' to unsigned for printf(). */ | ||
531 | hwaddr = (unsigned char *)ifr.ifr_hwaddr.sa_data; | ||
532 | printf("The result of SIOCGIFHWADDR is type %d " | ||
533 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
534 | ifr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], | ||
535 | hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); | ||
536 | |||
537 | strcpy(ifr.ifr_name, ifname); | ||
538 | if (ioctl(skfd, SIOCGIFMETRIC, &ifr) < 0) { | ||
539 | metric = 0; | ||
540 | } else | ||
541 | metric = ifr.ifr_metric; | ||
542 | |||
543 | strcpy(ifr.ifr_name, ifname); | ||
544 | if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) | ||
545 | mtu = 0; | ||
546 | else | ||
547 | mtu = ifr.ifr_mtu; | ||
548 | |||
549 | strcpy(ifr.ifr_name, ifname); | ||
550 | if (ioctl(skfd, SIOCGIFDSTADDR, &ifr) < 0) { | ||
551 | memset(&dstaddr, 0, sizeof(struct sockaddr)); | ||
552 | } else | ||
553 | dstaddr = ifr.ifr_dstaddr; | ||
554 | |||
555 | strcpy(ifr.ifr_name, ifname); | ||
556 | if (ioctl(skfd, SIOCGIFBRDADDR, &ifr) < 0) { | ||
557 | memset(&broadaddr, 0, sizeof(struct sockaddr)); | ||
558 | } else | ||
559 | broadaddr = ifr.ifr_broadaddr; | ||
560 | |||
561 | strcpy(ifr.ifr_name, ifname); | ||
562 | if (ioctl(skfd, SIOCGIFNETMASK, &ifr) < 0) { | ||
563 | memset(&netmask, 0, sizeof(struct sockaddr)); | ||
564 | } else | ||
565 | netmask = ifr.ifr_netmask; | ||
566 | |||
567 | return 0; | ||
568 | } | ||
569 | |||
570 | static void if_print(char *ifname) | ||
571 | { | ||
572 | char buff[1024]; | ||
573 | struct ifconf ifc; | ||
574 | struct ifreq *ifr; | ||
575 | int i; | ||
576 | |||
577 | if (ifname == (char *)NULL) { | ||
578 | ifc.ifc_len = sizeof(buff); | ||
579 | ifc.ifc_buf = buff; | ||
580 | if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) { | ||
581 | perror("SIOCGIFCONF failed"); | ||
582 | return; | ||
583 | } | ||
584 | |||
585 | ifr = ifc.ifc_req; | ||
586 | for (i = ifc.ifc_len / sizeof(struct ifreq); --i >= 0; ifr++) { | ||
587 | if (if_getconfig(ifr->ifr_name) < 0) { | ||
588 | fprintf(stderr, | ||
589 | "%s: unknown interface.\n", | ||
590 | ifr->ifr_name); | ||
591 | continue; | ||
592 | } | ||
593 | |||
594 | if (((mif_flags & IFF_UP) == 0) && !opt_a) continue; | ||
595 | /*ife_print(&ife);*/ | ||
596 | } | ||
597 | } else { | ||
598 | if (if_getconfig(ifname) < 0) { | ||
599 | fprintf(stderr, | ||
600 | "%s: unknown interface.\n", ifname); | ||
601 | } | ||
602 | } | ||
603 | } | ||
604 | |||
605 | static int get_drv_info(char *master_ifname) | ||
606 | { | ||
607 | struct ifreq ifr; | ||
608 | struct ethtool_drvinfo info; | ||
609 | char *endptr; | ||
610 | |||
611 | memset(&ifr, 0, sizeof(ifr)); | ||
612 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
613 | ifr.ifr_data = (caddr_t)&info; | ||
614 | |||
615 | info.cmd = ETHTOOL_GDRVINFO; | ||
616 | strncpy(info.driver, "ifenslave", 32); | ||
617 | snprintf(info.fw_version, 32, "%d", BOND_ABI_VERSION); | ||
618 | |||
619 | if (ioctl(skfd, SIOCETHTOOL, &ifr) < 0) { | ||
620 | if (errno == EOPNOTSUPP) { | ||
621 | goto out; | ||
622 | } | ||
623 | |||
624 | saved_errno = errno; | ||
625 | v_print("Master '%s': Error: get bonding info failed %s\n", | ||
626 | master_ifname, strerror(saved_errno)); | ||
627 | return 1; | ||
628 | } | ||
629 | |||
630 | abi_ver = strtoul(info.fw_version, &endptr, 0); | ||
631 | if (*endptr) { | ||
632 | v_print("Master '%s': Error: got invalid string as an ABI " | ||
633 | "version from the bonding module\n", | ||
634 | master_ifname); | ||
635 | return 1; | ||
636 | } | ||
637 | |||
638 | out: | ||
639 | v_print("ABI ver is %d\n", abi_ver); | ||
640 | |||
641 | return 0; | ||
642 | } | ||
643 | |||
644 | static int change_active(char *master_ifname, char *slave_ifname) | ||
645 | { | ||
646 | struct ifreq ifr; | ||
647 | int res = 0; | ||
648 | |||
649 | if (!(slave_flags.ifr_flags & IFF_SLAVE)) { | ||
650 | fprintf(stderr, | ||
651 | "Illegal operation: The specified slave interface " | ||
652 | "'%s' is not a slave\n", | ||
653 | slave_ifname); | ||
654 | return 1; | ||
655 | } | ||
656 | |||
657 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
658 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
659 | if ((ioctl(skfd, SIOCBONDCHANGEACTIVE, &ifr) < 0) && | ||
660 | (ioctl(skfd, BOND_CHANGE_ACTIVE_OLD, &ifr) < 0)) { | ||
661 | saved_errno = errno; | ||
662 | v_print("Master '%s': Error: SIOCBONDCHANGEACTIVE failed: " | ||
663 | "%s\n", | ||
664 | master_ifname, strerror(saved_errno)); | ||
665 | res = 1; | ||
666 | } | ||
667 | |||
668 | return res; | ||
669 | } | ||
670 | |||
671 | static int enslave(char *master_ifname, char *slave_ifname) | ||
672 | { | ||
673 | struct ifreq ifr; | ||
674 | int res = 0; | ||
675 | |||
676 | if (slave_flags.ifr_flags & IFF_SLAVE) { | ||
677 | fprintf(stderr, | ||
678 | "Illegal operation: The specified slave interface " | ||
679 | "'%s' is already a slave\n", | ||
680 | slave_ifname); | ||
681 | return 1; | ||
682 | } | ||
683 | |||
684 | res = set_if_down(slave_ifname, slave_flags.ifr_flags); | ||
685 | if (res) { | ||
686 | fprintf(stderr, | ||
687 | "Slave '%s': Error: bring interface down failed\n", | ||
688 | slave_ifname); | ||
689 | return res; | ||
690 | } | ||
691 | |||
692 | if (abi_ver < 2) { | ||
693 | /* Older bonding versions would panic if the slave has no IP | ||
694 | * address, so get the IP setting from the master. | ||
695 | */ | ||
696 | res = set_if_addr(master_ifname, slave_ifname); | ||
697 | if (res) { | ||
698 | fprintf(stderr, | ||
699 | "Slave '%s': Error: set address failed\n", | ||
700 | slave_ifname); | ||
701 | return res; | ||
702 | } | ||
703 | } else { | ||
704 | res = clear_if_addr(slave_ifname); | ||
705 | if (res) { | ||
706 | fprintf(stderr, | ||
707 | "Slave '%s': Error: clear address failed\n", | ||
708 | slave_ifname); | ||
709 | return res; | ||
710 | } | ||
711 | } | ||
712 | |||
713 | if (master_mtu.ifr_mtu != slave_mtu.ifr_mtu) { | ||
714 | res = set_slave_mtu(slave_ifname, master_mtu.ifr_mtu); | ||
715 | if (res) { | ||
716 | fprintf(stderr, | ||
717 | "Slave '%s': Error: set MTU failed\n", | ||
718 | slave_ifname); | ||
719 | return res; | ||
720 | } | ||
721 | } | ||
722 | |||
723 | if (hwaddr_set) { | ||
724 | /* Master already has an hwaddr | ||
725 | * so set it's hwaddr to the slave | ||
726 | */ | ||
727 | if (abi_ver < 1) { | ||
728 | /* The driver is using an old ABI, so | ||
729 | * the application sets the slave's | ||
730 | * hwaddr | ||
731 | */ | ||
732 | res = set_slave_hwaddr(slave_ifname, | ||
733 | &(master_hwaddr.ifr_hwaddr)); | ||
734 | if (res) { | ||
735 | fprintf(stderr, | ||
736 | "Slave '%s': Error: set hw address " | ||
737 | "failed\n", | ||
738 | slave_ifname); | ||
739 | goto undo_mtu; | ||
740 | } | ||
741 | |||
742 | /* For old ABI the application needs to bring the | ||
743 | * slave back up | ||
744 | */ | ||
745 | res = set_if_up(slave_ifname, slave_flags.ifr_flags); | ||
746 | if (res) { | ||
747 | fprintf(stderr, | ||
748 | "Slave '%s': Error: bring interface " | ||
749 | "down failed\n", | ||
750 | slave_ifname); | ||
751 | goto undo_slave_mac; | ||
752 | } | ||
753 | } | ||
754 | /* The driver is using a new ABI, | ||
755 | * so the driver takes care of setting | ||
756 | * the slave's hwaddr and bringing | ||
757 | * it up again | ||
758 | */ | ||
759 | } else { | ||
760 | /* No hwaddr for master yet, so | ||
761 | * set the slave's hwaddr to it | ||
762 | */ | ||
763 | if (abi_ver < 1) { | ||
764 | /* For old ABI, the master needs to be | ||
765 | * down before setting it's hwaddr | ||
766 | */ | ||
767 | res = set_if_down(master_ifname, master_flags.ifr_flags); | ||
768 | if (res) { | ||
769 | fprintf(stderr, | ||
770 | "Master '%s': Error: bring interface " | ||
771 | "down failed\n", | ||
772 | master_ifname); | ||
773 | goto undo_mtu; | ||
774 | } | ||
775 | } | ||
776 | |||
777 | res = set_master_hwaddr(master_ifname, | ||
778 | &(slave_hwaddr.ifr_hwaddr)); | ||
779 | if (res) { | ||
780 | fprintf(stderr, | ||
781 | "Master '%s': Error: set hw address " | ||
782 | "failed\n", | ||
783 | master_ifname); | ||
784 | goto undo_mtu; | ||
785 | } | ||
786 | |||
787 | if (abi_ver < 1) { | ||
788 | /* For old ABI, bring the master | ||
789 | * back up | ||
790 | */ | ||
791 | res = set_if_up(master_ifname, master_flags.ifr_flags); | ||
792 | if (res) { | ||
793 | fprintf(stderr, | ||
794 | "Master '%s': Error: bring interface " | ||
795 | "up failed\n", | ||
796 | master_ifname); | ||
797 | goto undo_master_mac; | ||
798 | } | ||
799 | } | ||
800 | |||
801 | hwaddr_set = 1; | ||
802 | } | ||
803 | |||
804 | /* Do the real thing */ | ||
805 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
806 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
807 | if ((ioctl(skfd, SIOCBONDENSLAVE, &ifr) < 0) && | ||
808 | (ioctl(skfd, BOND_ENSLAVE_OLD, &ifr) < 0)) { | ||
809 | saved_errno = errno; | ||
810 | v_print("Master '%s': Error: SIOCBONDENSLAVE failed: %s\n", | ||
811 | master_ifname, strerror(saved_errno)); | ||
812 | res = 1; | ||
813 | } | ||
814 | |||
815 | if (res) { | ||
816 | goto undo_master_mac; | ||
817 | } | ||
818 | |||
819 | return 0; | ||
820 | |||
821 | /* rollback (best effort) */ | ||
822 | undo_master_mac: | ||
823 | set_master_hwaddr(master_ifname, &(master_hwaddr.ifr_hwaddr)); | ||
824 | hwaddr_set = 0; | ||
825 | goto undo_mtu; | ||
826 | undo_slave_mac: | ||
827 | set_slave_hwaddr(slave_ifname, &(slave_hwaddr.ifr_hwaddr)); | ||
828 | undo_mtu: | ||
829 | set_slave_mtu(slave_ifname, slave_mtu.ifr_mtu); | ||
830 | return res; | ||
831 | } | ||
832 | |||
833 | static int release(char *master_ifname, char *slave_ifname) | ||
834 | { | ||
835 | struct ifreq ifr; | ||
836 | int res = 0; | ||
837 | |||
838 | if (!(slave_flags.ifr_flags & IFF_SLAVE)) { | ||
839 | fprintf(stderr, | ||
840 | "Illegal operation: The specified slave interface " | ||
841 | "'%s' is not a slave\n", | ||
842 | slave_ifname); | ||
843 | return 1; | ||
844 | } | ||
845 | |||
846 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
847 | strncpy(ifr.ifr_slave, slave_ifname, IFNAMSIZ); | ||
848 | if ((ioctl(skfd, SIOCBONDRELEASE, &ifr) < 0) && | ||
849 | (ioctl(skfd, BOND_RELEASE_OLD, &ifr) < 0)) { | ||
850 | saved_errno = errno; | ||
851 | v_print("Master '%s': Error: SIOCBONDRELEASE failed: %s\n", | ||
852 | master_ifname, strerror(saved_errno)); | ||
853 | return 1; | ||
854 | } else if (abi_ver < 1) { | ||
855 | /* The driver is using an old ABI, so we'll set the interface | ||
856 | * down to avoid any conflicts due to same MAC/IP | ||
857 | */ | ||
858 | res = set_if_down(slave_ifname, slave_flags.ifr_flags); | ||
859 | if (res) { | ||
860 | fprintf(stderr, | ||
861 | "Slave '%s': Error: bring interface " | ||
862 | "down failed\n", | ||
863 | slave_ifname); | ||
864 | } | ||
865 | } | ||
866 | |||
867 | /* set to default mtu */ | ||
868 | set_slave_mtu(slave_ifname, 1500); | ||
869 | |||
870 | return res; | ||
871 | } | ||
872 | |||
873 | static int get_if_settings(char *ifname, struct dev_ifr ifra[]) | ||
874 | { | ||
875 | int i; | ||
876 | int res = 0; | ||
877 | |||
878 | for (i = 0; ifra[i].req_ifr; i++) { | ||
879 | strncpy(ifra[i].req_ifr->ifr_name, ifname, IFNAMSIZ); | ||
880 | res = ioctl(skfd, ifra[i].req_type, ifra[i].req_ifr); | ||
881 | if (res < 0) { | ||
882 | saved_errno = errno; | ||
883 | v_print("Interface '%s': Error: %s failed: %s\n", | ||
884 | ifname, ifra[i].req_name, | ||
885 | strerror(saved_errno)); | ||
886 | |||
887 | return saved_errno; | ||
888 | } | ||
889 | } | ||
890 | |||
891 | return 0; | ||
892 | } | ||
893 | |||
894 | static int get_slave_flags(char *slave_ifname) | ||
895 | { | ||
896 | int res = 0; | ||
897 | |||
898 | strncpy(slave_flags.ifr_name, slave_ifname, IFNAMSIZ); | ||
899 | res = ioctl(skfd, SIOCGIFFLAGS, &slave_flags); | ||
900 | if (res < 0) { | ||
901 | saved_errno = errno; | ||
902 | v_print("Slave '%s': Error: SIOCGIFFLAGS failed: %s\n", | ||
903 | slave_ifname, strerror(saved_errno)); | ||
904 | } else { | ||
905 | v_print("Slave %s: flags %04X.\n", | ||
906 | slave_ifname, slave_flags.ifr_flags); | ||
907 | } | ||
908 | |||
909 | return res; | ||
910 | } | ||
911 | |||
912 | static int set_master_hwaddr(char *master_ifname, struct sockaddr *hwaddr) | ||
913 | { | ||
914 | unsigned char *addr = (unsigned char *)hwaddr->sa_data; | ||
915 | struct ifreq ifr; | ||
916 | int res = 0; | ||
917 | |||
918 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
919 | memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr)); | ||
920 | res = ioctl(skfd, SIOCSIFHWADDR, &ifr); | ||
921 | if (res < 0) { | ||
922 | saved_errno = errno; | ||
923 | v_print("Master '%s': Error: SIOCSIFHWADDR failed: %s\n", | ||
924 | master_ifname, strerror(saved_errno)); | ||
925 | return res; | ||
926 | } else { | ||
927 | v_print("Master '%s': hardware address set to " | ||
928 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
929 | master_ifname, addr[0], addr[1], addr[2], | ||
930 | addr[3], addr[4], addr[5]); | ||
931 | } | ||
932 | |||
933 | return res; | ||
934 | } | ||
935 | |||
936 | static int set_slave_hwaddr(char *slave_ifname, struct sockaddr *hwaddr) | ||
937 | { | ||
938 | unsigned char *addr = (unsigned char *)hwaddr->sa_data; | ||
939 | struct ifreq ifr; | ||
940 | int res = 0; | ||
941 | |||
942 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
943 | memcpy(&(ifr.ifr_hwaddr), hwaddr, sizeof(struct sockaddr)); | ||
944 | res = ioctl(skfd, SIOCSIFHWADDR, &ifr); | ||
945 | if (res < 0) { | ||
946 | saved_errno = errno; | ||
947 | |||
948 | v_print("Slave '%s': Error: SIOCSIFHWADDR failed: %s\n", | ||
949 | slave_ifname, strerror(saved_errno)); | ||
950 | |||
951 | if (saved_errno == EBUSY) { | ||
952 | v_print(" The device is busy: it must be idle " | ||
953 | "before running this command.\n"); | ||
954 | } else if (saved_errno == EOPNOTSUPP) { | ||
955 | v_print(" The device does not support setting " | ||
956 | "the MAC address.\n" | ||
957 | " Your kernel likely does not support slave " | ||
958 | "devices.\n"); | ||
959 | } else if (saved_errno == EINVAL) { | ||
960 | v_print(" The device's address type does not match " | ||
961 | "the master's address type.\n"); | ||
962 | } | ||
963 | return res; | ||
964 | } else { | ||
965 | v_print("Slave '%s': hardware address set to " | ||
966 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", | ||
967 | slave_ifname, addr[0], addr[1], addr[2], | ||
968 | addr[3], addr[4], addr[5]); | ||
969 | } | ||
970 | |||
971 | return res; | ||
972 | } | ||
973 | |||
974 | static int set_slave_mtu(char *slave_ifname, int mtu) | ||
975 | { | ||
976 | struct ifreq ifr; | ||
977 | int res = 0; | ||
978 | |||
979 | ifr.ifr_mtu = mtu; | ||
980 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
981 | |||
982 | res = ioctl(skfd, SIOCSIFMTU, &ifr); | ||
983 | if (res < 0) { | ||
984 | saved_errno = errno; | ||
985 | v_print("Slave '%s': Error: SIOCSIFMTU failed: %s\n", | ||
986 | slave_ifname, strerror(saved_errno)); | ||
987 | } else { | ||
988 | v_print("Slave '%s': MTU set to %d.\n", slave_ifname, mtu); | ||
989 | } | ||
990 | |||
991 | return res; | ||
992 | } | ||
993 | |||
994 | static int set_if_flags(char *ifname, short flags) | ||
995 | { | ||
996 | struct ifreq ifr; | ||
997 | int res = 0; | ||
998 | |||
999 | ifr.ifr_flags = flags; | ||
1000 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ); | ||
1001 | |||
1002 | res = ioctl(skfd, SIOCSIFFLAGS, &ifr); | ||
1003 | if (res < 0) { | ||
1004 | saved_errno = errno; | ||
1005 | v_print("Interface '%s': Error: SIOCSIFFLAGS failed: %s\n", | ||
1006 | ifname, strerror(saved_errno)); | ||
1007 | } else { | ||
1008 | v_print("Interface '%s': flags set to %04X.\n", ifname, flags); | ||
1009 | } | ||
1010 | |||
1011 | return res; | ||
1012 | } | ||
1013 | |||
1014 | static int set_if_up(char *ifname, short flags) | ||
1015 | { | ||
1016 | return set_if_flags(ifname, flags | IFF_UP); | ||
1017 | } | ||
1018 | |||
1019 | static int set_if_down(char *ifname, short flags) | ||
1020 | { | ||
1021 | return set_if_flags(ifname, flags & ~IFF_UP); | ||
1022 | } | ||
1023 | |||
1024 | static int clear_if_addr(char *ifname) | ||
1025 | { | ||
1026 | struct ifreq ifr; | ||
1027 | int res = 0; | ||
1028 | |||
1029 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ); | ||
1030 | ifr.ifr_addr.sa_family = AF_INET; | ||
1031 | memset(ifr.ifr_addr.sa_data, 0, sizeof(ifr.ifr_addr.sa_data)); | ||
1032 | |||
1033 | res = ioctl(skfd, SIOCSIFADDR, &ifr); | ||
1034 | if (res < 0) { | ||
1035 | saved_errno = errno; | ||
1036 | v_print("Interface '%s': Error: SIOCSIFADDR failed: %s\n", | ||
1037 | ifname, strerror(saved_errno)); | ||
1038 | } else { | ||
1039 | v_print("Interface '%s': address cleared\n", ifname); | ||
1040 | } | ||
1041 | |||
1042 | return res; | ||
1043 | } | ||
1044 | |||
1045 | static int set_if_addr(char *master_ifname, char *slave_ifname) | ||
1046 | { | ||
1047 | struct ifreq ifr; | ||
1048 | int res; | ||
1049 | unsigned char *ipaddr; | ||
1050 | int i; | ||
1051 | struct { | ||
1052 | char *req_name; | ||
1053 | char *desc; | ||
1054 | int g_ioctl; | ||
1055 | int s_ioctl; | ||
1056 | } ifra[] = { | ||
1057 | {"IFADDR", "addr", SIOCGIFADDR, SIOCSIFADDR}, | ||
1058 | {"DSTADDR", "destination addr", SIOCGIFDSTADDR, SIOCSIFDSTADDR}, | ||
1059 | {"BRDADDR", "broadcast addr", SIOCGIFBRDADDR, SIOCSIFBRDADDR}, | ||
1060 | {"NETMASK", "netmask", SIOCGIFNETMASK, SIOCSIFNETMASK}, | ||
1061 | {NULL, NULL, 0, 0}, | ||
1062 | }; | ||
1063 | |||
1064 | for (i = 0; ifra[i].req_name; i++) { | ||
1065 | strncpy(ifr.ifr_name, master_ifname, IFNAMSIZ); | ||
1066 | res = ioctl(skfd, ifra[i].g_ioctl, &ifr); | ||
1067 | if (res < 0) { | ||
1068 | int saved_errno = errno; | ||
1069 | |||
1070 | v_print("Interface '%s': Error: SIOCG%s failed: %s\n", | ||
1071 | master_ifname, ifra[i].req_name, | ||
1072 | strerror(saved_errno)); | ||
1073 | |||
1074 | ifr.ifr_addr.sa_family = AF_INET; | ||
1075 | memset(ifr.ifr_addr.sa_data, 0, | ||
1076 | sizeof(ifr.ifr_addr.sa_data)); | ||
1077 | } | ||
1078 | |||
1079 | strncpy(ifr.ifr_name, slave_ifname, IFNAMSIZ); | ||
1080 | res = ioctl(skfd, ifra[i].s_ioctl, &ifr); | ||
1081 | if (res < 0) { | ||
1082 | int saved_errno = errno; | ||
1083 | |||
1084 | v_print("Interface '%s': Error: SIOCS%s failed: %s\n", | ||
1085 | slave_ifname, ifra[i].req_name, | ||
1086 | strerror(saved_errno)); | ||
1087 | |||
1088 | return res; | ||
1089 | } | ||
1090 | |||
1091 | ipaddr = ifr.ifr_addr.sa_data; | ||
1092 | v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", | ||
1093 | slave_ifname, ifra[i].desc, | ||
1094 | ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); | ||
1095 | } | ||
1096 | |||
1097 | return 0; | ||
1098 | } | ||
1099 | |||
1100 | /* | ||
1101 | * Local variables: | ||
1102 | * version-control: t | ||
1103 | * kept-new-versions: 5 | ||
1104 | * c-indent-level: 4 | ||
1105 | * c-basic-offset: 4 | ||
1106 | * tab-width: 4 | ||
1107 | * compile-command: "gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave" | ||
1108 | * End: | ||
1109 | */ | ||
1110 | |||
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt new file mode 100644 index 000000000000..a2c893a7475d --- /dev/null +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -0,0 +1,878 @@ | |||
1 | /proc/sys/net/ipv4/* Variables: | ||
2 | |||
3 | ip_forward - BOOLEAN | ||
4 | 0 - disabled (default) | ||
5 | not 0 - enabled | ||
6 | |||
7 | Forward Packets between interfaces. | ||
8 | |||
9 | This variable is special, its change resets all configuration | ||
10 | parameters to their default state (RFC1122 for hosts, RFC1812 | ||
11 | for routers) | ||
12 | |||
13 | ip_default_ttl - INTEGER | ||
14 | default 64 | ||
15 | |||
16 | ip_no_pmtu_disc - BOOLEAN | ||
17 | Disable Path MTU Discovery. | ||
18 | default FALSE | ||
19 | |||
20 | min_pmtu - INTEGER | ||
21 | default 562 - minimum discovered Path MTU | ||
22 | |||
23 | mtu_expires - INTEGER | ||
24 | Time, in seconds, that cached PMTU information is kept. | ||
25 | |||
26 | min_adv_mss - INTEGER | ||
27 | The advertised MSS depends on the first hop route MTU, but will | ||
28 | never be lower than this setting. | ||
29 | |||
30 | IP Fragmentation: | ||
31 | |||
32 | ipfrag_high_thresh - INTEGER | ||
33 | Maximum memory used to reassemble IP fragments. When | ||
34 | ipfrag_high_thresh bytes of memory is allocated for this purpose, | ||
35 | the fragment handler will toss packets until ipfrag_low_thresh | ||
36 | is reached. | ||
37 | |||
38 | ipfrag_low_thresh - INTEGER | ||
39 | See ipfrag_high_thresh | ||
40 | |||
41 | ipfrag_time - INTEGER | ||
42 | Time in seconds to keep an IP fragment in memory. | ||
43 | |||
44 | ipfrag_secret_interval - INTEGER | ||
45 | Regeneration interval (in seconds) of the hash secret (or lifetime | ||
46 | for the hash secret) for IP fragments. | ||
47 | Default: 600 | ||
48 | |||
49 | INET peer storage: | ||
50 | |||
51 | inet_peer_threshold - INTEGER | ||
52 | The approximate size of the storage. Starting from this threshold | ||
53 | entries will be thrown aggressively. This threshold also determines | ||
54 | entries' time-to-live and time intervals between garbage collection | ||
55 | passes. More entries, less time-to-live, less GC interval. | ||
56 | |||
57 | inet_peer_minttl - INTEGER | ||
58 | Minimum time-to-live of entries. Should be enough to cover fragment | ||
59 | time-to-live on the reassembling side. This minimum time-to-live is | ||
60 | guaranteed if the pool size is less than inet_peer_threshold. | ||
61 | Measured in jiffies(1). | ||
62 | |||
63 | inet_peer_maxttl - INTEGER | ||
64 | Maximum time-to-live of entries. Unused entries will expire after | ||
65 | this period of time if there is no memory pressure on the pool (i.e. | ||
66 | when the number of entries in the pool is very small). | ||
67 | Measured in jiffies(1). | ||
68 | |||
69 | inet_peer_gc_mintime - INTEGER | ||
70 | Minimum interval between garbage collection passes. This interval is | ||
71 | in effect under high memory pressure on the pool. | ||
72 | Measured in jiffies(1). | ||
73 | |||
74 | inet_peer_gc_maxtime - INTEGER | ||
75 | Minimum interval between garbage collection passes. This interval is | ||
76 | in effect under low (or absent) memory pressure on the pool. | ||
77 | Measured in jiffies(1). | ||
78 | |||
79 | TCP variables: | ||
80 | |||
81 | tcp_syn_retries - INTEGER | ||
82 | Number of times initial SYNs for an active TCP connection attempt | ||
83 | will be retransmitted. Should not be higher than 255. Default value | ||
84 | is 5, which corresponds to ~180seconds. | ||
85 | |||
86 | tcp_synack_retries - INTEGER | ||
87 | Number of times SYNACKs for a passive TCP connection attempt will | ||
88 | be retransmitted. Should not be higher than 255. Default value | ||
89 | is 5, which corresponds to ~180seconds. | ||
90 | |||
91 | tcp_keepalive_time - INTEGER | ||
92 | How often TCP sends out keepalive messages when keepalive is enabled. | ||
93 | Default: 2hours. | ||
94 | |||
95 | tcp_keepalive_probes - INTEGER | ||
96 | How many keepalive probes TCP sends out, until it decides that the | ||
97 | connection is broken. Default value: 9. | ||
98 | |||
99 | tcp_keepalive_intvl - INTEGER | ||
100 | How frequently the probes are send out. Multiplied by | ||
101 | tcp_keepalive_probes it is time to kill not responding connection, | ||
102 | after probes started. Default value: 75sec i.e. connection | ||
103 | will be aborted after ~11 minutes of retries. | ||
104 | |||
105 | tcp_retries1 - INTEGER | ||
106 | How many times to retry before deciding that something is wrong | ||
107 | and it is necessary to report this suspicion to network layer. | ||
108 | Minimal RFC value is 3, it is default, which corresponds | ||
109 | to ~3sec-8min depending on RTO. | ||
110 | |||
111 | tcp_retries2 - INTEGER | ||
112 | How may times to retry before killing alive TCP connection. | ||
113 | RFC1122 says that the limit should be longer than 100 sec. | ||
114 | It is too small number. Default value 15 corresponds to ~13-30min | ||
115 | depending on RTO. | ||
116 | |||
117 | tcp_orphan_retries - INTEGER | ||
118 | How may times to retry before killing TCP connection, closed | ||
119 | by our side. Default value 7 corresponds to ~50sec-16min | ||
120 | depending on RTO. If you machine is loaded WEB server, | ||
121 | you should think about lowering this value, such sockets | ||
122 | may consume significant resources. Cf. tcp_max_orphans. | ||
123 | |||
124 | tcp_fin_timeout - INTEGER | ||
125 | Time to hold socket in state FIN-WAIT-2, if it was closed | ||
126 | by our side. Peer can be broken and never close its side, | ||
127 | or even died unexpectedly. Default value is 60sec. | ||
128 | Usual value used in 2.2 was 180 seconds, you may restore | ||
129 | it, but remember that if your machine is even underloaded WEB server, | ||
130 | you risk to overflow memory with kilotons of dead sockets, | ||
131 | FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1, | ||
132 | because they eat maximum 1.5K of memory, but they tend | ||
133 | to live longer. Cf. tcp_max_orphans. | ||
134 | |||
135 | tcp_max_tw_buckets - INTEGER | ||
136 | Maximal number of timewait sockets held by system simultaneously. | ||
137 | If this number is exceeded time-wait socket is immediately destroyed | ||
138 | and warning is printed. This limit exists only to prevent | ||
139 | simple DoS attacks, you _must_ not lower the limit artificially, | ||
140 | but rather increase it (probably, after increasing installed memory), | ||
141 | if network conditions require more than default value. | ||
142 | |||
143 | tcp_tw_recycle - BOOLEAN | ||
144 | Enable fast recycling TIME-WAIT sockets. Default value is 0. | ||
145 | It should not be changed without advice/request of technical | ||
146 | experts. | ||
147 | |||
148 | tcp_tw_reuse - BOOLEAN | ||
149 | Allow to reuse TIME-WAIT sockets for new connections when it is | ||
150 | safe from protocol viewpoint. Default value is 0. | ||
151 | It should not be changed without advice/request of technical | ||
152 | experts. | ||
153 | |||
154 | tcp_max_orphans - INTEGER | ||
155 | Maximal number of TCP sockets not attached to any user file handle, | ||
156 | held by system. If this number is exceeded orphaned connections are | ||
157 | reset immediately and warning is printed. This limit exists | ||
158 | only to prevent simple DoS attacks, you _must_ not rely on this | ||
159 | or lower the limit artificially, but rather increase it | ||
160 | (probably, after increasing installed memory), | ||
161 | if network conditions require more than default value, | ||
162 | and tune network services to linger and kill such states | ||
163 | more aggressively. Let me to remind again: each orphan eats | ||
164 | up to ~64K of unswappable memory. | ||
165 | |||
166 | tcp_abort_on_overflow - BOOLEAN | ||
167 | If listening service is too slow to accept new connections, | ||
168 | reset them. Default state is FALSE. It means that if overflow | ||
169 | occurred due to a burst, connection will recover. Enable this | ||
170 | option _only_ if you are really sure that listening daemon | ||
171 | cannot be tuned to accept connections faster. Enabling this | ||
172 | option can harm clients of your server. | ||
173 | |||
174 | tcp_syncookies - BOOLEAN | ||
175 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES | ||
176 | Send out syncookies when the syn backlog queue of a socket | ||
177 | overflows. This is to prevent against the common 'syn flood attack' | ||
178 | Default: FALSE | ||
179 | |||
180 | Note, that syncookies is fallback facility. | ||
181 | It MUST NOT be used to help highly loaded servers to stand | ||
182 | against legal connection rate. If you see synflood warnings | ||
183 | in your logs, but investigation shows that they occur | ||
184 | because of overload with legal connections, you should tune | ||
185 | another parameters until this warning disappear. | ||
186 | See: tcp_max_syn_backlog, tcp_synack_retries, tcp_abort_on_overflow. | ||
187 | |||
188 | syncookies seriously violate TCP protocol, do not allow | ||
189 | to use TCP extensions, can result in serious degradation | ||
190 | of some services (f.e. SMTP relaying), visible not by you, | ||
191 | but your clients and relays, contacting you. While you see | ||
192 | synflood warnings in logs not being really flooded, your server | ||
193 | is seriously misconfigured. | ||
194 | |||
195 | tcp_stdurg - BOOLEAN | ||
196 | Use the Host requirements interpretation of the TCP urg pointer field. | ||
197 | Most hosts use the older BSD interpretation, so if you turn this on | ||
198 | Linux might not communicate correctly with them. | ||
199 | Default: FALSE | ||
200 | |||
201 | tcp_max_syn_backlog - INTEGER | ||
202 | Maximal number of remembered connection requests, which are | ||
203 | still did not receive an acknowledgment from connecting client. | ||
204 | Default value is 1024 for systems with more than 128Mb of memory, | ||
205 | and 128 for low memory machines. If server suffers of overload, | ||
206 | try to increase this number. | ||
207 | |||
208 | tcp_window_scaling - BOOLEAN | ||
209 | Enable window scaling as defined in RFC1323. | ||
210 | |||
211 | tcp_timestamps - BOOLEAN | ||
212 | Enable timestamps as defined in RFC1323. | ||
213 | |||
214 | tcp_sack - BOOLEAN | ||
215 | Enable select acknowledgments (SACKS). | ||
216 | |||
217 | tcp_fack - BOOLEAN | ||
218 | Enable FACK congestion avoidance and fast retransmission. | ||
219 | The value is not used, if tcp_sack is not enabled. | ||
220 | |||
221 | tcp_dsack - BOOLEAN | ||
222 | Allows TCP to send "duplicate" SACKs. | ||
223 | |||
224 | tcp_ecn - BOOLEAN | ||
225 | Enable Explicit Congestion Notification in TCP. | ||
226 | |||
227 | tcp_reordering - INTEGER | ||
228 | Maximal reordering of packets in a TCP stream. | ||
229 | Default: 3 | ||
230 | |||
231 | tcp_retrans_collapse - BOOLEAN | ||
232 | Bug-to-bug compatibility with some broken printers. | ||
233 | On retransmit try to send bigger packets to work around bugs in | ||
234 | certain TCP stacks. | ||
235 | |||
236 | tcp_wmem - vector of 3 INTEGERs: min, default, max | ||
237 | min: Amount of memory reserved for send buffers for TCP socket. | ||
238 | Each TCP socket has rights to use it due to fact of its birth. | ||
239 | Default: 4K | ||
240 | |||
241 | default: Amount of memory allowed for send buffers for TCP socket | ||
242 | by default. This value overrides net.core.wmem_default used | ||
243 | by other protocols, it is usually lower than net.core.wmem_default. | ||
244 | Default: 16K | ||
245 | |||
246 | max: Maximal amount of memory allowed for automatically selected | ||
247 | send buffers for TCP socket. This value does not override | ||
248 | net.core.wmem_max, "static" selection via SO_SNDBUF does not use this. | ||
249 | Default: 128K | ||
250 | |||
251 | tcp_rmem - vector of 3 INTEGERs: min, default, max | ||
252 | min: Minimal size of receive buffer used by TCP sockets. | ||
253 | It is guaranteed to each TCP socket, even under moderate memory | ||
254 | pressure. | ||
255 | Default: 8K | ||
256 | |||
257 | default: default size of receive buffer used by TCP sockets. | ||
258 | This value overrides net.core.rmem_default used by other protocols. | ||
259 | Default: 87380 bytes. This value results in window of 65535 with | ||
260 | default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit | ||
261 | less for default tcp_app_win. See below about these variables. | ||
262 | |||
263 | max: maximal size of receive buffer allowed for automatically | ||
264 | selected receiver buffers for TCP socket. This value does not override | ||
265 | net.core.rmem_max, "static" selection via SO_RCVBUF does not use this. | ||
266 | Default: 87380*2 bytes. | ||
267 | |||
268 | tcp_mem - vector of 3 INTEGERs: min, pressure, max | ||
269 | low: below this number of pages TCP is not bothered about its | ||
270 | memory appetite. | ||
271 | |||
272 | pressure: when amount of memory allocated by TCP exceeds this number | ||
273 | of pages, TCP moderates its memory consumption and enters memory | ||
274 | pressure mode, which is exited when memory consumption falls | ||
275 | under "low". | ||
276 | |||
277 | high: number of pages allowed for queueing by all TCP sockets. | ||
278 | |||
279 | Defaults are calculated at boot time from amount of available | ||
280 | memory. | ||
281 | |||
282 | tcp_app_win - INTEGER | ||
283 | Reserve max(window/2^tcp_app_win, mss) of window for application | ||
284 | buffer. Value 0 is special, it means that nothing is reserved. | ||
285 | Default: 31 | ||
286 | |||
287 | tcp_adv_win_scale - INTEGER | ||
288 | Count buffering overhead as bytes/2^tcp_adv_win_scale | ||
289 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), | ||
290 | if it is <= 0. | ||
291 | Default: 2 | ||
292 | |||
293 | tcp_rfc1337 - BOOLEAN | ||
294 | If set, the TCP stack behaves conforming to RFC1337. If unset, | ||
295 | we are not conforming to RFC, but prevent TCP TIME_WAIT | ||
296 | assassination. | ||
297 | Default: 0 | ||
298 | |||
299 | tcp_low_latency - BOOLEAN | ||
300 | If set, the TCP stack makes decisions that prefer lower | ||
301 | latency as opposed to higher throughput. By default, this | ||
302 | option is not set meaning that higher throughput is preferred. | ||
303 | An example of an application where this default should be | ||
304 | changed would be a Beowulf compute cluster. | ||
305 | Default: 0 | ||
306 | |||
307 | tcp_westwood - BOOLEAN | ||
308 | Enable TCP Westwood+ congestion control algorithm. | ||
309 | TCP Westwood+ is a sender-side only modification of the TCP Reno | ||
310 | protocol stack that optimizes the performance of TCP congestion | ||
311 | control. It is based on end-to-end bandwidth estimation to set | ||
312 | congestion window and slow start threshold after a congestion | ||
313 | episode. Using this estimation, TCP Westwood+ adaptively sets a | ||
314 | slow start threshold and a congestion window which takes into | ||
315 | account the bandwidth used at the time congestion is experienced. | ||
316 | TCP Westwood+ significantly increases fairness wrt TCP Reno in | ||
317 | wired networks and throughput over wireless links. | ||
318 | Default: 0 | ||
319 | |||
320 | tcp_vegas_cong_avoid - BOOLEAN | ||
321 | Enable TCP Vegas congestion avoidance algorithm. | ||
322 | TCP Vegas is a sender-side only change to TCP that anticipates | ||
323 | the onset of congestion by estimating the bandwidth. TCP Vegas | ||
324 | adjusts the sending rate by modifying the congestion | ||
325 | window. TCP Vegas should provide less packet loss, but it is | ||
326 | not as aggressive as TCP Reno. | ||
327 | Default:0 | ||
328 | |||
329 | tcp_bic - BOOLEAN | ||
330 | Enable BIC TCP congestion control algorithm. | ||
331 | BIC-TCP is a sender-side only change that ensures a linear RTT | ||
332 | fairness under large windows while offering both scalability and | ||
333 | bounded TCP-friendliness. The protocol combines two schemes | ||
334 | called additive increase and binary search increase. When the | ||
335 | congestion window is large, additive increase with a large | ||
336 | increment ensures linear RTT fairness as well as good | ||
337 | scalability. Under small congestion windows, binary search | ||
338 | increase provides TCP friendliness. | ||
339 | Default: 0 | ||
340 | |||
341 | tcp_bic_low_window - INTEGER | ||
342 | Sets the threshold window (in packets) where BIC TCP starts to | ||
343 | adjust the congestion window. Below this threshold BIC TCP behaves | ||
344 | the same as the default TCP Reno. | ||
345 | Default: 14 | ||
346 | |||
347 | tcp_bic_fast_convergence - BOOLEAN | ||
348 | Forces BIC TCP to more quickly respond to changes in congestion | ||
349 | window. Allows two flows sharing the same connection to converge | ||
350 | more rapidly. | ||
351 | Default: 1 | ||
352 | |||
353 | tcp_default_win_scale - INTEGER | ||
354 | Sets the minimum window scale TCP will negotiate for on all | ||
355 | conections. | ||
356 | Default: 7 | ||
357 | |||
358 | tcp_tso_win_divisor - INTEGER | ||
359 | This allows control over what percentage of the congestion window | ||
360 | can be consumed by a single TSO frame. | ||
361 | The setting of this parameter is a choice between burstiness and | ||
362 | building larger TSO frames. | ||
363 | Default: 8 | ||
364 | |||
365 | tcp_frto - BOOLEAN | ||
366 | Enables F-RTO, an enhanced recovery algorithm for TCP retransmission | ||
367 | timeouts. It is particularly beneficial in wireless environments | ||
368 | where packet loss is typically due to random radio interference | ||
369 | rather than intermediate router congestion. | ||
370 | |||
371 | somaxconn - INTEGER | ||
372 | Limit of socket listen() backlog, known in userspace as SOMAXCONN. | ||
373 | Defaults to 128. See also tcp_max_syn_backlog for additional tuning | ||
374 | for TCP sockets. | ||
375 | |||
376 | IP Variables: | ||
377 | |||
378 | ip_local_port_range - 2 INTEGERS | ||
379 | Defines the local port range that is used by TCP and UDP to | ||
380 | choose the local port. The first number is the first, the | ||
381 | second the last local port number. Default value depends on | ||
382 | amount of memory available on the system: | ||
383 | > 128Mb 32768-61000 | ||
384 | < 128Mb 1024-4999 or even less. | ||
385 | This number defines number of active connections, which this | ||
386 | system can issue simultaneously to systems not supporting | ||
387 | TCP extensions (timestamps). With tcp_tw_recycle enabled | ||
388 | (i.e. by default) range 1024-4999 is enough to issue up to | ||
389 | 2000 connections per second to systems supporting timestamps. | ||
390 | |||
391 | ip_nonlocal_bind - BOOLEAN | ||
392 | If set, allows processes to bind() to non-local IP addresses, | ||
393 | which can be quite useful - but may break some applications. | ||
394 | Default: 0 | ||
395 | |||
396 | ip_dynaddr - BOOLEAN | ||
397 | If set non-zero, enables support for dynamic addresses. | ||
398 | If set to a non-zero value larger than 1, a kernel log | ||
399 | message will be printed when dynamic address rewriting | ||
400 | occurs. | ||
401 | Default: 0 | ||
402 | |||
403 | icmp_echo_ignore_all - BOOLEAN | ||
404 | icmp_echo_ignore_broadcasts - BOOLEAN | ||
405 | If either is set to true, then the kernel will ignore either all | ||
406 | ICMP ECHO requests sent to it or just those to broadcast/multicast | ||
407 | addresses, respectively. | ||
408 | |||
409 | icmp_ratelimit - INTEGER | ||
410 | Limit the maximal rates for sending ICMP packets whose type matches | ||
411 | icmp_ratemask (see below) to specific targets. | ||
412 | 0 to disable any limiting, otherwise the maximal rate in jiffies(1) | ||
413 | Default: 100 | ||
414 | |||
415 | icmp_ratemask - INTEGER | ||
416 | Mask made of ICMP types for which rates are being limited. | ||
417 | Significant bits: IHGFEDCBA9876543210 | ||
418 | Default mask: 0000001100000011000 (6168) | ||
419 | |||
420 | Bit definitions (see include/linux/icmp.h): | ||
421 | 0 Echo Reply | ||
422 | 3 Destination Unreachable * | ||
423 | 4 Source Quench * | ||
424 | 5 Redirect | ||
425 | 8 Echo Request | ||
426 | B Time Exceeded * | ||
427 | C Parameter Problem * | ||
428 | D Timestamp Request | ||
429 | E Timestamp Reply | ||
430 | F Info Request | ||
431 | G Info Reply | ||
432 | H Address Mask Request | ||
433 | I Address Mask Reply | ||
434 | |||
435 | * These are rate limited by default (see default mask above) | ||
436 | |||
437 | icmp_ignore_bogus_error_responses - BOOLEAN | ||
438 | Some routers violate RFC1122 by sending bogus responses to broadcast | ||
439 | frames. Such violations are normally logged via a kernel warning. | ||
440 | If this is set to TRUE, the kernel will not give such warnings, which | ||
441 | will avoid log file clutter. | ||
442 | Default: FALSE | ||
443 | |||
444 | igmp_max_memberships - INTEGER | ||
445 | Change the maximum number of multicast groups we can subscribe to. | ||
446 | Default: 20 | ||
447 | |||
448 | conf/interface/* changes special settings per interface (where "interface" is | ||
449 | the name of your network interface) | ||
450 | conf/all/* is special, changes the settings for all interfaces | ||
451 | |||
452 | |||
453 | log_martians - BOOLEAN | ||
454 | Log packets with impossible addresses to kernel log. | ||
455 | log_martians for the interface will be enabled if at least one of | ||
456 | conf/{all,interface}/log_martians is set to TRUE, | ||
457 | it will be disabled otherwise | ||
458 | |||
459 | accept_redirects - BOOLEAN | ||
460 | Accept ICMP redirect messages. | ||
461 | accept_redirects for the interface will be enabled if: | ||
462 | - both conf/{all,interface}/accept_redirects are TRUE in the case forwarding | ||
463 | for the interface is enabled | ||
464 | or | ||
465 | - at least one of conf/{all,interface}/accept_redirects is TRUE in the case | ||
466 | forwarding for the interface is disabled | ||
467 | accept_redirects for the interface will be disabled otherwise | ||
468 | default TRUE (host) | ||
469 | FALSE (router) | ||
470 | |||
471 | forwarding - BOOLEAN | ||
472 | Enable IP forwarding on this interface. | ||
473 | |||
474 | mc_forwarding - BOOLEAN | ||
475 | Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE | ||
476 | and a multicast routing daemon is required. | ||
477 | conf/all/mc_forwarding must also be set to TRUE to enable multicast routing | ||
478 | for the interface | ||
479 | |||
480 | medium_id - INTEGER | ||
481 | Integer value used to differentiate the devices by the medium they | ||
482 | are attached to. Two devices can have different id values when | ||
483 | the broadcast packets are received only on one of them. | ||
484 | The default value 0 means that the device is the only interface | ||
485 | to its medium, value of -1 means that medium is not known. | ||
486 | |||
487 | Currently, it is used to change the proxy_arp behavior: | ||
488 | the proxy_arp feature is enabled for packets forwarded between | ||
489 | two devices attached to different media. | ||
490 | |||
491 | proxy_arp - BOOLEAN | ||
492 | Do proxy arp. | ||
493 | proxy_arp for the interface will be enabled if at least one of | ||
494 | conf/{all,interface}/proxy_arp is set to TRUE, | ||
495 | it will be disabled otherwise | ||
496 | |||
497 | shared_media - BOOLEAN | ||
498 | Send(router) or accept(host) RFC1620 shared media redirects. | ||
499 | Overrides ip_secure_redirects. | ||
500 | shared_media for the interface will be enabled if at least one of | ||
501 | conf/{all,interface}/shared_media is set to TRUE, | ||
502 | it will be disabled otherwise | ||
503 | default TRUE | ||
504 | |||
505 | secure_redirects - BOOLEAN | ||
506 | Accept ICMP redirect messages only for gateways, | ||
507 | listed in default gateway list. | ||
508 | secure_redirects for the interface will be enabled if at least one of | ||
509 | conf/{all,interface}/secure_redirects is set to TRUE, | ||
510 | it will be disabled otherwise | ||
511 | default TRUE | ||
512 | |||
513 | send_redirects - BOOLEAN | ||
514 | Send redirects, if router. | ||
515 | send_redirects for the interface will be enabled if at least one of | ||
516 | conf/{all,interface}/send_redirects is set to TRUE, | ||
517 | it will be disabled otherwise | ||
518 | Default: TRUE | ||
519 | |||
520 | bootp_relay - BOOLEAN | ||
521 | Accept packets with source address 0.b.c.d destined | ||
522 | not to this host as local ones. It is supposed, that | ||
523 | BOOTP relay daemon will catch and forward such packets. | ||
524 | conf/all/bootp_relay must also be set to TRUE to enable BOOTP relay | ||
525 | for the interface | ||
526 | default FALSE | ||
527 | Not Implemented Yet. | ||
528 | |||
529 | accept_source_route - BOOLEAN | ||
530 | Accept packets with SRR option. | ||
531 | conf/all/accept_source_route must also be set to TRUE to accept packets | ||
532 | with SRR option on the interface | ||
533 | default TRUE (router) | ||
534 | FALSE (host) | ||
535 | |||
536 | rp_filter - BOOLEAN | ||
537 | 1 - do source validation by reversed path, as specified in RFC1812 | ||
538 | Recommended option for single homed hosts and stub network | ||
539 | routers. Could cause troubles for complicated (not loop free) | ||
540 | networks running a slow unreliable protocol (sort of RIP), | ||
541 | or using static routes. | ||
542 | |||
543 | 0 - No source validation. | ||
544 | |||
545 | conf/all/rp_filter must also be set to TRUE to do source validation | ||
546 | on the interface | ||
547 | |||
548 | Default value is 0. Note that some distributions enable it | ||
549 | in startup scripts. | ||
550 | |||
551 | arp_filter - BOOLEAN | ||
552 | 1 - Allows you to have multiple network interfaces on the same | ||
553 | subnet, and have the ARPs for each interface be answered | ||
554 | based on whether or not the kernel would route a packet from | ||
555 | the ARP'd IP out that interface (therefore you must use source | ||
556 | based routing for this to work). In other words it allows control | ||
557 | of which cards (usually 1) will respond to an arp request. | ||
558 | |||
559 | 0 - (default) The kernel can respond to arp requests with addresses | ||
560 | from other interfaces. This may seem wrong but it usually makes | ||
561 | sense, because it increases the chance of successful communication. | ||
562 | IP addresses are owned by the complete host on Linux, not by | ||
563 | particular interfaces. Only for more complex setups like load- | ||
564 | balancing, does this behaviour cause problems. | ||
565 | |||
566 | arp_filter for the interface will be enabled if at least one of | ||
567 | conf/{all,interface}/arp_filter is set to TRUE, | ||
568 | it will be disabled otherwise | ||
569 | |||
570 | arp_announce - INTEGER | ||
571 | Define different restriction levels for announcing the local | ||
572 | source IP address from IP packets in ARP requests sent on | ||
573 | interface: | ||
574 | 0 - (default) Use any local address, configured on any interface | ||
575 | 1 - Try to avoid local addresses that are not in the target's | ||
576 | subnet for this interface. This mode is useful when target | ||
577 | hosts reachable via this interface require the source IP | ||
578 | address in ARP requests to be part of their logical network | ||
579 | configured on the receiving interface. When we generate the | ||
580 | request we will check all our subnets that include the | ||
581 | target IP and will preserve the source address if it is from | ||
582 | such subnet. If there is no such subnet we select source | ||
583 | address according to the rules for level 2. | ||
584 | 2 - Always use the best local address for this target. | ||
585 | In this mode we ignore the source address in the IP packet | ||
586 | and try to select local address that we prefer for talks with | ||
587 | the target host. Such local address is selected by looking | ||
588 | for primary IP addresses on all our subnets on the outgoing | ||
589 | interface that include the target IP address. If no suitable | ||
590 | local address is found we select the first local address | ||
591 | we have on the outgoing interface or on all other interfaces, | ||
592 | with the hope we will receive reply for our request and | ||
593 | even sometimes no matter the source IP address we announce. | ||
594 | |||
595 | The max value from conf/{all,interface}/arp_announce is used. | ||
596 | |||
597 | Increasing the restriction level gives more chance for | ||
598 | receiving answer from the resolved target while decreasing | ||
599 | the level announces more valid sender's information. | ||
600 | |||
601 | arp_ignore - INTEGER | ||
602 | Define different modes for sending replies in response to | ||
603 | received ARP requests that resolve local target IP addresses: | ||
604 | 0 - (default): reply for any local target IP address, configured | ||
605 | on any interface | ||
606 | 1 - reply only if the target IP address is local address | ||
607 | configured on the incoming interface | ||
608 | 2 - reply only if the target IP address is local address | ||
609 | configured on the incoming interface and both with the | ||
610 | sender's IP address are part from same subnet on this interface | ||
611 | 3 - do not reply for local addresses configured with scope host, | ||
612 | only resolutions for global and link addresses are replied | ||
613 | 4-7 - reserved | ||
614 | 8 - do not reply for all local addresses | ||
615 | |||
616 | The max value from conf/{all,interface}/arp_ignore is used | ||
617 | when ARP request is received on the {interface} | ||
618 | |||
619 | app_solicit - INTEGER | ||
620 | The maximum number of probes to send to the user space ARP daemon | ||
621 | via netlink before dropping back to multicast probes (see | ||
622 | mcast_solicit). Defaults to 0. | ||
623 | |||
624 | disable_policy - BOOLEAN | ||
625 | Disable IPSEC policy (SPD) for this interface | ||
626 | |||
627 | disable_xfrm - BOOLEAN | ||
628 | Disable IPSEC encryption on this interface, whatever the policy | ||
629 | |||
630 | |||
631 | |||
632 | tag - INTEGER | ||
633 | Allows you to write a number, which can be used as required. | ||
634 | Default value is 0. | ||
635 | |||
636 | (1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the | ||
637 | Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact | ||
638 | value on your system. | ||
639 | |||
640 | Alexey Kuznetsov. | ||
641 | kuznet@ms2.inr.ac.ru | ||
642 | |||
643 | Updated by: | ||
644 | Andi Kleen | ||
645 | ak@muc.de | ||
646 | Nicolas Delon | ||
647 | delon.nicolas@wanadoo.fr | ||
648 | |||
649 | |||
650 | |||
651 | |||
652 | /proc/sys/net/ipv6/* Variables: | ||
653 | |||
654 | IPv6 has no global variables such as tcp_*. tcp_* settings under ipv4/ also | ||
655 | apply to IPv6 [XXX?]. | ||
656 | |||
657 | bindv6only - BOOLEAN | ||
658 | Default value for IPV6_V6ONLY socket option, | ||
659 | which restricts use of the IPv6 socket to IPv6 communication | ||
660 | only. | ||
661 | TRUE: disable IPv4-mapped address feature | ||
662 | FALSE: enable IPv4-mapped address feature | ||
663 | |||
664 | Default: FALSE (as specified in RFC2553bis) | ||
665 | |||
666 | IPv6 Fragmentation: | ||
667 | |||
668 | ip6frag_high_thresh - INTEGER | ||
669 | Maximum memory used to reassemble IPv6 fragments. When | ||
670 | ip6frag_high_thresh bytes of memory is allocated for this purpose, | ||
671 | the fragment handler will toss packets until ip6frag_low_thresh | ||
672 | is reached. | ||
673 | |||
674 | ip6frag_low_thresh - INTEGER | ||
675 | See ip6frag_high_thresh | ||
676 | |||
677 | ip6frag_time - INTEGER | ||
678 | Time in seconds to keep an IPv6 fragment in memory. | ||
679 | |||
680 | ip6frag_secret_interval - INTEGER | ||
681 | Regeneration interval (in seconds) of the hash secret (or lifetime | ||
682 | for the hash secret) for IPv6 fragments. | ||
683 | Default: 600 | ||
684 | |||
685 | conf/default/*: | ||
686 | Change the interface-specific default settings. | ||
687 | |||
688 | |||
689 | conf/all/*: | ||
690 | Change all the interface-specific settings. | ||
691 | |||
692 | [XXX: Other special features than forwarding?] | ||
693 | |||
694 | conf/all/forwarding - BOOLEAN | ||
695 | Enable global IPv6 forwarding between all interfaces. | ||
696 | |||
697 | IPv4 and IPv6 work differently here; e.g. netfilter must be used | ||
698 | to control which interfaces may forward packets and which not. | ||
699 | |||
700 | This also sets all interfaces' Host/Router setting | ||
701 | 'forwarding' to the specified value. See below for details. | ||
702 | |||
703 | This referred to as global forwarding. | ||
704 | |||
705 | conf/interface/*: | ||
706 | Change special settings per interface. | ||
707 | |||
708 | The functional behaviour for certain settings is different | ||
709 | depending on whether local forwarding is enabled or not. | ||
710 | |||
711 | accept_ra - BOOLEAN | ||
712 | Accept Router Advertisements; autoconfigure using them. | ||
713 | |||
714 | Functional default: enabled if local forwarding is disabled. | ||
715 | disabled if local forwarding is enabled. | ||
716 | |||
717 | accept_redirects - BOOLEAN | ||
718 | Accept Redirects. | ||
719 | |||
720 | Functional default: enabled if local forwarding is disabled. | ||
721 | disabled if local forwarding is enabled. | ||
722 | |||
723 | autoconf - BOOLEAN | ||
724 | Autoconfigure addresses using Prefix Information in Router | ||
725 | Advertisements. | ||
726 | |||
727 | Functional default: enabled if accept_ra is enabled. | ||
728 | disabled if accept_ra is disabled. | ||
729 | |||
730 | dad_transmits - INTEGER | ||
731 | The amount of Duplicate Address Detection probes to send. | ||
732 | Default: 1 | ||
733 | |||
734 | forwarding - BOOLEAN | ||
735 | Configure interface-specific Host/Router behaviour. | ||
736 | |||
737 | Note: It is recommended to have the same setting on all | ||
738 | interfaces; mixed router/host scenarios are rather uncommon. | ||
739 | |||
740 | FALSE: | ||
741 | |||
742 | By default, Host behaviour is assumed. This means: | ||
743 | |||
744 | 1. IsRouter flag is not set in Neighbour Advertisements. | ||
745 | 2. Router Solicitations are being sent when necessary. | ||
746 | 3. If accept_ra is TRUE (default), accept Router | ||
747 | Advertisements (and do autoconfiguration). | ||
748 | 4. If accept_redirects is TRUE (default), accept Redirects. | ||
749 | |||
750 | TRUE: | ||
751 | |||
752 | If local forwarding is enabled, Router behaviour is assumed. | ||
753 | This means exactly the reverse from the above: | ||
754 | |||
755 | 1. IsRouter flag is set in Neighbour Advertisements. | ||
756 | 2. Router Solicitations are not sent. | ||
757 | 3. Router Advertisements are ignored. | ||
758 | 4. Redirects are ignored. | ||
759 | |||
760 | Default: FALSE if global forwarding is disabled (default), | ||
761 | otherwise TRUE. | ||
762 | |||
763 | hop_limit - INTEGER | ||
764 | Default Hop Limit to set. | ||
765 | Default: 64 | ||
766 | |||
767 | mtu - INTEGER | ||
768 | Default Maximum Transfer Unit | ||
769 | Default: 1280 (IPv6 required minimum) | ||
770 | |||
771 | router_solicitation_delay - INTEGER | ||
772 | Number of seconds to wait after interface is brought up | ||
773 | before sending Router Solicitations. | ||
774 | Default: 1 | ||
775 | |||
776 | router_solicitation_interval - INTEGER | ||
777 | Number of seconds to wait between Router Solicitations. | ||
778 | Default: 4 | ||
779 | |||
780 | router_solicitations - INTEGER | ||
781 | Number of Router Solicitations to send until assuming no | ||
782 | routers are present. | ||
783 | Default: 3 | ||
784 | |||
785 | use_tempaddr - INTEGER | ||
786 | Preference for Privacy Extensions (RFC3041). | ||
787 | <= 0 : disable Privacy Extensions | ||
788 | == 1 : enable Privacy Extensions, but prefer public | ||
789 | addresses over temporary addresses. | ||
790 | > 1 : enable Privacy Extensions and prefer temporary | ||
791 | addresses over public addresses. | ||
792 | Default: 0 (for most devices) | ||
793 | -1 (for point-to-point devices and loopback devices) | ||
794 | |||
795 | temp_valid_lft - INTEGER | ||
796 | valid lifetime (in seconds) for temporary addresses. | ||
797 | Default: 604800 (7 days) | ||
798 | |||
799 | temp_prefered_lft - INTEGER | ||
800 | Preferred lifetime (in seconds) for temporary addresses. | ||
801 | Default: 86400 (1 day) | ||
802 | |||
803 | max_desync_factor - INTEGER | ||
804 | Maximum value for DESYNC_FACTOR, which is a random value | ||
805 | that ensures that clients don't synchronize with each | ||
806 | other and generate new addresses at exactly the same time. | ||
807 | value is in seconds. | ||
808 | Default: 600 | ||
809 | |||
810 | regen_max_retry - INTEGER | ||
811 | Number of attempts before give up attempting to generate | ||
812 | valid temporary addresses. | ||
813 | Default: 5 | ||
814 | |||
815 | max_addresses - INTEGER | ||
816 | Number of maximum addresses per interface. 0 disables limitation. | ||
817 | It is recommended not set too large value (or 0) because it would | ||
818 | be too easy way to crash kernel to allow to create too much of | ||
819 | autoconfigured addresses. | ||
820 | Default: 16 | ||
821 | |||
822 | icmp/*: | ||
823 | ratelimit - INTEGER | ||
824 | Limit the maximal rates for sending ICMPv6 packets. | ||
825 | 0 to disable any limiting, otherwise the maximal rate in jiffies(1) | ||
826 | Default: 100 | ||
827 | |||
828 | |||
829 | IPv6 Update by: | ||
830 | Pekka Savola <pekkas@netcore.fi> | ||
831 | YOSHIFUJI Hideaki / USAGI Project <yoshfuji@linux-ipv6.org> | ||
832 | |||
833 | |||
834 | /proc/sys/net/bridge/* Variables: | ||
835 | |||
836 | bridge-nf-call-arptables - BOOLEAN | ||
837 | 1 : pass bridged ARP traffic to arptables' FORWARD chain. | ||
838 | 0 : disable this. | ||
839 | Default: 1 | ||
840 | |||
841 | bridge-nf-call-iptables - BOOLEAN | ||
842 | 1 : pass bridged IPv4 traffic to iptables' chains. | ||
843 | 0 : disable this. | ||
844 | Default: 1 | ||
845 | |||
846 | bridge-nf-call-ip6tables - BOOLEAN | ||
847 | 1 : pass bridged IPv6 traffic to ip6tables' chains. | ||
848 | 0 : disable this. | ||
849 | Default: 1 | ||
850 | |||
851 | bridge-nf-filter-vlan-tagged - BOOLEAN | ||
852 | 1 : pass bridged vlan-tagged ARP/IP traffic to arptables/iptables. | ||
853 | 0 : disable this. | ||
854 | Default: 1 | ||
855 | |||
856 | |||
857 | UNDOCUMENTED: | ||
858 | |||
859 | dev_weight FIXME | ||
860 | discovery_slots FIXME | ||
861 | discovery_timeout FIXME | ||
862 | fast_poll_increase FIXME | ||
863 | ip6_queue_maxlen FIXME | ||
864 | lap_keepalive_time FIXME | ||
865 | lo_cong FIXME | ||
866 | max_baud_rate FIXME | ||
867 | max_dgram_qlen FIXME | ||
868 | max_noreply_time FIXME | ||
869 | max_tx_data_size FIXME | ||
870 | max_tx_window FIXME | ||
871 | min_tx_turn_time FIXME | ||
872 | mod_cong FIXME | ||
873 | no_cong FIXME | ||
874 | no_cong_thresh FIXME | ||
875 | slot_timeout FIXME | ||
876 | warn_noreply_time FIXME | ||
877 | |||
878 | $Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $ | ||
diff --git a/Documentation/networking/ip_dynaddr.txt b/Documentation/networking/ip_dynaddr.txt new file mode 100644 index 000000000000..45f3c1268e86 --- /dev/null +++ b/Documentation/networking/ip_dynaddr.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | IP dynamic address hack-port v0.03 | ||
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | This stuff allows diald ONESHOT connections to get established by | ||
4 | dynamically changing packet source address (and socket's if local procs). | ||
5 | It is implemented for TCP diald-box connections(1) and IP_MASQuerading(2). | ||
6 | |||
7 | If enabled[*] and forwarding interface has changed: | ||
8 | 1) Socket (and packet) source address is rewritten ON RETRANSMISSIONS | ||
9 | while in SYN_SENT state (diald-box processes). | ||
10 | 2) Out-bounded MASQueraded source address changes ON OUTPUT (when | ||
11 | internal host does retransmission) until a packet from outside is | ||
12 | received by the tunnel. | ||
13 | |||
14 | This is specially helpful for auto dialup links (diald), where the | ||
15 | ``actual'' outgoing address is unknown at the moment the link is | ||
16 | going up. So, the *same* (local AND masqueraded) connections requests that | ||
17 | bring the link up will be able to get established. | ||
18 | |||
19 | [*] At boot, by default no address rewriting is attempted. | ||
20 | To enable: | ||
21 | # echo 1 > /proc/sys/net/ipv4/ip_dynaddr | ||
22 | To enable verbose mode: | ||
23 | # echo 2 > /proc/sys/net/ipv4/ip_dynaddr | ||
24 | To disable (default) | ||
25 | # echo 0 > /proc/sys/net/ipv4/ip_dynaddr | ||
26 | |||
27 | Enjoy! | ||
28 | |||
29 | -- Juanjo <jjciarla@raiz.uncu.edu.ar> | ||
diff --git a/Documentation/networking/ipddp.txt b/Documentation/networking/ipddp.txt new file mode 100644 index 000000000000..661a5558dd8e --- /dev/null +++ b/Documentation/networking/ipddp.txt | |||
@@ -0,0 +1,78 @@ | |||
1 | Text file for ipddp.c: | ||
2 | AppleTalk-IP Decapsulation and AppleTalk-IP Encapsulation | ||
3 | |||
4 | This text file is written by Jay Schulist <jschlst@samba.org> | ||
5 | |||
6 | Introduction | ||
7 | ------------ | ||
8 | |||
9 | AppleTalk-IP (IPDDP) is the method computers connected to AppleTalk | ||
10 | networks can use to communicate via IP. AppleTalk-IP is simply IP datagrams | ||
11 | inside AppleTalk packets. | ||
12 | |||
13 | Through this driver you can either allow your Linux box to communicate | ||
14 | IP over an AppleTalk network or you can provide IP gatewaying functions | ||
15 | for your AppleTalk users. | ||
16 | |||
17 | You can currently encapsulate or decapsulate AppleTalk-IP on LocalTalk, | ||
18 | EtherTalk and PPPTalk. The only limit on the protocol is that of what | ||
19 | kernel AppleTalk layer and drivers are available. | ||
20 | |||
21 | Each mode requires its own user space software. | ||
22 | |||
23 | Compiling AppleTalk-IP Decapsulation/Encapsulation | ||
24 | ================================================= | ||
25 | |||
26 | AppleTalk-IP decapsulation needs to be compiled into your kernel. You | ||
27 | will need to turn on AppleTalk-IP driver support. Then you will need to | ||
28 | select ONE of the two options; IP to AppleTalk-IP encapsulation support or | ||
29 | AppleTalk-IP to IP decapsulation support. If you compile the driver | ||
30 | statically you will only be able to use the driver for the function you have | ||
31 | enabled in the kernel. If you compile the driver as a module you can | ||
32 | select what mode you want it to run in via a module loading param. | ||
33 | ipddp_mode=1 for AppleTalk-IP encapsulation and ipddp_mode=2 for | ||
34 | AppleTalk-IP to IP decapsulation. | ||
35 | |||
36 | Basic instructions for user space tools | ||
37 | ======================================= | ||
38 | |||
39 | To enable AppleTalk-IP decapsulation/encapsulation you will need the | ||
40 | proper tools. You can get the tools for decapsulation from | ||
41 | http://spacs1.spacs.k12.wi.us/~jschlst/index.html and for encapsulation | ||
42 | from http://www.maths.unm.edu/~bradford/ltpc.html | ||
43 | |||
44 | I will briefly describe the operation of the tools, but you will | ||
45 | need to consult the supporting documentation for each set of tools. | ||
46 | |||
47 | Decapsulation - You will need to download a software package called | ||
48 | MacGate. In this distribution there will be a tool called MacRoute | ||
49 | which enables you to add routes to the kernel for your Macs by hand. | ||
50 | Also the tool MacRegGateWay is included to register the | ||
51 | proper IP Gateway and IP addresses for your machine. Included in this | ||
52 | distribution is a patch to netatalk-1.4b2+asun2.0a17.2 (available from | ||
53 | ftp.u.washington.edu/pub/user-supported/asun/) this patch is optional | ||
54 | but it allows automatic adding and deleting of routes for Macs. (Handy | ||
55 | for locations with large Mac installations) | ||
56 | |||
57 | Encapsulation - You will need to download a software daemon called ipddpd. | ||
58 | This software expects there to be an AppleTalk-IP gateway on the network. | ||
59 | You will also need to add the proper routes to route your Linux box's IP | ||
60 | traffic out the ipddp interface. | ||
61 | |||
62 | Common Uses of ipddp.c | ||
63 | ---------------------- | ||
64 | Of course AppleTalk-IP decapsulation and encapsulation, but specifically | ||
65 | decapsulation is being used most for connecting LocalTalk networks to | ||
66 | IP networks. Although it has been used on EtherTalk networks to allow | ||
67 | Macs that are only able to tunnel IP over EtherTalk. | ||
68 | |||
69 | Encapsulation has been used to allow a Linux box stuck on a LocalTalk | ||
70 | network to use IP. It should work equally well if you are stuck on an | ||
71 | EtherTalk only network. | ||
72 | |||
73 | Further Assistance | ||
74 | ------------------- | ||
75 | You can contact me (Jay Schulist <jschlst@samba.org>) with any | ||
76 | questions regarding decapsulation or encapsulation. Bradford W. Johnson | ||
77 | <johns393@maroon.tc.umn.edu> originally wrote the ipddp.c driver for IP | ||
78 | encapsulation in AppleTalk. | ||
diff --git a/Documentation/networking/iphase.txt b/Documentation/networking/iphase.txt new file mode 100644 index 000000000000..39ccb8595bf1 --- /dev/null +++ b/Documentation/networking/iphase.txt | |||
@@ -0,0 +1,158 @@ | |||
1 | |||
2 | READ ME FISRT | ||
3 | ATM (i)Chip IA Linux Driver Source | ||
4 | -------------------------------------------------------------------------------- | ||
5 | Read This Before You Begin! | ||
6 | -------------------------------------------------------------------------------- | ||
7 | |||
8 | Description | ||
9 | ----------- | ||
10 | |||
11 | This is the README file for the Interphase PCI ATM (i)Chip IA Linux driver | ||
12 | source release. | ||
13 | |||
14 | The features and limitations of this driver are as follows: | ||
15 | - A single VPI (VPI value of 0) is supported. | ||
16 | - Supports 4K VCs for the server board (with 512K control memory) and 1K | ||
17 | VCs for the client board (with 128K control memory). | ||
18 | - UBR, ABR and CBR service categories are supported. | ||
19 | - Only AAL5 is supported. | ||
20 | - Supports setting of PCR on the VCs. | ||
21 | - Multiple adapters in a system are supported. | ||
22 | - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, | ||
23 | including x575 (OC3, control memory 128K , 512K and packet memory 128K, | ||
24 | 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See | ||
25 | http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM | ||
26 | for details. | ||
27 | - Only x86 platforms are supported. | ||
28 | - SMP is supported. | ||
29 | |||
30 | |||
31 | Before You Start | ||
32 | ---------------- | ||
33 | |||
34 | |||
35 | Installation | ||
36 | ------------ | ||
37 | |||
38 | 1. Installing the adapters in the system | ||
39 | To install the ATM adapters in the system, follow the steps below. | ||
40 | a. Login as root. | ||
41 | b. Shut down the system and power off the system. | ||
42 | c. Install one or more ATM adapters in the system. | ||
43 | d. Connect each adapter to a port on an ATM switch. The green 'Link' | ||
44 | LED on the front panel of the adapter will be on if the adapter is | ||
45 | connected to the switch properly when the system is powered up. | ||
46 | e. Power on and boot the system. | ||
47 | |||
48 | 2. [ Removed ] | ||
49 | |||
50 | 3. Rebuild kernel with ABR support | ||
51 | [ a. and b. removed ] | ||
52 | c. Reconfigure the kernel, choose the Interphase ia driver through "make | ||
53 | menuconfig" or "make xconfig". | ||
54 | d. Rebuild the kernel, loadable modules and the atm tools. | ||
55 | e. Install the new built kernel and modules and reboot. | ||
56 | |||
57 | 4. Load the adapter hardware driver (ia driver) if it is built as a module | ||
58 | a. Login as root. | ||
59 | b. Change directory to /lib/modules/<kernel-version>/atm. | ||
60 | c. Run "insmod suni.o;insmod iphase.o" | ||
61 | The yellow 'status' LED on the front panel of the adapter will blink | ||
62 | while the driver is loaded in the system. | ||
63 | d. To verify that the 'ia' driver is loaded successfully, run the | ||
64 | following command: | ||
65 | |||
66 | cat /proc/atm/devices | ||
67 | |||
68 | If the driver is loaded successfully, the output of the command will | ||
69 | be similar to the following lines: | ||
70 | |||
71 | Itf Type ESI/"MAC"addr AAL(TX,err,RX,err,drop) ... | ||
72 | 0 ia xxxxxxxxx 0 ( 0 0 0 0 0 ) 5 ( 0 0 0 0 0 ) | ||
73 | |||
74 | You can also check the system log file /var/log/messages for messages | ||
75 | related to the ATM driver. | ||
76 | |||
77 | 5. Ia Driver Configuration | ||
78 | |||
79 | 5.1 Configuration of adapter buffers | ||
80 | The (i)Chip boards have 3 different packet RAM size variants: 128K, 512K and | ||
81 | 1M. The RAM size decides the number of buffers and buffer size. The default | ||
82 | size and number of buffers are set as following: | ||
83 | |||
84 | Totol Rx RAM Tx RAM Rx Buf Tx Buf Rx buf Tx buf | ||
85 | RAM size size size size size cnt cnt | ||
86 | -------- ------ ------ ------ ------ ------ ------ | ||
87 | 128K 64K 64K 10K 10K 6 6 | ||
88 | 512K 256K 256K 10K 10K 25 25 | ||
89 | 1M 512K 512K 10K 10K 51 51 | ||
90 | |||
91 | These setting should work well in most environments, but can be | ||
92 | changed by typing the following command: | ||
93 | |||
94 | insmod <IA_DIR>/ia.o IA_RX_BUF=<RX_CNT> IA_RX_BUF_SZ=<RX_SIZE> \ | ||
95 | IA_TX_BUF=<TX_CNT> IA_TX_BUF_SZ=<TX_SIZE> | ||
96 | Where: | ||
97 | RX_CNT = number of receive buffers in the range (1-128) | ||
98 | RX_SIZE = size of receive buffers in the range (48-64K) | ||
99 | TX_CNT = number of transmit buffers in the range (1-128) | ||
100 | TX_SIZE = size of transmit buffers in the range (48-64K) | ||
101 | |||
102 | 1. Transmit and receive buffer size must be a multiple of 4. | ||
103 | 2. Care should be taken so that the memory required for the | ||
104 | transmit and receive buffers is less than or equal to the | ||
105 | total adapter packet memory. | ||
106 | |||
107 | 5.2 Turn on ia debug trace | ||
108 | |||
109 | When the ia driver is built with the CONFIG_ATM_IA_DEBUG flag, the driver | ||
110 | can provide more debug trace if needed. There is a bit mask variable, | ||
111 | IADebugFlag, which controls the output of the traces. You can find the bit | ||
112 | map of the IADebugFlag in iphase.h. | ||
113 | The debug trace can be turn on through the insmod command line option, for | ||
114 | example, "insmod iphase.o IADebugFlag=0xffffffff" can turn on all the debug | ||
115 | traces together with loading the driver. | ||
116 | |||
117 | 6. Ia Driver Test Using ttcp_atm and PVC | ||
118 | |||
119 | For the PVC setup, the test machines can either be connected back-to-back or | ||
120 | through a switch. If connected through the switch, the switch must be | ||
121 | configured for the PVC(s). | ||
122 | |||
123 | a. For UBR test: | ||
124 | At the test machine intended to receive data, type: | ||
125 | ttcp_atm -r -a -s 0.100 | ||
126 | At the other test machine, type: | ||
127 | ttcp_atm -t -a -s 0.100 -n 10000 | ||
128 | Run "ttcp_atm -h" to display more options of the ttcp_atm tool. | ||
129 | b. For ABR test: | ||
130 | It is the same as the UBR testing, but with an extra command option: | ||
131 | -Pabr:max_pcr=<xxx> | ||
132 | where: | ||
133 | xxx = the maximum peak cell rate, from 170 - 353207. | ||
134 | This option must be set on both the machines. | ||
135 | c. For CBR test: | ||
136 | It is the same as the UBR testing, but with an extra command option: | ||
137 | -Pcbr:max_pcr=<xxx> | ||
138 | where: | ||
139 | xxx = the maximum peak cell rate, from 170 - 353207. | ||
140 | This option may only be set on the transmit machine. | ||
141 | |||
142 | |||
143 | OUTSTANDING ISSUES | ||
144 | ------------------ | ||
145 | |||
146 | |||
147 | |||
148 | Contact Information | ||
149 | ------------------- | ||
150 | |||
151 | Customer Support: | ||
152 | United States: Telephone: (214) 654-5555 | ||
153 | Fax: (214) 654-5500 | ||
154 | E-Mail: intouch@iphase.com | ||
155 | Europe: Telephone: 33 (0)1 41 15 44 00 | ||
156 | Fax: 33 (0)1 41 15 12 13 | ||
157 | World Wide Web: http://www.iphase.com | ||
158 | Anonymous FTP: ftp.iphase.com | ||
diff --git a/Documentation/networking/irda.txt b/Documentation/networking/irda.txt new file mode 100644 index 000000000000..9e5b8e66d6a5 --- /dev/null +++ b/Documentation/networking/irda.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | To use the IrDA protocols within Linux you will need to get a suitable copy | ||
2 | of the IrDA Utilities. More detailed information about these and associated | ||
3 | programs can be found on http://irda.sourceforge.net/ | ||
4 | |||
5 | For more information about how to use the IrDA protocol stack, see the | ||
6 | Linux Infared HOWTO (http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html) | ||
7 | by Werner Heuser <wehe@tuxmobil.org> | ||
8 | |||
9 | There is an active mailing list for discussing Linux-IrDA matters called | ||
10 | irda-users@lists.sourceforge.net | ||
11 | |||
12 | |||
13 | |||
14 | |||
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt new file mode 100644 index 000000000000..7c98277777eb --- /dev/null +++ b/Documentation/networking/ixgb.txt | |||
@@ -0,0 +1,212 @@ | |||
1 | Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters | ||
2 | ================================================================ | ||
3 | |||
4 | November 17, 2004 | ||
5 | |||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - In This Release | ||
11 | - Identifying Your Adapter | ||
12 | - Command Line Parameters | ||
13 | - Improving Performance | ||
14 | - Support | ||
15 | |||
16 | |||
17 | In This Release | ||
18 | =============== | ||
19 | |||
20 | This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family | ||
21 | of Adapters, version 1.0.x. | ||
22 | |||
23 | For questions related to hardware requirements, refer to the documentation | ||
24 | supplied with your Intel PRO/10GbE adapter. All hardware requirements listed | ||
25 | apply to use with Linux. | ||
26 | |||
27 | Identifying Your Adapter | ||
28 | ======================== | ||
29 | |||
30 | To verify your Intel adapter is supported, find the board ID number on the | ||
31 | adapter. Look for a label that has a barcode and a number in the format | ||
32 | A12345-001. | ||
33 | |||
34 | Use the above information and the Adapter & Driver ID Guide at: | ||
35 | |||
36 | http://support.intel.com/support/network/adapter/pro100/21397.htm | ||
37 | |||
38 | For the latest Intel network drivers for Linux, go to: | ||
39 | |||
40 | http://downloadfinder.intel.com/scripts-df/support_intel.asp | ||
41 | |||
42 | Command Line Parameters | ||
43 | ======================= | ||
44 | |||
45 | If the driver is built as a module, the following optional parameters are | ||
46 | used by entering them on the command line with the modprobe or insmod command | ||
47 | using this syntax: | ||
48 | |||
49 | modprobe ixgb [<option>=<VAL1>,<VAL2>,...] | ||
50 | |||
51 | insmod ixgb [<option>=<VAL1>,<VAL2>,...] | ||
52 | |||
53 | For example, with two PRO/10GbE PCI adapters, entering: | ||
54 | |||
55 | insmod ixgb TxDescriptors=80,128 | ||
56 | |||
57 | loads the ixgb driver with 80 TX resources for the first adapter and 128 TX | ||
58 | resources for the second adapter. | ||
59 | |||
60 | The default value for each parameter is generally the recommended setting, | ||
61 | unless otherwise noted. Also, if the driver is statically built into the | ||
62 | kernel, the driver is loaded with the default values for all the parameters. | ||
63 | Ethtool can be used to change some of the parameters at runtime. | ||
64 | |||
65 | FlowControl | ||
66 | Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) | ||
67 | Default: Read from the EEPROM | ||
68 | If EEPROM is not detected, default is 3 | ||
69 | This parameter controls the automatic generation(Tx) and response(Rx) to | ||
70 | Ethernet PAUSE frames. | ||
71 | |||
72 | RxDescriptors | ||
73 | Valid Range: 64-512 | ||
74 | Default Value: 512 | ||
75 | This value is the number of receive descriptors allocated by the driver. | ||
76 | Increasing this value allows the driver to buffer more incoming packets. | ||
77 | Each descriptor is 16 bytes. A receive buffer is also allocated for | ||
78 | each descriptor and can be either 2048, 4056, 8192, or 16384 bytes, | ||
79 | depending on the MTU setting. When the MTU size is 1500 or less, the | ||
80 | receive buffer size is 2048 bytes. When the MTU is greater than 1500 the | ||
81 | receive buffer size will be either 4056, 8192, or 16384 bytes. The | ||
82 | maximum MTU size is 16114. | ||
83 | |||
84 | RxIntDelay | ||
85 | Valid Range: 0-65535 (0=off) | ||
86 | Default Value: 6 | ||
87 | This value delays the generation of receive interrupts in units of | ||
88 | 0.8192 microseconds. Receive interrupt reduction can improve CPU | ||
89 | efficiency if properly tuned for specific network traffic. Increasing | ||
90 | this value adds extra latency to frame reception and can end up | ||
91 | decreasing the throughput of TCP traffic. If the system is reporting | ||
92 | dropped receives, this value may be set too high, causing the driver to | ||
93 | run out of available receive descriptors. | ||
94 | |||
95 | TxDescriptors | ||
96 | Valid Range: 64-4096 | ||
97 | Default Value: 256 | ||
98 | This value is the number of transmit descriptors allocated by the driver. | ||
99 | Increasing this value allows the driver to queue more transmits. Each | ||
100 | descriptor is 16 bytes. | ||
101 | |||
102 | XsumRX | ||
103 | Valid Range: 0-1 | ||
104 | Default Value: 1 | ||
105 | A value of '1' indicates that the driver should enable IP checksum | ||
106 | offload for received packets (both UDP and TCP) to the adapter hardware. | ||
107 | |||
108 | XsumTX | ||
109 | Valid Range: 0-1 | ||
110 | Default Value: 1 | ||
111 | A value of '1' indicates that the driver should enable IP checksum | ||
112 | offload for transmitted packets (both UDP and TCP) to the adapter | ||
113 | hardware. | ||
114 | |||
115 | Improving Performance | ||
116 | ===================== | ||
117 | |||
118 | With the Intel PRO/10 GbE adapter, the default Linux configuration will very | ||
119 | likely limit the total available throughput artificially. There is a set of | ||
120 | things that when applied together increase the ability of Linux to transmit | ||
121 | and receive data. The following enhancements were originally acquired from | ||
122 | settings published at http://www.spec.org/web99 for various submitted results | ||
123 | using Linux. | ||
124 | |||
125 | NOTE: These changes are only suggestions, and serve as a starting point for | ||
126 | tuning your network performance. | ||
127 | |||
128 | The changes are made in three major ways, listed in order of greatest effect: | ||
129 | - Use ifconfig to modify the mtu (maximum transmission unit) and the txqueuelen | ||
130 | parameter. | ||
131 | - Use sysctl to modify /proc parameters (essentially kernel tuning) | ||
132 | - Use setpci to modify the MMRBC field in PCI-X configuration space to increase | ||
133 | transmit burst lengths on the bus. | ||
134 | |||
135 | NOTE: setpci modifies the adapter's configuration registers to allow it to read | ||
136 | up to 4k bytes at a time (for transmits). However, for some systems the | ||
137 | behavior after modifying this register may be undefined (possibly errors of some | ||
138 | kind). A power-cycle, hard reset or explicitly setting the e6 register back to | ||
139 | 22 (setpci -d 8086:1048 e6.b=22) may be required to get back to a stable | ||
140 | configuration. | ||
141 | |||
142 | - COPY these lines and paste them into ixgb_perf.sh: | ||
143 | #!/bin/bash | ||
144 | echo "configuring network performance , edit this file to change the interface" | ||
145 | # set mmrbc to 4k reads, modify only Intel 10GbE device IDs | ||
146 | setpci -d 8086:1048 e6.b=2e | ||
147 | # set the MTU (max transmission unit) - it requires your switch and clients to change too! | ||
148 | # set the txqueuelen | ||
149 | # your ixgb adapter should be loaded as eth1 for this to work, change if needed | ||
150 | ifconfig eth1 mtu 9000 txqueuelen 1000 up | ||
151 | # call the sysctl utility to modify /proc/sys entries | ||
152 | sysctl -p ./sysctl_ixgb.conf | ||
153 | - END ixgb_perf.sh | ||
154 | |||
155 | - COPY these lines and paste them into sysctl_ixgb.conf: | ||
156 | # some of the defaults may be different for your kernel | ||
157 | # call this file with sysctl -p <this file> | ||
158 | # these are just suggested values that worked well to increase throughput in | ||
159 | # several network benchmark tests, your mileage may vary | ||
160 | |||
161 | ### IPV4 specific settings | ||
162 | net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use | ||
163 | net.ipv4.tcp_sack = 0 # turn SACK support off, default on | ||
164 | # on systems with a VERY fast bus -> memory interface this is the big gainer | ||
165 | net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760 | ||
166 | net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072 | ||
167 | net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768 | ||
168 | |||
169 | ### CORE settings (mostly for socket and UDP effect) | ||
170 | net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071 | ||
171 | net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071 | ||
172 | net.core.rmem_default = 524287 # default receive socket buffer size, default 65535 | ||
173 | net.core.wmem_default = 524287 # default send socket buffer size, default 65535 | ||
174 | net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240 | ||
175 | net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300 | ||
176 | - END sysctl_ixgb.conf | ||
177 | |||
178 | Edit the ixgb_perf.sh script if necessary to change eth1 to whatever interface | ||
179 | your ixgb driver is using. | ||
180 | |||
181 | NOTE: Unless these scripts are added to the boot process, these changes will | ||
182 | only last only until the next system reboot. | ||
183 | |||
184 | |||
185 | Resolving Slow UDP Traffic | ||
186 | -------------------------- | ||
187 | |||
188 | If your server does not seem to be able to receive UDP traffic as fast as it | ||
189 | can receive TCP traffic, it could be because Linux, by default, does not set | ||
190 | the network stack buffers as large as they need to be to support high UDP | ||
191 | transfer rates. One way to alleviate this problem is to allow more memory to | ||
192 | be used by the IP stack to store incoming data. | ||
193 | |||
194 | For instance, use the commands: | ||
195 | sysctl -w net.core.rmem_max=262143 | ||
196 | and | ||
197 | sysctl -w net.core.rmem_default=262143 | ||
198 | to increase the read buffer memory max and default to 262143 (256k - 1) from | ||
199 | defaults of max=131071 (128k - 1) and default=65535 (64k - 1). These variables | ||
200 | will increase the amount of memory used by the network stack for receives, and | ||
201 | can be increased significantly more if necessary for your application. | ||
202 | |||
203 | Support | ||
204 | ======= | ||
205 | |||
206 | For general information and support, go to the Intel support website at: | ||
207 | |||
208 | http://support.intel.com | ||
209 | |||
210 | If an issue is identified with the released source code on the supported | ||
211 | kernel with a supported adapter, email the specific information related to | ||
212 | the issue to linux.nics@intel.com. | ||
diff --git a/Documentation/networking/lapb-module.txt b/Documentation/networking/lapb-module.txt new file mode 100644 index 000000000000..d4fc8f221559 --- /dev/null +++ b/Documentation/networking/lapb-module.txt | |||
@@ -0,0 +1,263 @@ | |||
1 | The Linux LAPB Module Interface 1.3 | ||
2 | |||
3 | Jonathan Naylor 29.12.96 | ||
4 | |||
5 | Changed (Henner Eisen, 2000-10-29): int return value for data_indication() | ||
6 | |||
7 | The LAPB module will be a separately compiled module for use by any parts of | ||
8 | the Linux operating system that require a LAPB service. This document | ||
9 | defines the interfaces to, and the services provided by this module. The | ||
10 | term module in this context does not imply that the LAPB module is a | ||
11 | separately loadable module, although it may be. The term module is used in | ||
12 | its more standard meaning. | ||
13 | |||
14 | The interface to the LAPB module consists of functions to the module, | ||
15 | callbacks from the module to indicate important state changes, and | ||
16 | structures for getting and setting information about the module. | ||
17 | |||
18 | Structures | ||
19 | ---------- | ||
20 | |||
21 | Probably the most important structure is the skbuff structure for holding | ||
22 | received and transmitted data, however it is beyond the scope of this | ||
23 | document. | ||
24 | |||
25 | The two LAPB specific structures are the LAPB initialisation structure and | ||
26 | the LAPB parameter structure. These will be defined in a standard header | ||
27 | file, <linux/lapb.h>. The header file <net/lapb.h> is internal to the LAPB | ||
28 | module and is not for use. | ||
29 | |||
30 | LAPB Initialisation Structure | ||
31 | ----------------------------- | ||
32 | |||
33 | This structure is used only once, in the call to lapb_register (see below). | ||
34 | It contains information about the device driver that requires the services | ||
35 | of the LAPB module. | ||
36 | |||
37 | struct lapb_register_struct { | ||
38 | void (*connect_confirmation)(int token, int reason); | ||
39 | void (*connect_indication)(int token, int reason); | ||
40 | void (*disconnect_confirmation)(int token, int reason); | ||
41 | void (*disconnect_indication)(int token, int reason); | ||
42 | int (*data_indication)(int token, struct sk_buff *skb); | ||
43 | void (*data_transmit)(int token, struct sk_buff *skb); | ||
44 | }; | ||
45 | |||
46 | Each member of this structure corresponds to a function in the device driver | ||
47 | that is called when a particular event in the LAPB module occurs. These will | ||
48 | be described in detail below. If a callback is not required (!!) then a NULL | ||
49 | may be substituted. | ||
50 | |||
51 | |||
52 | LAPB Parameter Structure | ||
53 | ------------------------ | ||
54 | |||
55 | This structure is used with the lapb_getparms and lapb_setparms functions | ||
56 | (see below). They are used to allow the device driver to get and set the | ||
57 | operational parameters of the LAPB implementation for a given connection. | ||
58 | |||
59 | struct lapb_parms_struct { | ||
60 | unsigned int t1; | ||
61 | unsigned int t1timer; | ||
62 | unsigned int t2; | ||
63 | unsigned int t2timer; | ||
64 | unsigned int n2; | ||
65 | unsigned int n2count; | ||
66 | unsigned int window; | ||
67 | unsigned int state; | ||
68 | unsigned int mode; | ||
69 | }; | ||
70 | |||
71 | T1 and T2 are protocol timing parameters and are given in units of 100ms. N2 | ||
72 | is the maximum number of tries on the link before it is declared a failure. | ||
73 | The window size is the maximum number of outstanding data packets allowed to | ||
74 | be unacknowledged by the remote end, the value of the window is between 1 | ||
75 | and 7 for a standard LAPB link, and between 1 and 127 for an extended LAPB | ||
76 | link. | ||
77 | |||
78 | The mode variable is a bit field used for setting (at present) three values. | ||
79 | The bit fields have the following meanings: | ||
80 | |||
81 | Bit Meaning | ||
82 | 0 LAPB operation (0=LAPB_STANDARD 1=LAPB_EXTENDED). | ||
83 | 1 [SM]LP operation (0=LAPB_SLP 1=LAPB=MLP). | ||
84 | 2 DTE/DCE operation (0=LAPB_DTE 1=LAPB_DCE) | ||
85 | 3-31 Reserved, must be 0. | ||
86 | |||
87 | Extended LAPB operation indicates the use of extended sequence numbers and | ||
88 | consequently larger window sizes, the default is standard LAPB operation. | ||
89 | MLP operation is the same as SLP operation except that the addresses used by | ||
90 | LAPB are different to indicate the mode of operation, the default is Single | ||
91 | Link Procedure. The difference between DCE and DTE operation is (i) the | ||
92 | addresses used for commands and responses, and (ii) when the DCE is not | ||
93 | connected, it sends DM without polls set, every T1. The upper case constant | ||
94 | names will be defined in the public LAPB header file. | ||
95 | |||
96 | |||
97 | Functions | ||
98 | --------- | ||
99 | |||
100 | The LAPB module provides a number of function entry points. | ||
101 | |||
102 | |||
103 | int lapb_register(void *token, struct lapb_register_struct); | ||
104 | |||
105 | This must be called before the LAPB module may be used. If the call is | ||
106 | successful then LAPB_OK is returned. The token must be a unique identifier | ||
107 | generated by the device driver to allow for the unique identification of the | ||
108 | instance of the LAPB link. It is returned by the LAPB module in all of the | ||
109 | callbacks, and is used by the device driver in all calls to the LAPB module. | ||
110 | For multiple LAPB links in a single device driver, multiple calls to | ||
111 | lapb_register must be made. The format of the lapb_register_struct is given | ||
112 | above. The return values are: | ||
113 | |||
114 | LAPB_OK LAPB registered successfully. | ||
115 | LAPB_BADTOKEN Token is already registered. | ||
116 | LAPB_NOMEM Out of memory | ||
117 | |||
118 | |||
119 | int lapb_unregister(void *token); | ||
120 | |||
121 | This releases all the resources associated with a LAPB link. Any current | ||
122 | LAPB link will be abandoned without further messages being passed. After | ||
123 | this call, the value of token is no longer valid for any calls to the LAPB | ||
124 | function. The valid return values are: | ||
125 | |||
126 | LAPB_OK LAPB unregistered successfully. | ||
127 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
128 | |||
129 | |||
130 | int lapb_getparms(void *token, struct lapb_parms_struct *parms); | ||
131 | |||
132 | This allows the device driver to get the values of the current LAPB | ||
133 | variables, the lapb_parms_struct is described above. The valid return values | ||
134 | are: | ||
135 | |||
136 | LAPB_OK LAPB getparms was successful. | ||
137 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
138 | |||
139 | |||
140 | int lapb_setparms(void *token, struct lapb_parms_struct *parms); | ||
141 | |||
142 | This allows the device driver to set the values of the current LAPB | ||
143 | variables, the lapb_parms_struct is described above. The values of t1timer, | ||
144 | t2timer and n2count are ignored, likewise changing the mode bits when | ||
145 | connected will be ignored. An error implies that none of the values have | ||
146 | been changed. The valid return values are: | ||
147 | |||
148 | LAPB_OK LAPB getparms was successful. | ||
149 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
150 | LAPB_INVALUE One of the values was out of its allowable range. | ||
151 | |||
152 | |||
153 | int lapb_connect_request(void *token); | ||
154 | |||
155 | Initiate a connect using the current parameter settings. The valid return | ||
156 | values are: | ||
157 | |||
158 | LAPB_OK LAPB is starting to connect. | ||
159 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
160 | LAPB_CONNECTED LAPB module is already connected. | ||
161 | |||
162 | |||
163 | int lapb_disconnect_request(void *token); | ||
164 | |||
165 | Initiate a disconnect. The valid return values are: | ||
166 | |||
167 | LAPB_OK LAPB is starting to disconnect. | ||
168 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
169 | LAPB_NOTCONNECTED LAPB module is not connected. | ||
170 | |||
171 | |||
172 | int lapb_data_request(void *token, struct sk_buff *skb); | ||
173 | |||
174 | Queue data with the LAPB module for transmitting over the link. If the call | ||
175 | is successful then the skbuff is owned by the LAPB module and may not be | ||
176 | used by the device driver again. The valid return values are: | ||
177 | |||
178 | LAPB_OK LAPB has accepted the data. | ||
179 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
180 | LAPB_NOTCONNECTED LAPB module is not connected. | ||
181 | |||
182 | |||
183 | int lapb_data_received(void *token, struct sk_buff *skb); | ||
184 | |||
185 | Queue data with the LAPB module which has been received from the device. It | ||
186 | is expected that the data passed to the LAPB module has skb->data pointing | ||
187 | to the beginning of the LAPB data. If the call is successful then the skbuff | ||
188 | is owned by the LAPB module and may not be used by the device driver again. | ||
189 | The valid return values are: | ||
190 | |||
191 | LAPB_OK LAPB has accepted the data. | ||
192 | LAPB_BADTOKEN Invalid/unknown LAPB token. | ||
193 | |||
194 | |||
195 | Callbacks | ||
196 | --------- | ||
197 | |||
198 | These callbacks are functions provided by the device driver for the LAPB | ||
199 | module to call when an event occurs. They are registered with the LAPB | ||
200 | module with lapb_register (see above) in the structure lapb_register_struct | ||
201 | (see above). | ||
202 | |||
203 | |||
204 | void (*connect_confirmation)(void *token, int reason); | ||
205 | |||
206 | This is called by the LAPB module when a connection is established after | ||
207 | being requested by a call to lapb_connect_request (see above). The reason is | ||
208 | always LAPB_OK. | ||
209 | |||
210 | |||
211 | void (*connect_indication)(void *token, int reason); | ||
212 | |||
213 | This is called by the LAPB module when the link is established by the remote | ||
214 | system. The value of reason is always LAPB_OK. | ||
215 | |||
216 | |||
217 | void (*disconnect_confirmation)(void *token, int reason); | ||
218 | |||
219 | This is called by the LAPB module when an event occurs after the device | ||
220 | driver has called lapb_disconnect_request (see above). The reason indicates | ||
221 | what has happened. In all cases the LAPB link can be regarded as being | ||
222 | terminated. The values for reason are: | ||
223 | |||
224 | LAPB_OK The LAPB link was terminated normally. | ||
225 | LAPB_NOTCONNECTED The remote system was not connected. | ||
226 | LAPB_TIMEDOUT No response was received in N2 tries from the remote | ||
227 | system. | ||
228 | |||
229 | |||
230 | void (*disconnect_indication)(void *token, int reason); | ||
231 | |||
232 | This is called by the LAPB module when the link is terminated by the remote | ||
233 | system or another event has occurred to terminate the link. This may be | ||
234 | returned in response to a lapb_connect_request (see above) if the remote | ||
235 | system refused the request. The values for reason are: | ||
236 | |||
237 | LAPB_OK The LAPB link was terminated normally by the remote | ||
238 | system. | ||
239 | LAPB_REFUSED The remote system refused the connect request. | ||
240 | LAPB_NOTCONNECTED The remote system was not connected. | ||
241 | LAPB_TIMEDOUT No response was received in N2 tries from the remote | ||
242 | system. | ||
243 | |||
244 | |||
245 | int (*data_indication)(void *token, struct sk_buff *skb); | ||
246 | |||
247 | This is called by the LAPB module when data has been received from the | ||
248 | remote system that should be passed onto the next layer in the protocol | ||
249 | stack. The skbuff becomes the property of the device driver and the LAPB | ||
250 | module will not perform any more actions on it. The skb->data pointer will | ||
251 | be pointing to the first byte of data after the LAPB header. | ||
252 | |||
253 | This method should return NET_RX_DROP (as defined in the header | ||
254 | file include/linux/netdevice.h) if and only if the frame was dropped | ||
255 | before it could be delivered to the upper layer. | ||
256 | |||
257 | |||
258 | void (*data_transmit)(void *token, struct sk_buff *skb); | ||
259 | |||
260 | This is called by the LAPB module when data is to be transmitted to the | ||
261 | remote system by the device driver. The skbuff becomes the property of the | ||
262 | device driver and the LAPB module will not perform any more actions on it. | ||
263 | The skb->data pointer will be pointing to the first byte of the LAPB header. | ||
diff --git a/Documentation/networking/ltpc.txt b/Documentation/networking/ltpc.txt new file mode 100644 index 000000000000..fe2a9129d959 --- /dev/null +++ b/Documentation/networking/ltpc.txt | |||
@@ -0,0 +1,131 @@ | |||
1 | This is the ALPHA version of the ltpc driver. | ||
2 | |||
3 | In order to use it, you will need at least version 1.3.3 of the | ||
4 | netatalk package, and the Apple or Farallon LocalTalk PC card. | ||
5 | There are a number of different LocalTalk cards for the PC; this | ||
6 | driver applies only to the one with the 65c02 processor chip on it. | ||
7 | |||
8 | To include it in the kernel, select the CONFIG_LTPC switch in the | ||
9 | configuration dialog. You can also compile it as a module. | ||
10 | |||
11 | While the driver will attempt to autoprobe the I/O port address, IRQ | ||
12 | line, and DMA channel of the card, this does not always work. For | ||
13 | this reason, you should be prepared to supply these parameters | ||
14 | yourself. (see "Card Configuration" below for how to determine or | ||
15 | change the settings on your card) | ||
16 | |||
17 | When the driver is compiled into the kernel, you can add a line such | ||
18 | as the following to your /etc/lilo.conf: | ||
19 | |||
20 | append="ltpc=0x240,9,1" | ||
21 | |||
22 | where the parameters (in order) are the port address, IRQ, and DMA | ||
23 | channel. The second and third values can be omitted, in which case | ||
24 | the driver will try to determine them itself. | ||
25 | |||
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 | ||
28 | them as options in /etc/modprobe.conf: | ||
29 | |||
30 | alias lt0 ltpc # autoload the module when the interface is configured | ||
31 | options ltpc io=0x240 irq=9 dma=1 | ||
32 | |||
33 | Before starting up the netatalk demons (perhaps in rc.local), you | ||
34 | need to add a line such as: | ||
35 | |||
36 | /sbin/ifconfig lt0 127.0.0.42 | ||
37 | |||
38 | The address is unimportant - however, the card needs to be configured | ||
39 | with ifconfig so that Netatalk can find it. | ||
40 | |||
41 | The appropriate netatalk configuration depends on whether you are | ||
42 | attached to a network that includes AppleTalk routers or not. If, | ||
43 | like me, you are simply connecting to your home Macintoshes and | ||
44 | printers, you need to set up netatalk to "seed". The way I do this | ||
45 | is to have the lines | ||
46 | |||
47 | dummy -seed -phase 2 -net 2000 -addr 2000.26 -zone "1033" | ||
48 | lt0 -seed -phase 1 -net 1033 -addr 1033.27 -zone "1033" | ||
49 | |||
50 | in my atalkd.conf. What is going on here is that I need to fool | ||
51 | netatalk into thinking that there are two AppleTalk interfaces | ||
52 | present; otherwise, it refuses to seed. This is a hack, and a more | ||
53 | permanent solution would be to alter the netatalk code. Also, make | ||
54 | sure you have the correct name for the dummy interface - If it's | ||
55 | compiled as a module, you will need to refer to it as "dummy0" or some | ||
56 | such. | ||
57 | |||
58 | If you are attached to an extended AppleTalk network, with routers on | ||
59 | it, then you don't need to fool around with this -- the appropriate | ||
60 | line in atalkd.conf is | ||
61 | |||
62 | lt0 -phase 1 | ||
63 | |||
64 | -------------------------------------- | ||
65 | |||
66 | Card Configuration: | ||
67 | |||
68 | The interrupts and so forth are configured via the dipswitch on the | ||
69 | board. Set the switches so as not to conflict with other hardware. | ||
70 | |||
71 | Interrupts -- set at most one. If none are set, the driver uses | ||
72 | polled mode. Because the card was developed in the XT era, the | ||
73 | original documentation refers to IRQ2. Since you'll be running | ||
74 | this on an AT (or later) class machine, that really means IRQ9. | ||
75 | |||
76 | SW1 IRQ 4 | ||
77 | SW2 IRQ 3 | ||
78 | SW3 IRQ 9 (2 in original card documentation only applies to XT) | ||
79 | |||
80 | |||
81 | DMA -- choose DMA 1 or 3, and set both corresponding switches. | ||
82 | |||
83 | SW4 DMA 3 | ||
84 | SW5 DMA 1 | ||
85 | SW6 DMA 3 | ||
86 | SW7 DMA 1 | ||
87 | |||
88 | |||
89 | I/O address -- choose one. | ||
90 | |||
91 | SW8 220 / 240 | ||
92 | |||
93 | -------------------------------------- | ||
94 | |||
95 | IP: | ||
96 | |||
97 | Yes, it is possible to do IP over LocalTalk. However, you can't just | ||
98 | treat the LocalTalk device like an ordinary Ethernet device, even if | ||
99 | that's what it looks like to Netatalk. | ||
100 | |||
101 | Instead, you follow the same procedure as for doing IP in EtherTalk. | ||
102 | See Documentation/networking/ipddp.txt for more information about the | ||
103 | kernel driver and userspace tools needed. | ||
104 | |||
105 | -------------------------------------- | ||
106 | |||
107 | BUGS: | ||
108 | |||
109 | IRQ autoprobing often doesn't work on a cold boot. To get around | ||
110 | this, either compile the driver as a module, or pass the parameters | ||
111 | for the card to the kernel as described above. | ||
112 | |||
113 | Also, as usual, autoprobing is not recommended when you use the driver | ||
114 | as a module. (though it usually works at boot time, at least) | ||
115 | |||
116 | Polled mode is *really* slow sometimes, but this seems to depend on | ||
117 | the configuration of the network. | ||
118 | |||
119 | It may theoretically be possible to use two LTPC cards in the same | ||
120 | machine, but this is unsupported, so if you really want to do this, | ||
121 | you'll probably have to hack the initialization code a bit. | ||
122 | |||
123 | ______________________________________ | ||
124 | |||
125 | THANKS: | ||
126 | Thanks to Alan Cox for helpful discussions early on in this | ||
127 | work, and to Denis Hainsworth for doing the bleeding-edge testing. | ||
128 | |||
129 | -- Bradford Johnson <bradford@math.umn.edu> | ||
130 | |||
131 | -- Updated 11/09/1998 by David Huggins-Daines <dhd@debian.org> | ||
diff --git a/Documentation/networking/multicast.txt b/Documentation/networking/multicast.txt new file mode 100644 index 000000000000..5049a64313d1 --- /dev/null +++ b/Documentation/networking/multicast.txt | |||
@@ -0,0 +1,64 @@ | |||
1 | Behaviour of Cards Under Multicast | ||
2 | ================================== | ||
3 | |||
4 | This is how they currently behave, not what the hardware can do--for example, | ||
5 | the Lance driver doesn't use its filter, even though the code for loading | ||
6 | it is in the DEC Lance-based driver. | ||
7 | |||
8 | The following are requirements for multicasting | ||
9 | ----------------------------------------------- | ||
10 | AppleTalk Multicast hardware filtering not important but | ||
11 | avoid cards only doing promisc | ||
12 | IP-Multicast Multicast hardware filters really help | ||
13 | IP-MRoute AllMulti hardware filters are of no help | ||
14 | |||
15 | |||
16 | Board Multicast AllMulti Promisc Filter | ||
17 | ------------------------------------------------------------------------ | ||
18 | 3c501 YES YES YES Software | ||
19 | 3c503 YES YES YES Hardware | ||
20 | 3c505 YES NO YES Hardware | ||
21 | 3c507 NO NO NO N/A | ||
22 | 3c509 YES YES YES Software | ||
23 | 3c59x YES YES YES Software | ||
24 | ac3200 YES YES YES Hardware | ||
25 | apricot YES PROMISC YES Hardware | ||
26 | arcnet NO NO NO N/A | ||
27 | at1700 PROMISC PROMISC YES Software | ||
28 | atp PROMISC PROMISC YES Software | ||
29 | cs89x0 YES YES YES Software | ||
30 | de4x5 YES YES YES Hardware | ||
31 | de600 NO NO NO N/A | ||
32 | de620 PROMISC PROMISC YES Software | ||
33 | depca YES PROMISC YES Hardware | ||
34 | dmfe YES YES YES Software(*) | ||
35 | e2100 YES YES YES Hardware | ||
36 | eepro YES PROMISC YES Hardware | ||
37 | eexpress NO NO NO N/A | ||
38 | ewrk3 YES PROMISC YES Hardware | ||
39 | hp-plus YES YES YES Hardware | ||
40 | hp YES YES YES Hardware | ||
41 | hp100 YES YES YES Hardware | ||
42 | ibmtr NO NO NO N/A | ||
43 | ioc3-eth YES YES YES Hardware | ||
44 | lance YES YES YES Software(#) | ||
45 | ne YES YES YES Hardware | ||
46 | ni52 <------------------ Buggy ------------------> | ||
47 | ni65 YES YES YES Software(#) | ||
48 | seeq NO NO NO N/A | ||
49 | sgiseek <------------------ Buggy ------------------> | ||
50 | sk_g16 NO NO YES N/A | ||
51 | smc-ultra YES YES YES Hardware | ||
52 | sunlance YES YES YES Hardware | ||
53 | tulip YES YES YES Hardware | ||
54 | wavelan YES PROMISC YES Hardware | ||
55 | wd YES YES YES Hardware | ||
56 | xirc2ps_cs YES YES YES Hardware | ||
57 | znet YES YES YES Software | ||
58 | |||
59 | |||
60 | PROMISC = This multicast mode is in fact promiscuous mode. Avoid using | ||
61 | cards who go PROMISC on any multicast in a multicast kernel. | ||
62 | |||
63 | (#) = Hardware multicast support is not used yet. | ||
64 | (*) = Hardware support for Davicom 9132 chipset only. | ||
diff --git a/Documentation/networking/ncsa-telnet b/Documentation/networking/ncsa-telnet new file mode 100644 index 000000000000..d77d28b09093 --- /dev/null +++ b/Documentation/networking/ncsa-telnet | |||
@@ -0,0 +1,16 @@ | |||
1 | NCSA telnet doesn't work with path MTU discovery enabled. This is due to a | ||
2 | bug in NCSA that also stops it working with other modern networking code | ||
3 | such as Solaris. | ||
4 | |||
5 | The following information is courtesy of | ||
6 | Marek <marekm@i17linuxb.ists.pwr.wroc.pl> | ||
7 | |||
8 | There is a fixed version somewhere on ftp.upe.ac.za (sorry, I don't | ||
9 | remember the exact pathname, and this site is very slow from here). | ||
10 | It may or may not be faster for you to get it from | ||
11 | ftp://ftp.ists.pwr.wroc.pl/pub/msdos/telnet/ncsa_upe/tel23074.zip | ||
12 | (source is in v230704s.zip). I have tested it with 1.3.79 (with | ||
13 | path mtu discovery enabled - ncsa 2.3.08 didn't work) and it seems | ||
14 | to work. I don't know if anyone is working on this code - this | ||
15 | version is over a year old. Too bad - it's faster and often more | ||
16 | stable than these windoze telnets, and runs on almost anything... | ||
diff --git a/Documentation/networking/net-modules.txt b/Documentation/networking/net-modules.txt new file mode 100644 index 000000000000..3830a83513d2 --- /dev/null +++ b/Documentation/networking/net-modules.txt | |||
@@ -0,0 +1,324 @@ | |||
1 | Wed 2-Aug-95 <matti.aarnio@utu.fi> | ||
2 | |||
3 | Linux network driver modules | ||
4 | |||
5 | Do not mistake this for "README.modules" at the top-level | ||
6 | directory! That document tells about modules in general, while | ||
7 | this one tells only about network device driver modules. | ||
8 | |||
9 | This is a potpourri of INSMOD-time(*) configuration options | ||
10 | (if such exists) and their default values of various modules | ||
11 | in the Linux network drivers collection. | ||
12 | |||
13 | Some modules have also hidden (= non-documented) tunable values. | ||
14 | The choice of not documenting them is based on general belief, that | ||
15 | the less the user needs to know, the better. (There are things that | ||
16 | driver developers can use, others should not confuse themselves.) | ||
17 | |||
18 | In many cases it is highly preferred that insmod:ing is done | ||
19 | ONLY with defining an explicit address for the card, AND BY | ||
20 | NOT USING AUTO-PROBING! | ||
21 | |||
22 | Now most cards have some explicitly defined base address that they | ||
23 | are compiled with (to avoid auto-probing, among other things). | ||
24 | If that compiled value does not match your actual configuration, | ||
25 | do use the "io=0xXXX" -parameter for the insmod, and give there | ||
26 | a value matching your environment. | ||
27 | |||
28 | If you are adventurous, you can ask the driver to autoprobe | ||
29 | by using the "io=0" parameter, however it is a potentially dangerous | ||
30 | thing to do in a live system. (If you don't know where the | ||
31 | card is located, you can try autoprobing, and after possible | ||
32 | crash recovery, insmod with proper IO-address..) | ||
33 | |||
34 | -------------------------- | ||
35 | (*) "INSMOD-time" means when you load module with | ||
36 | /sbin/insmod you can feed it optional parameters. | ||
37 | See "man insmod". | ||
38 | -------------------------- | ||
39 | |||
40 | |||
41 | 8390 based Network Modules (Paul Gortmaker, Nov 12, 1995) | ||
42 | -------------------------- | ||
43 | |||
44 | (Includes: smc-ultra, ne, wd, 3c503, hp, hp-plus, e2100 and ac3200) | ||
45 | |||
46 | The 8390 series of network drivers now support multiple card systems without | ||
47 | reloading the same module multiple times (memory efficient!) This is done by | ||
48 | specifying multiple comma separated values, such as: | ||
49 | |||
50 | insmod 3c503.o io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1 | ||
51 | |||
52 | The above would have the one module controlling four 3c503 cards, with card 2 | ||
53 | and 4 using external transceivers. The "insmod" manual describes the usage | ||
54 | of comma separated value lists. | ||
55 | |||
56 | It is *STRONGLY RECOMMENDED* that you supply "io=" instead of autoprobing. | ||
57 | If an "io=" argument is not supplied, then the ISA drivers will complain | ||
58 | about autoprobing being not recommended, and begrudgingly autoprobe for | ||
59 | a *SINGLE CARD ONLY* -- if you want to use multiple cards you *have* to | ||
60 | supply an "io=0xNNN,0xQQQ,..." argument. | ||
61 | |||
62 | The ne module is an exception to the above. A NE2000 is essentially an | ||
63 | 8390 chip, some bus glue and some RAM. Because of this, the ne probe is | ||
64 | more invasive than the rest, and so at boot we make sure the ne probe is | ||
65 | done last of all the 8390 cards (so that it won't trip over other 8390 based | ||
66 | cards) With modules we can't ensure that all other non-ne 8390 cards have | ||
67 | already been found. Because of this, the ne module REQUIRES an "io=0xNNN" | ||
68 | argument passed in via insmod. It will refuse to autoprobe. | ||
69 | |||
70 | It is also worth noting that auto-IRQ probably isn't as reliable during | ||
71 | the flurry of interrupt activity on a running machine. Cards such as the | ||
72 | ne2000 that can't get the IRQ setting from an EEPROM or configuration | ||
73 | register are probably best supplied with an "irq=M" argument as well. | ||
74 | |||
75 | |||
76 | ---------------------------------------------------------------------- | ||
77 | Card/Module List - Configurable Parameters and Default Values | ||
78 | ---------------------------------------------------------------------- | ||
79 | |||
80 | 3c501.c: | ||
81 | io = 0x280 IO base address | ||
82 | irq = 5 IRQ | ||
83 | (Probes ports: 0x280, 0x300) | ||
84 | |||
85 | 3c503.c: | ||
86 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
87 | irq = 0 (IRQ software selected by driver using autoIRQ) | ||
88 | xcvr = 0 (Use xcvr=1 to select external transceiver.) | ||
89 | (Probes ports: 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2A0, 0x2E0) | ||
90 | |||
91 | 3c505.c: | ||
92 | io = 0 | ||
93 | irq = 0 | ||
94 | dma = 6 (not autoprobed) | ||
95 | (Probes ports: 0x300, 0x280, 0x310) | ||
96 | |||
97 | 3c507.c: | ||
98 | io = 0x300 | ||
99 | irq = 0 | ||
100 | (Probes ports: 0x300, 0x320, 0x340, 0x280) | ||
101 | |||
102 | 3c509.c: | ||
103 | io = 0 | ||
104 | irq = 0 | ||
105 | ( Module load-time probing Works reliably only on EISA, ISA ID-PROBE | ||
106 | IS NOT RELIABLE! Compile this driver statically into kernel for | ||
107 | now, if you need it auto-probing on an ISA-bus machine. ) | ||
108 | |||
109 | 8390.c: | ||
110 | (No public options, several other modules need this one) | ||
111 | |||
112 | a2065.c: | ||
113 | Since this is a Zorro board, it supports full autoprobing, even for | ||
114 | multiple boards. (m68k/Amiga) | ||
115 | |||
116 | ac3200.c: | ||
117 | io = 0 (Checks 0x1000 to 0x8fff in 0x1000 intervals) | ||
118 | irq = 0 (Read from config register) | ||
119 | (EISA probing..) | ||
120 | |||
121 | apricot.c: | ||
122 | io = 0x300 (Can't be altered!) | ||
123 | irq = 10 | ||
124 | |||
125 | arcnet.c: | ||
126 | io = 0 | ||
127 | irqnum = 0 | ||
128 | shmem = 0 | ||
129 | num = 0 | ||
130 | DO SET THESE MANUALLY AT INSMOD! | ||
131 | (When probing, looks at the following possible addresses: | ||
132 | Suggested ones: | ||
133 | 0x300, 0x2E0, 0x2F0, 0x2D0 | ||
134 | Other ones: | ||
135 | 0x200, 0x210, 0x220, 0x230, 0x240, 0x250, 0x260, 0x270, | ||
136 | 0x280, 0x290, 0x2A0, 0x2B0, 0x2C0, | ||
137 | 0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370, | ||
138 | 0x380, 0x390, 0x3A0, 0x3E0, 0x3F0 ) | ||
139 | |||
140 | ariadne.c: | ||
141 | Since this is a Zorro board, it supports full autoprobing, even for | ||
142 | multiple boards. (m68k/Amiga) | ||
143 | |||
144 | at1700.c: | ||
145 | io = 0x260 | ||
146 | irq = 0 | ||
147 | (Probes ports: 0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300) | ||
148 | |||
149 | atari_bionet.c: | ||
150 | Supports full autoprobing. (m68k/Atari) | ||
151 | |||
152 | atari_pamsnet.c: | ||
153 | Supports full autoprobing. (m68k/Atari) | ||
154 | |||
155 | atarilance.c: | ||
156 | Supports full autoprobing. (m68k/Atari) | ||
157 | |||
158 | atp.c: *Not modularized* | ||
159 | (Probes ports: 0x378, 0x278, 0x3BC; | ||
160 | fixed IRQs: 5 and 7 ) | ||
161 | |||
162 | cops.c: | ||
163 | io = 0x240 | ||
164 | irq = 5 | ||
165 | nodeid = 0 (AutoSelect = 0, NodeID 1-254 is hand selected.) | ||
166 | (Probes ports: 0x240, 0x340, 0x200, 0x210, 0x220, 0x230, 0x260, | ||
167 | 0x2A0, 0x300, 0x310, 0x320, 0x330, 0x350, 0x360) | ||
168 | |||
169 | de4x5.c: | ||
170 | io = 0x000b | ||
171 | irq = 10 | ||
172 | is_not_dec = 0 -- For non-DEC card using DEC 21040/21041/21140 chip, set this to 1 | ||
173 | (EISA, and PCI probing) | ||
174 | |||
175 | de600.c: | ||
176 | de600_debug = 0 | ||
177 | (On port 0x378, irq 7 -- lpt1; compile time configurable) | ||
178 | |||
179 | de620.c: | ||
180 | bnc = 0, utp = 0 <-- Force media by setting either. | ||
181 | io = 0x378 (also compile-time configurable) | ||
182 | irq = 7 | ||
183 | |||
184 | depca.c: | ||
185 | io = 0x200 | ||
186 | irq = 7 | ||
187 | (Probes ports: ISA: 0x300, 0x200; | ||
188 | EISA: 0x0c00 ) | ||
189 | |||
190 | dummy.c: | ||
191 | No options | ||
192 | |||
193 | e2100.c: | ||
194 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
195 | irq = 0 (IRQ software selected by driver) | ||
196 | mem = 0 (Override default shared memory start of 0xd0000) | ||
197 | xcvr = 0 (Use xcvr=1 to select external transceiver.) | ||
198 | (Probes ports: 0x300, 0x280, 0x380, 0x220) | ||
199 | |||
200 | eepro.c: | ||
201 | io = 0x200 | ||
202 | irq = 0 | ||
203 | (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0x360) | ||
204 | |||
205 | eexpress.c: | ||
206 | io = 0x300 | ||
207 | irq = 0 (IRQ value read from EEPROM) | ||
208 | (Probes ports: 0x300, 0x270, 0x320, 0x340) | ||
209 | |||
210 | eql.c: | ||
211 | (No parameters) | ||
212 | |||
213 | ewrk3.c: | ||
214 | io = 0x300 | ||
215 | irq = 5 | ||
216 | (With module no autoprobing! | ||
217 | On EISA-bus does EISA probing. | ||
218 | Static linkage probes ports on ISA bus: | ||
219 | 0x100, 0x120, 0x140, 0x160, 0x180, 0x1A0, 0x1C0, | ||
220 | 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, | ||
221 | 0x300, 0x340, 0x360, 0x380, 0x3A0, 0x3C0) | ||
222 | |||
223 | hp-plus.c: | ||
224 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
225 | irq = 0 (IRQ read from configuration register) | ||
226 | (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340) | ||
227 | |||
228 | hp.c: | ||
229 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
230 | irq = 0 (IRQ software selected by driver using autoIRQ) | ||
231 | (Probes ports: 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240) | ||
232 | |||
233 | hp100.c: | ||
234 | hp100_port = 0 (IO-base address) | ||
235 | (Does EISA-probing, if on EISA-slot; | ||
236 | On ISA-bus probes all ports from 0x100 thru to 0x3E0 | ||
237 | in increments of 0x020) | ||
238 | |||
239 | hydra.c: | ||
240 | Since this is a Zorro board, it supports full autoprobing, even for | ||
241 | multiple boards. (m68k/Amiga) | ||
242 | |||
243 | ibmtr.c: | ||
244 | io = 0xa20, 0xa24 (autoprobed by default) | ||
245 | irq = 0 (driver cannot select irq - read from hardware) | ||
246 | mem = 0 (shared memory base set at 0xd0000 and not yet | ||
247 | able to override thru mem= parameter.) | ||
248 | |||
249 | lance.c: *Not modularized* | ||
250 | (PCI, and ISA probing; "CONFIG_PCI" needed for PCI support) | ||
251 | (Probes ISA ports: 0x300, 0x320, 0x340, 0x360) | ||
252 | |||
253 | loopback.c: *Static kernel component* | ||
254 | |||
255 | ne.c: | ||
256 | io = 0 (Explicitly *requires* an "io=0xNNN" value) | ||
257 | irq = 0 (Tries to determine configured IRQ via autoIRQ) | ||
258 | (Probes ports: 0x300, 0x280, 0x320, 0x340, 0x360) | ||
259 | |||
260 | net_init.c: *Static kernel component* | ||
261 | |||
262 | ni52.c: *Not modularized* | ||
263 | (Probes ports: 0x300, 0x280, 0x360, 0x320, 0x340 | ||
264 | mems: 0xD0000, 0xD2000, 0xC8000, 0xCA000, | ||
265 | 0xD4000, 0xD6000, 0xD8000 ) | ||
266 | |||
267 | ni65.c: *Not modularized* **16MB MEMORY BARRIER BUG** | ||
268 | (Probes ports: 0x300, 0x320, 0x340, 0x360) | ||
269 | |||
270 | pi2.c: *Not modularized* (well, NON-STANDARD modularization!) | ||
271 | Only one card supported at this time. | ||
272 | (Probes ports: 0x380, 0x300, 0x320, 0x340, 0x360, 0x3A0) | ||
273 | |||
274 | plip.c: | ||
275 | io = 0 | ||
276 | irq = 0 (by default, uses IRQ 5 for port at 0x3bc, IRQ 7 | ||
277 | for port at 0x378, and IRQ 2 for port at 0x278) | ||
278 | (Probes ports: 0x278, 0x378, 0x3bc) | ||
279 | |||
280 | ppp.c: | ||
281 | No options (ppp-2.2+ has some, this is based on non-dynamic | ||
282 | version from ppp-2.1.2d) | ||
283 | |||
284 | seeq8005.c: *Not modularized* | ||
285 | (Probes ports: 0x300, 0x320, 0x340, 0x360) | ||
286 | |||
287 | sk_g16.c: *Not modularized* | ||
288 | (Probes ports: 0x100, 0x180, 0x208, 0x220m 0x288, 0x320, 0x328, 0x390) | ||
289 | |||
290 | skeleton.c: *Skeleton* | ||
291 | |||
292 | slhc.c: | ||
293 | No configuration parameters | ||
294 | |||
295 | slip.c: | ||
296 | slip_maxdev = 256 (default value from SL_NRUNIT on slip.h) | ||
297 | |||
298 | |||
299 | smc-ultra.c: | ||
300 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
301 | irq = 0 (IRQ val. read from EEPROM) | ||
302 | (Probes ports: 0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380) | ||
303 | |||
304 | tulip.c: *Partial modularization* | ||
305 | (init-time memory allocation makes problems..) | ||
306 | |||
307 | tunnel.c: | ||
308 | No insmod parameters | ||
309 | |||
310 | wavelan.c: | ||
311 | io = 0x390 (Settable, but change not recommended) | ||
312 | irq = 0 (Not honoured, if changed..) | ||
313 | |||
314 | wd.c: | ||
315 | io = 0 (It will complain if you don't supply an "io=0xNNN") | ||
316 | irq = 0 (IRQ val. read from EEPROM, ancient cards use autoIRQ) | ||
317 | mem = 0 (Force shared-memory on address 0xC8000, or whatever..) | ||
318 | mem_end = 0 (Force non-std. mem. size via supplying mem_end val.) | ||
319 | (eg. for 32k WD8003EBT, use mem=0xd0000 mem_end=0xd8000) | ||
320 | (Probes ports: 0x300, 0x280, 0x380, 0x240) | ||
321 | |||
322 | znet.c: *Not modularized* | ||
323 | (Only one device on Zenith Z-Note (notebook?) systems, | ||
324 | configuration information from (EE)PROM) | ||
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt new file mode 100644 index 000000000000..53618fb1a717 --- /dev/null +++ b/Documentation/networking/netconsole.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | |||
2 | started by Ingo Molnar <mingo@redhat.com>, 2001.09.17 | ||
3 | 2.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003 | ||
4 | |||
5 | Please send bug reports to Matt Mackall <mpm@selenic.com> | ||
6 | |||
7 | This module logs kernel printk messages over UDP allowing debugging of | ||
8 | problem where disk logging fails and serial consoles are impractical. | ||
9 | |||
10 | It can be used either built-in or as a module. As a built-in, | ||
11 | netconsole initializes immediately after NIC cards and will bring up | ||
12 | the specified interface as soon as possible. While this doesn't allow | ||
13 | capture of early kernel panics, it does capture most of the boot | ||
14 | process. | ||
15 | |||
16 | It takes a string configuration parameter "netconsole" in the | ||
17 | following format: | ||
18 | |||
19 | netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr] | ||
20 | |||
21 | where | ||
22 | src-port source for UDP packets (defaults to 6665) | ||
23 | src-ip source IP to use (interface address) | ||
24 | dev network interface (eth0) | ||
25 | tgt-port port for logging agent (6666) | ||
26 | tgt-ip IP address for logging agent | ||
27 | tgt-macaddr ethernet MAC address for logging agent (broadcast) | ||
28 | |||
29 | Examples: | ||
30 | |||
31 | linux netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc | ||
32 | |||
33 | or | ||
34 | |||
35 | insmod netconsole netconsole=@/,@10.0.0.2/ | ||
36 | |||
37 | Built-in netconsole starts immediately after the TCP stack is | ||
38 | initialized and attempts to bring up the supplied dev at the supplied | ||
39 | address. | ||
40 | |||
41 | The remote host can run either 'netcat -u -l -p <port>' or syslogd. | ||
42 | |||
43 | WARNING: the default target ethernet setting uses the broadcast | ||
44 | ethernet address to send packets, which can cause increased load on | ||
45 | other systems on the same ethernet segment. | ||
46 | |||
47 | NOTE: the network device (eth1 in the above case) can run any kind | ||
48 | of other network traffic, netconsole is not intrusive. Netconsole | ||
49 | might cause slight delays in other traffic if the volume of kernel | ||
50 | messages is high, but should have no other impact. | ||
51 | |||
52 | Netconsole was designed to be as instantaneous as possible, to | ||
53 | enable the logging of even the most critical kernel bugs. It works | ||
54 | from IRQ contexts as well, and does not enable interrupts while | ||
55 | sending packets. Due to these unique needs, configuration can not | ||
56 | be more automatic, and some fundamental limitations will remain: | ||
57 | only IP networks, UDP packets and ethernet devices are supported. | ||
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt new file mode 100644 index 000000000000..1509f3aff968 --- /dev/null +++ b/Documentation/networking/netdevices.txt | |||
@@ -0,0 +1,75 @@ | |||
1 | |||
2 | Network Devices, the Kernel, and You! | ||
3 | |||
4 | |||
5 | Introduction | ||
6 | ============ | ||
7 | The following is a random collection of documentation regarding | ||
8 | network devices. | ||
9 | |||
10 | struct net_device allocation rules | ||
11 | ================================== | ||
12 | Network device structures need to persist even after module is unloaded and | ||
13 | must be allocated with kmalloc. If device has registered successfully, | ||
14 | it will be freed on last use by free_netdev. This is required to handle the | ||
15 | pathologic case cleanly (example: rmmod mydriver </sys/class/net/myeth/mtu ) | ||
16 | |||
17 | There are routines in net_init.c to handle the common cases of | ||
18 | alloc_etherdev, alloc_netdev. These reserve extra space for driver | ||
19 | private data which gets freed when the network device is freed. If | ||
20 | separately allocated data is attached to the network device | ||
21 | (dev->priv) then it is up to the module exit handler to free that. | ||
22 | |||
23 | |||
24 | struct net_device synchronization rules | ||
25 | ======================================= | ||
26 | dev->open: | ||
27 | Synchronization: rtnl_lock() semaphore. | ||
28 | Context: process | ||
29 | |||
30 | dev->stop: | ||
31 | Synchronization: rtnl_lock() semaphore. | ||
32 | Context: process | ||
33 | Note1: netif_running() is guaranteed false | ||
34 | Note2: dev->poll() is guaranteed to be stopped | ||
35 | |||
36 | dev->do_ioctl: | ||
37 | Synchronization: rtnl_lock() semaphore. | ||
38 | Context: process | ||
39 | |||
40 | dev->get_stats: | ||
41 | Synchronization: dev_base_lock rwlock. | ||
42 | Context: nominally process, but don't sleep inside an rwlock | ||
43 | |||
44 | dev->hard_start_xmit: | ||
45 | Synchronization: dev->xmit_lock spinlock. | ||
46 | When the driver sets NETIF_F_LLTX in dev->features this will be | ||
47 | called without holding xmit_lock. In this case the driver | ||
48 | has to lock by itself when needed. It is recommended to use a try lock | ||
49 | for this and return -1 when the spin lock fails. | ||
50 | The locking there should also properly protect against | ||
51 | set_multicast_list | ||
52 | Context: BHs disabled | ||
53 | Notes: netif_queue_stopped() is guaranteed false | ||
54 | Return codes: | ||
55 | o NETDEV_TX_OK everything ok. | ||
56 | o NETDEV_TX_BUSY Cannot transmit packet, try later | ||
57 | Usually a bug, means queue start/stop flow control is broken in | ||
58 | the driver. Note: the driver must NOT put the skb in its DMA ring. | ||
59 | o NETDEV_TX_LOCKED Locking failed, please retry quickly. | ||
60 | Only valid when NETIF_F_LLTX is set. | ||
61 | |||
62 | dev->tx_timeout: | ||
63 | Synchronization: dev->xmit_lock spinlock. | ||
64 | Context: BHs disabled | ||
65 | Notes: netif_queue_stopped() is guaranteed true | ||
66 | |||
67 | dev->set_multicast_list: | ||
68 | Synchronization: dev->xmit_lock spinlock. | ||
69 | Context: BHs disabled | ||
70 | |||
71 | dev->poll: | ||
72 | Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See | ||
73 | dev_close code and comments in net/core/dev.c for more info. | ||
74 | Context: softirq | ||
75 | |||
diff --git a/Documentation/networking/netif-msg.txt b/Documentation/networking/netif-msg.txt new file mode 100644 index 000000000000..18ad4cea6259 --- /dev/null +++ b/Documentation/networking/netif-msg.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | |||
2 | ________________ | ||
3 | NETIF Msg Level | ||
4 | |||
5 | The design of the network interface message level setting. | ||
6 | |||
7 | History | ||
8 | |||
9 | The design of the debugging message interface was guided and | ||
10 | constrained by backwards compatibility previous practice. It is useful | ||
11 | to understand the history and evolution in order to understand current | ||
12 | practice and relate it to older driver source code. | ||
13 | |||
14 | From the beginning of Linux, each network device driver has had a local | ||
15 | integer variable that controls the debug message level. The message | ||
16 | level ranged from 0 to 7, and monotonically increased in verbosity. | ||
17 | |||
18 | The message level was not precisely defined past level 3, but were | ||
19 | always implemented within +-1 of the specified level. Drivers tended | ||
20 | to shed the more verbose level messages as they matured. | ||
21 | 0 Minimal messages, only essential information on fatal errors. | ||
22 | 1 Standard messages, initialization status. No run-time messages | ||
23 | 2 Special media selection messages, generally timer-driver. | ||
24 | 3 Interface starts and stops, including normal status messages | ||
25 | 4 Tx and Rx frame error messages, and abnormal driver operation | ||
26 | 5 Tx packet queue information, interrupt events. | ||
27 | 6 Status on each completed Tx packet and received Rx packets | ||
28 | 7 Initial contents of Tx and Rx packets | ||
29 | |||
30 | Initially this message level variable was uniquely named in each driver | ||
31 | e.g. "lance_debug", so that a kernel symbolic debugger could locate and | ||
32 | modify the setting. When kernel modules became common, the variables | ||
33 | were consistently renamed to "debug" and allowed to be set as a module | ||
34 | parameter. | ||
35 | |||
36 | This approach worked well. However there is always a demand for | ||
37 | additional features. Over the years the following emerged as | ||
38 | reasonable and easily implemented enhancements | ||
39 | Using an ioctl() call to modify the level. | ||
40 | Per-interface rather than per-driver message level setting. | ||
41 | More selective control over the type of messages emitted. | ||
42 | |||
43 | The netif_msg recommandation adds these features with only a minor | ||
44 | complexity and code size increase. | ||
45 | |||
46 | The recommendation is the following points | ||
47 | Retaining the per-driver integer variable "debug" as a module | ||
48 | parameter with a default level of '1'. | ||
49 | |||
50 | Adding a per-interface private variable named "msg_enable". The | ||
51 | variable is a bit map rather than a level, and is initialized as | ||
52 | 1 << debug | ||
53 | Or more precisely | ||
54 | debug < 0 ? 0 : 1 << min(sizeof(int)-1, debug) | ||
55 | |||
56 | Messages should changes from | ||
57 | if (debug > 1) | ||
58 | printk(MSG_DEBUG "%s: ... | ||
59 | to | ||
60 | if (np->msg_enable & NETIF_MSG_LINK) | ||
61 | printk(MSG_DEBUG "%s: ... | ||
62 | |||
63 | |||
64 | The set of message levels is named | ||
65 | Old level Name Bit position | ||
66 | 0 NETIF_MSG_DRV 0x0001 | ||
67 | 1 NETIF_MSG_PROBE 0x0002 | ||
68 | 2 NETIF_MSG_LINK 0x0004 | ||
69 | 2 NETIF_MSG_TIMER 0x0004 | ||
70 | 3 NETIF_MSG_IFDOWN 0x0008 | ||
71 | 3 NETIF_MSG_IFUP 0x0008 | ||
72 | 4 NETIF_MSG_RX_ERR 0x0010 | ||
73 | 4 NETIF_MSG_TX_ERR 0x0010 | ||
74 | 5 NETIF_MSG_TX_QUEUED 0x0020 | ||
75 | 5 NETIF_MSG_INTR 0x0020 | ||
76 | 6 NETIF_MSG_TX_DONE 0x0040 | ||
77 | 6 NETIF_MSG_RX_STATUS 0x0040 | ||
78 | 7 NETIF_MSG_PKTDATA 0x0080 | ||
79 | |||
diff --git a/Documentation/networking/olympic.txt b/Documentation/networking/olympic.txt new file mode 100644 index 000000000000..c65a94010ea8 --- /dev/null +++ b/Documentation/networking/olympic.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | |||
2 | IBM PCI Pit/Pit-Phy/Olympic CHIPSET BASED TOKEN RING CARDS README | ||
3 | |||
4 | Release 0.2.0 - Release | ||
5 | June 8th 1999 Peter De Schrijver & Mike Phillips | ||
6 | Release 0.9.C - Release | ||
7 | April 18th 2001 Mike Phillips | ||
8 | |||
9 | Thanks: | ||
10 | Erik De Cock, Adrian Bridgett and Frank Fiene for their | ||
11 | patience and testing. | ||
12 | Donald Champion for the cardbus support | ||
13 | Kyle Lucke for the dma api changes. | ||
14 | Jonathon Bitner for hardware support. | ||
15 | Everybody on linux-tr for their continued support. | ||
16 | |||
17 | Options: | ||
18 | |||
19 | The driver accepts four options: ringspeed, pkt_buf_sz, | ||
20 | message_level and network_monitor. | ||
21 | |||
22 | These options can be specified differently for each card found. | ||
23 | |||
24 | ringspeed: Has one of three settings 0 (default), 4 or 16. 0 will | ||
25 | make the card autosense the ringspeed and join at the appropriate speed, | ||
26 | this will be the default option for most people. 4 or 16 allow you to | ||
27 | explicitly force the card to operate at a certain speed. The card will fail | ||
28 | if you try to insert it at the wrong speed. (Although some hubs will allow | ||
29 | this so be *very* careful). The main purpose for explicitly setting the ring | ||
30 | speed is for when the card is first on the ring. In autosense mode, if the card | ||
31 | cannot detect any active monitors on the ring it will not open, so you must | ||
32 | re-init the card at the appropriate speed. Unfortunately at present the only | ||
33 | way of doing this is rmmod and insmod which is a bit tough if it is compiled | ||
34 | in the kernel. | ||
35 | |||
36 | pkt_buf_sz: This is this initial receive buffer allocation size. This will | ||
37 | default to 4096 if no value is entered. You may increase performance of the | ||
38 | driver by setting this to a value larger than the network packet size, although | ||
39 | the driver now re-sizes buffers based on MTU settings as well. | ||
40 | |||
41 | message_level: Controls level of messages created by the driver. Defaults to 0: | ||
42 | which only displays start-up and critical messages. Presently any non-zero | ||
43 | value will display all soft messages as well. NB This does not turn | ||
44 | debugging messages on, that must be done by modified the source code. | ||
45 | |||
46 | network_monitor: Any non-zero value will provide a quasi network monitoring | ||
47 | mode. All unexpected MAC frames (beaconing etc.) will be received | ||
48 | by the driver and the source and destination addresses printed. | ||
49 | Also an entry will be added in /proc/net called olympic_tr%d, where tr%d | ||
50 | is the registered device name, i.e tr0, tr1, etc. This displays low | ||
51 | level information about the configuration of the ring and the adapter. | ||
52 | This feature has been designed for network administrators to assist in | ||
53 | the diagnosis of network / ring problems. (This used to OLYMPIC_NETWORK_MONITOR, | ||
54 | but has now changed to allow each adapter to be configured differently and | ||
55 | to alleviate the necessity to re-compile olympic to turn the option on). | ||
56 | |||
57 | Multi-card: | ||
58 | |||
59 | The driver will detect multiple cards and will work with shared interrupts, | ||
60 | each card is assigned the next token ring device, i.e. tr0 , tr1, tr2. The | ||
61 | driver should also happily reside in the system with other drivers. It has | ||
62 | been tested with ibmtr.c running, and I personally have had one Olicom PCI | ||
63 | card and two IBM olympic cards (all on the same interrupt), all running | ||
64 | together. | ||
65 | |||
66 | Variable MTU size: | ||
67 | |||
68 | The driver can handle a MTU size upto either 4500 or 18000 depending upon | ||
69 | ring speed. The driver also changes the size of the receive buffers as part | ||
70 | of the mtu re-sizing, so if you set mtu = 18000, you will need to be able | ||
71 | to allocate 16 * (sk_buff with 18000 buffer size) call it 18500 bytes per ring | ||
72 | position = 296,000 bytes of memory space, plus of course anything | ||
73 | necessary for the tx sk_buff's. Remember this is per card, so if you are | ||
74 | building routers, gateway's etc, you could start to use a lot of memory | ||
75 | real fast. | ||
76 | |||
77 | |||
78 | 6/8/99 Peter De Schrijver and Mike Phillips | ||
79 | |||
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt new file mode 100644 index 000000000000..8d4cf78258e4 --- /dev/null +++ b/Documentation/networking/packet_mmap.txt | |||
@@ -0,0 +1,399 @@ | |||
1 | -------------------------------------------------------------------------------- | ||
2 | + ABSTRACT | ||
3 | -------------------------------------------------------------------------------- | ||
4 | |||
5 | This file documents the CONFIG_PACKET_MMAP option available with the PACKET | ||
6 | socket interface on 2.4 and 2.6 kernels. This type of sockets is used for | ||
7 | capture network traffic with utilities like tcpdump or any other that uses | ||
8 | the libpcap library. | ||
9 | |||
10 | You can find the latest version of this document at | ||
11 | |||
12 | http://pusa.uv.es/~ulisses/packet_mmap/ | ||
13 | |||
14 | Please send me your comments to | ||
15 | |||
16 | Ulisses Alonso Camaró <uaca@i.hate.spam.alumni.uv.es> | ||
17 | |||
18 | ------------------------------------------------------------------------------- | ||
19 | + Why use PACKET_MMAP | ||
20 | -------------------------------------------------------------------------------- | ||
21 | |||
22 | In Linux 2.4/2.6 if PACKET_MMAP is not enabled, the capture process is very | ||
23 | inefficient. It uses very limited buffers and requires one system call | ||
24 | to capture each packet, it requires two if you want to get packet's | ||
25 | timestamp (like libpcap always does). | ||
26 | |||
27 | In the other hand PACKET_MMAP is very efficient. PACKET_MMAP provides a size | ||
28 | configurable circular buffer mapped in user space. This way reading packets just | ||
29 | needs to wait for them, most of the time there is no need to issue a single | ||
30 | system call. By using a shared buffer between the kernel and the user | ||
31 | also has the benefit of minimizing packet copies. | ||
32 | |||
33 | It's fine to use PACKET_MMAP to improve the performance of the capture process, | ||
34 | but it isn't everything. At least, if you are capturing at high speeds (this | ||
35 | is relative to the cpu speed), you should check if the device driver of your | ||
36 | network interface card supports some sort of interrupt load mitigation or | ||
37 | (even better) if it supports NAPI, also make sure it is enabled. | ||
38 | |||
39 | -------------------------------------------------------------------------------- | ||
40 | + How to use CONFIG_PACKET_MMAP | ||
41 | -------------------------------------------------------------------------------- | ||
42 | |||
43 | From the user standpoint, you should use the higher level libpcap library, wich | ||
44 | is a de facto standard, portable across nearly all operating systems | ||
45 | including Win32. | ||
46 | |||
47 | Said that, at time of this writing, official libpcap 0.8.1 is out and doesn't include | ||
48 | support for PACKET_MMAP, and also probably the libpcap included in your distribution. | ||
49 | |||
50 | I'm aware of two implementations of PACKET_MMAP in libpcap: | ||
51 | |||
52 | http://pusa.uv.es/~ulisses/packet_mmap/ (by Simon Patarin, based on libpcap 0.6.2) | ||
53 | http://public.lanl.gov/cpw/ (by Phil Wood, based on lastest libpcap) | ||
54 | |||
55 | The rest of this document is intended for people who want to understand | ||
56 | the low level details or want to improve libpcap by including PACKET_MMAP | ||
57 | support. | ||
58 | |||
59 | -------------------------------------------------------------------------------- | ||
60 | + How to use CONFIG_PACKET_MMAP directly | ||
61 | -------------------------------------------------------------------------------- | ||
62 | |||
63 | From the system calls stand point, the use of PACKET_MMAP involves | ||
64 | the following process: | ||
65 | |||
66 | |||
67 | [setup] socket() -------> creation of the capture socket | ||
68 | setsockopt() ---> allocation of the circular buffer (ring) | ||
69 | mmap() ---------> maping of the allocated buffer to the | ||
70 | user process | ||
71 | |||
72 | [capture] poll() ---------> to wait for incoming packets | ||
73 | |||
74 | [shutdown] close() --------> destruction of the capture socket and | ||
75 | deallocation of all associated | ||
76 | resources. | ||
77 | |||
78 | |||
79 | socket creation and destruction is straight forward, and is done | ||
80 | the same way with or without PACKET_MMAP: | ||
81 | |||
82 | int fd; | ||
83 | |||
84 | fd= socket(PF_PACKET, mode, htons(ETH_P_ALL)) | ||
85 | |||
86 | where mode is SOCK_RAW for the raw interface were link level | ||
87 | information can be captured or SOCK_DGRAM for the cooked | ||
88 | interface where link level information capture is not | ||
89 | supported and a link level pseudo-header is provided | ||
90 | by the kernel. | ||
91 | |||
92 | The destruction of the socket and all associated resources | ||
93 | is done by a simple call to close(fd). | ||
94 | |||
95 | Next I will describe PACKET_MMAP settings and it's constraints, | ||
96 | also the maping of the circular buffer in the user process and | ||
97 | the use of this buffer. | ||
98 | |||
99 | -------------------------------------------------------------------------------- | ||
100 | + PACKET_MMAP settings | ||
101 | -------------------------------------------------------------------------------- | ||
102 | |||
103 | |||
104 | To setup PACKET_MMAP from user level code is done with a call like | ||
105 | |||
106 | setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, sizeof(req)) | ||
107 | |||
108 | The most significant argument in the previous call is the req parameter, | ||
109 | this parameter must to have the following structure: | ||
110 | |||
111 | struct tpacket_req | ||
112 | { | ||
113 | unsigned int tp_block_size; /* Minimal size of contiguous block */ | ||
114 | unsigned int tp_block_nr; /* Number of blocks */ | ||
115 | unsigned int tp_frame_size; /* Size of frame */ | ||
116 | unsigned int tp_frame_nr; /* Total number of frames */ | ||
117 | }; | ||
118 | |||
119 | This structure is defined in /usr/include/linux/if_packet.h and establishes a | ||
120 | circular buffer (ring) of unswappable memory mapped in the capture process. | ||
121 | Being mapped in the capture process allows reading the captured frames and | ||
122 | related meta-information like timestamps without requiring a system call. | ||
123 | |||
124 | Captured frames are grouped in blocks. Each block is a physically contiguous | ||
125 | region of memory and holds tp_block_size/tp_frame_size frames. The total number | ||
126 | of blocks is tp_block_nr. Note that tp_frame_nr is a redundant parameter because | ||
127 | |||
128 | frames_per_block = tp_block_size/tp_frame_size | ||
129 | |||
130 | indeed, packet_set_ring checks that the following condition is true | ||
131 | |||
132 | frames_per_block * tp_block_nr == tp_frame_nr | ||
133 | |||
134 | |||
135 | Lets see an example, with the following values: | ||
136 | |||
137 | tp_block_size= 4096 | ||
138 | tp_frame_size= 2048 | ||
139 | tp_block_nr = 4 | ||
140 | tp_frame_nr = 8 | ||
141 | |||
142 | we will get the following buffer structure: | ||
143 | |||
144 | block #1 block #2 | ||
145 | +---------+---------+ +---------+---------+ | ||
146 | | frame 1 | frame 2 | | frame 3 | frame 4 | | ||
147 | +---------+---------+ +---------+---------+ | ||
148 | |||
149 | block #3 block #4 | ||
150 | +---------+---------+ +---------+---------+ | ||
151 | | frame 5 | frame 6 | | frame 7 | frame 8 | | ||
152 | +---------+---------+ +---------+---------+ | ||
153 | |||
154 | A frame can be of any size with the only condition it can fit in a block. A block | ||
155 | can only hold an integer number of frames, or in other words, a frame cannot | ||
156 | be spawn accross two blocks so there are some datails you have to take into | ||
157 | account when choosing the frame_size. See "Maping and use of the circular | ||
158 | buffer (ring)". | ||
159 | |||
160 | |||
161 | -------------------------------------------------------------------------------- | ||
162 | + PACKET_MMAP setting constraints | ||
163 | -------------------------------------------------------------------------------- | ||
164 | |||
165 | In kernel versions prior to 2.4.26 (for the 2.4 branch) and 2.6.5 (2.6 branch), | ||
166 | the PACKET_MMAP buffer could hold only 32768 frames in a 32 bit architecture or | ||
167 | 16384 in a 64 bit architecture. For information on these kernel versions | ||
168 | see http://pusa.uv.es/~ulisses/packet_mmap/packet_mmap.pre-2.4.26_2.6.5.txt | ||
169 | |||
170 | Block size limit | ||
171 | ------------------ | ||
172 | |||
173 | As stated earlier, each block is a contiguous physical region of memory. These | ||
174 | memory regions are allocated with calls to the __get_free_pages() function. As | ||
175 | the name indicates, this function allocates pages of memory, and the second | ||
176 | argument is "order" or a power of two number of pages, that is | ||
177 | (for PAGE_SIZE == 4096) order=0 ==> 4096 bytes, order=1 ==> 8192 bytes, | ||
178 | order=2 ==> 16384 bytes, etc. The maximum size of a | ||
179 | region allocated by __get_free_pages is determined by the MAX_ORDER macro. More | ||
180 | precisely the limit can be calculated as: | ||
181 | |||
182 | PAGE_SIZE << MAX_ORDER | ||
183 | |||
184 | In a i386 architecture PAGE_SIZE is 4096 bytes | ||
185 | In a 2.4/i386 kernel MAX_ORDER is 10 | ||
186 | In a 2.6/i386 kernel MAX_ORDER is 11 | ||
187 | |||
188 | So get_free_pages can allocate as much as 4MB or 8MB in a 2.4/2.6 kernel | ||
189 | respectively, with an i386 architecture. | ||
190 | |||
191 | User space programs can include /usr/include/sys/user.h and | ||
192 | /usr/include/linux/mmzone.h to get PAGE_SIZE MAX_ORDER declarations. | ||
193 | |||
194 | The pagesize can also be determined dynamically with the getpagesize (2) | ||
195 | system call. | ||
196 | |||
197 | |||
198 | Block number limit | ||
199 | -------------------- | ||
200 | |||
201 | To understand the constraints of PACKET_MMAP, we have to see the structure | ||
202 | used to hold the pointers to each block. | ||
203 | |||
204 | Currently, this structure is a dynamically allocated vector with kmalloc | ||
205 | called pg_vec, its size limits the number of blocks that can be allocated. | ||
206 | |||
207 | +---+---+---+---+ | ||
208 | | x | x | x | x | | ||
209 | +---+---+---+---+ | ||
210 | | | | | | ||
211 | | | | v | ||
212 | | | v block #4 | ||
213 | | v block #3 | ||
214 | v block #2 | ||
215 | block #1 | ||
216 | |||
217 | |||
218 | kmalloc allocates any number of bytes of phisically contiguous memory from | ||
219 | a pool of pre-determined sizes. This pool of memory is mantained by the slab | ||
220 | allocator wich is at the end the responsible for doing the allocation and | ||
221 | hence wich imposes the maximum memory that kmalloc can allocate. | ||
222 | |||
223 | In a 2.4/2.6 kernel and the i386 architecture, the limit is 131072 bytes. The | ||
224 | predetermined sizes that kmalloc uses can be checked in the "size-<bytes>" | ||
225 | entries of /proc/slabinfo | ||
226 | |||
227 | In a 32 bit architecture, pointers are 4 bytes long, so the total number of | ||
228 | pointers to blocks is | ||
229 | |||
230 | 131072/4 = 32768 blocks | ||
231 | |||
232 | |||
233 | PACKET_MMAP buffer size calculator | ||
234 | ------------------------------------ | ||
235 | |||
236 | Definitions: | ||
237 | |||
238 | <size-max> : is the maximum size of allocable with kmalloc (see /proc/slabinfo) | ||
239 | <pointer size>: depends on the architecture -- sizeof(void *) | ||
240 | <page size> : depends on the architecture -- PAGE_SIZE or getpagesize (2) | ||
241 | <max-order> : is the value defined with MAX_ORDER | ||
242 | <frame size> : it's an upper bound of frame's capture size (more on this later) | ||
243 | |||
244 | from these definitions we will derive | ||
245 | |||
246 | <block number> = <size-max>/<pointer size> | ||
247 | <block size> = <pagesize> << <max-order> | ||
248 | |||
249 | so, the max buffer size is | ||
250 | |||
251 | <block number> * <block size> | ||
252 | |||
253 | and, the number of frames be | ||
254 | |||
255 | <block number> * <block size> / <frame size> | ||
256 | |||
257 | Suposse the following parameters, wich apply for 2.6 kernel and an | ||
258 | i386 architecture: | ||
259 | |||
260 | <size-max> = 131072 bytes | ||
261 | <pointer size> = 4 bytes | ||
262 | <pagesize> = 4096 bytes | ||
263 | <max-order> = 11 | ||
264 | |||
265 | and a value for <frame size> of 2048 byteas. These parameters will yield | ||
266 | |||
267 | <block number> = 131072/4 = 32768 blocks | ||
268 | <block size> = 4096 << 11 = 8 MiB. | ||
269 | |||
270 | and hence the buffer will have a 262144 MiB size. So it can hold | ||
271 | 262144 MiB / 2048 bytes = 134217728 frames | ||
272 | |||
273 | |||
274 | Actually, this buffer size is not possible with an i386 architecture. | ||
275 | Remember that the memory is allocated in kernel space, in the case of | ||
276 | an i386 kernel's memory size is limited to 1GiB. | ||
277 | |||
278 | All memory allocations are not freed until the socket is closed. The memory | ||
279 | allocations are done with GFP_KERNEL priority, this basically means that | ||
280 | the allocation can wait and swap other process' memory in order to allocate | ||
281 | the nececessary memory, so normally limits can be reached. | ||
282 | |||
283 | Other constraints | ||
284 | ------------------- | ||
285 | |||
286 | If you check the source code you will see that what I draw here as a frame | ||
287 | is not only the link level frame. At the begining of each frame there is a | ||
288 | header called struct tpacket_hdr used in PACKET_MMAP to hold link level's frame | ||
289 | meta information like timestamp. So what we draw here a frame it's really | ||
290 | the following (from include/linux/if_packet.h): | ||
291 | |||
292 | /* | ||
293 | Frame structure: | ||
294 | |||
295 | - Start. Frame must be aligned to TPACKET_ALIGNMENT=16 | ||
296 | - struct tpacket_hdr | ||
297 | - pad to TPACKET_ALIGNMENT=16 | ||
298 | - struct sockaddr_ll | ||
299 | - Gap, chosen so that packet data (Start+tp_net) alignes to | ||
300 | TPACKET_ALIGNMENT=16 | ||
301 | - Start+tp_mac: [ Optional MAC header ] | ||
302 | - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16. | ||
303 | - Pad to align to TPACKET_ALIGNMENT=16 | ||
304 | */ | ||
305 | |||
306 | |||
307 | The following are conditions that are checked in packet_set_ring | ||
308 | |||
309 | tp_block_size must be a multiple of PAGE_SIZE (1) | ||
310 | tp_frame_size must be greater than TPACKET_HDRLEN (obvious) | ||
311 | tp_frame_size must be a multiple of TPACKET_ALIGNMENT | ||
312 | tp_frame_nr must be exactly frames_per_block*tp_block_nr | ||
313 | |||
314 | Note that tp_block_size should be choosed to be a power of two or there will | ||
315 | be a waste of memory. | ||
316 | |||
317 | -------------------------------------------------------------------------------- | ||
318 | + Maping and use of the circular buffer (ring) | ||
319 | -------------------------------------------------------------------------------- | ||
320 | |||
321 | The maping of the buffer in the user process is done with the conventional | ||
322 | mmap function. Even the circular buffer is compound of several physically | ||
323 | discontiguous blocks of memory, they are contiguous to the user space, hence | ||
324 | just one call to mmap is needed: | ||
325 | |||
326 | mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); | ||
327 | |||
328 | If tp_frame_size is a divisor of tp_block_size frames will be | ||
329 | contiguosly spaced by tp_frame_size bytes. If not, each | ||
330 | tp_block_size/tp_frame_size frames there will be a gap between | ||
331 | the frames. This is because a frame cannot be spawn across two | ||
332 | blocks. | ||
333 | |||
334 | At the beginning of each frame there is an status field (see | ||
335 | struct tpacket_hdr). If this field is 0 means that the frame is ready | ||
336 | to be used for the kernel, If not, there is a frame the user can read | ||
337 | and the following flags apply: | ||
338 | |||
339 | from include/linux/if_packet.h | ||
340 | |||
341 | #define TP_STATUS_COPY 2 | ||
342 | #define TP_STATUS_LOSING 4 | ||
343 | #define TP_STATUS_CSUMNOTREADY 8 | ||
344 | |||
345 | |||
346 | TP_STATUS_COPY : This flag indicates that the frame (and associated | ||
347 | meta information) has been truncated because it's | ||
348 | larger than tp_frame_size. This packet can be | ||
349 | read entirely with recvfrom(). | ||
350 | |||
351 | In order to make this work it must to be | ||
352 | enabled previously with setsockopt() and | ||
353 | the PACKET_COPY_THRESH option. | ||
354 | |||
355 | The number of frames than can be buffered to | ||
356 | be read with recvfrom is limited like a normal socket. | ||
357 | See the SO_RCVBUF option in the socket (7) man page. | ||
358 | |||
359 | TP_STATUS_LOSING : indicates there were packet drops from last time | ||
360 | statistics where checked with getsockopt() and | ||
361 | the PACKET_STATISTICS option. | ||
362 | |||
363 | TP_STATUS_CSUMNOTREADY: currently it's used for outgoing IP packets wich | ||
364 | it's checksum will be done in hardware. So while | ||
365 | reading the packet we should not try to check the | ||
366 | checksum. | ||
367 | |||
368 | for convenience there are also the following defines: | ||
369 | |||
370 | #define TP_STATUS_KERNEL 0 | ||
371 | #define TP_STATUS_USER 1 | ||
372 | |||
373 | The kernel initializes all frames to TP_STATUS_KERNEL, when the kernel | ||
374 | receives a packet it puts in the buffer and updates the status with | ||
375 | at least the TP_STATUS_USER flag. Then the user can read the packet, | ||
376 | once the packet is read the user must zero the status field, so the kernel | ||
377 | can use again that frame buffer. | ||
378 | |||
379 | The user can use poll (any other variant should apply too) to check if new | ||
380 | packets are in the ring: | ||
381 | |||
382 | struct pollfd pfd; | ||
383 | |||
384 | pfd.fd = fd; | ||
385 | pfd.revents = 0; | ||
386 | pfd.events = POLLIN|POLLRDNORM|POLLERR; | ||
387 | |||
388 | if (status == TP_STATUS_KERNEL) | ||
389 | retval = poll(&pfd, 1, timeout); | ||
390 | |||
391 | It doesn't incur in a race condition to first check the status value and | ||
392 | then poll for frames. | ||
393 | |||
394 | -------------------------------------------------------------------------------- | ||
395 | + THANKS | ||
396 | -------------------------------------------------------------------------------- | ||
397 | |||
398 | Jesse Brandeburg, for fixing my grammathical/spelling errors | ||
399 | |||
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt new file mode 100644 index 000000000000..cc4b4d04129c --- /dev/null +++ b/Documentation/networking/pktgen.txt | |||
@@ -0,0 +1,214 @@ | |||
1 | |||
2 | |||
3 | HOWTO for the linux packet generator | ||
4 | ------------------------------------ | ||
5 | |||
6 | Date: 041221 | ||
7 | |||
8 | Enable CONFIG_NET_PKTGEN to compile and build pktgen.o either in kernel | ||
9 | or as module. Module is preferred. insmod pktgen if needed. Once running | ||
10 | pktgen creates a thread on each CPU where each thread has affinty it's CPU. | ||
11 | Monitoring and controlling is done via /proc. Easiest to select a suitable | ||
12 | a sample script and configure. | ||
13 | |||
14 | On a dual CPU: | ||
15 | |||
16 | ps aux | grep pkt | ||
17 | root 129 0.3 0.0 0 0 ? SW 2003 523:20 [pktgen/0] | ||
18 | root 130 0.3 0.0 0 0 ? SW 2003 509:50 [pktgen/1] | ||
19 | |||
20 | |||
21 | For montoring and control pktgen creates: | ||
22 | /proc/net/pktgen/pgctrl | ||
23 | /proc/net/pktgen/kpktgend_X | ||
24 | /proc/net/pktgen/ethX | ||
25 | |||
26 | |||
27 | Viewing threads | ||
28 | =============== | ||
29 | /proc/net/pktgen/kpktgend_0 | ||
30 | Name: kpktgend_0 max_before_softirq: 10000 | ||
31 | Running: | ||
32 | Stopped: eth1 | ||
33 | Result: OK: max_before_softirq=10000 | ||
34 | |||
35 | Most important the devices assigend to thread. Note! A device can only belong | ||
36 | to one thread. | ||
37 | |||
38 | |||
39 | Viewing devices | ||
40 | =============== | ||
41 | |||
42 | Parm section holds configured info. Current hold running stats. | ||
43 | Result is printed after run or after interruption. Example: | ||
44 | |||
45 | /proc/net/pktgen/eth1 | ||
46 | |||
47 | Params: count 10000000 min_pkt_size: 60 max_pkt_size: 60 | ||
48 | frags: 0 delay: 0 clone_skb: 1000000 ifname: eth1 | ||
49 | flows: 0 flowlen: 0 | ||
50 | dst_min: 10.10.11.2 dst_max: | ||
51 | src_min: src_max: | ||
52 | src_mac: 00:00:00:00:00:00 dst_mac: 00:04:23:AC:FD:82 | ||
53 | udp_src_min: 9 udp_src_max: 9 udp_dst_min: 9 udp_dst_max: 9 | ||
54 | src_mac_count: 0 dst_mac_count: 0 | ||
55 | Flags: | ||
56 | Current: | ||
57 | pkts-sofar: 10000000 errors: 39664 | ||
58 | started: 1103053986245187us stopped: 1103053999346329us idle: 880401us | ||
59 | seq_num: 10000011 cur_dst_mac_offset: 0 cur_src_mac_offset: 0 | ||
60 | cur_saddr: 0x10a0a0a cur_daddr: 0x20b0a0a | ||
61 | cur_udp_dst: 9 cur_udp_src: 9 | ||
62 | flows: 0 | ||
63 | Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags) | ||
64 | 763292pps 390Mb/sec (390805504bps) errors: 39664 | ||
65 | |||
66 | Confguring threads and devices | ||
67 | ============================== | ||
68 | This is done via the /proc interface easiest done via pgset in the scripts | ||
69 | |||
70 | Examples: | ||
71 | |||
72 | pgset "clone_skb 1" sets the number of copies of the same packet | ||
73 | pgset "clone_skb 0" use single SKB for all transmits | ||
74 | pgset "pkt_size 9014" sets packet size to 9014 | ||
75 | pgset "frags 5" packet will consist of 5 fragments | ||
76 | pgset "count 200000" sets number of packets to send, set to zero | ||
77 | for continious sends untill explicitl stopped. | ||
78 | |||
79 | pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds | ||
80 | |||
81 | pgset "dst 10.0.0.1" sets IP destination address | ||
82 | (BEWARE! This generator is very aggressive!) | ||
83 | |||
84 | pgset "dst_min 10.0.0.1" Same as dst | ||
85 | pgset "dst_max 10.0.0.254" Set the maximum destination IP. | ||
86 | pgset "src_min 10.0.0.1" Set the minimum (or only) source IP. | ||
87 | pgset "src_max 10.0.0.254" Set the maximum source IP. | ||
88 | pgset "dst6 fec0::1" IPV6 destination address | ||
89 | pgset "src6 fec0::2" IPV6 source address | ||
90 | pgset "dstmac 00:00:00:00:00:00" sets MAC destination address | ||
91 | pgset "srcmac 00:00:00:00:00:00" sets MAC source address | ||
92 | |||
93 | pgset "src_mac_count 1" Sets the number of MACs we'll range through. | ||
94 | The 'minimum' MAC is what you set with srcmac. | ||
95 | |||
96 | pgset "dst_mac_count 1" Sets the number of MACs we'll range through. | ||
97 | The 'minimum' MAC is what you set with dstmac. | ||
98 | |||
99 | pgset "flag [name]" Set a flag to determine behaviour. Current flags | ||
100 | are: IPSRC_RND #IP Source is random (between min/max), | ||
101 | IPDST_RND, UDPSRC_RND, | ||
102 | UDPDST_RND, MACSRC_RND, MACDST_RND | ||
103 | |||
104 | pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then | ||
105 | cycle through the port range. | ||
106 | |||
107 | pgset "udp_src_max 9" set UDP source port max. | ||
108 | pgset "udp_dst_min 9" set UDP destination port min, If < udp_dst_max, then | ||
109 | cycle through the port range. | ||
110 | pgset "udp_dst_max 9" set UDP destination port max. | ||
111 | |||
112 | pgset stop aborts injection. Also, ^C aborts generator. | ||
113 | |||
114 | |||
115 | Example scripts | ||
116 | =============== | ||
117 | |||
118 | A collection of small tutorial scripts for pktgen is in expamples dir. | ||
119 | |||
120 | pktgen.conf-1-1 # 1 CPU 1 dev | ||
121 | pktgen.conf-1-2 # 1 CPU 2 dev | ||
122 | pktgen.conf-2-1 # 2 CPU's 1 dev | ||
123 | pktgen.conf-2-2 # 2 CPU's 2 dev | ||
124 | pktgen.conf-1-1-rdos # 1 CPU 1 dev w. route DoS | ||
125 | pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6 | ||
126 | pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS | ||
127 | pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows. | ||
128 | |||
129 | Run in shell: ./pktgen.conf-X-Y It does all the setup including sending. | ||
130 | |||
131 | |||
132 | Interrupt affinity | ||
133 | =================== | ||
134 | Note when adding devices to a specific CPU there good idea to also assign | ||
135 | /proc/irq/XX/smp_affinity so the TX-interrupts gets bound to the same CPU. | ||
136 | as this reduces cache bouncing when freeing skb's. | ||
137 | |||
138 | |||
139 | Current commands and configuration options | ||
140 | ========================================== | ||
141 | |||
142 | ** Pgcontrol commands: | ||
143 | |||
144 | start | ||
145 | stop | ||
146 | |||
147 | ** Thread commands: | ||
148 | |||
149 | add_device | ||
150 | rem_device_all | ||
151 | max_before_softirq | ||
152 | |||
153 | |||
154 | ** Device commands: | ||
155 | |||
156 | count | ||
157 | clone_skb | ||
158 | debug | ||
159 | |||
160 | frags | ||
161 | delay | ||
162 | |||
163 | src_mac_count | ||
164 | dst_mac_count | ||
165 | |||
166 | pkt_size | ||
167 | min_pkt_size | ||
168 | max_pkt_size | ||
169 | |||
170 | udp_src_min | ||
171 | udp_src_max | ||
172 | |||
173 | udp_dst_min | ||
174 | udp_dst_max | ||
175 | |||
176 | flag | ||
177 | IPSRC_RND | ||
178 | TXSIZE_RND | ||
179 | IPDST_RND | ||
180 | UDPSRC_RND | ||
181 | UDPDST_RND | ||
182 | MACSRC_RND | ||
183 | MACDST_RND | ||
184 | |||
185 | dst_min | ||
186 | dst_max | ||
187 | |||
188 | src_min | ||
189 | src_max | ||
190 | |||
191 | dst_mac | ||
192 | src_mac | ||
193 | |||
194 | clear_counters | ||
195 | |||
196 | dst6 | ||
197 | src6 | ||
198 | |||
199 | flows | ||
200 | flowlen | ||
201 | |||
202 | References: | ||
203 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ | ||
204 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ | ||
205 | |||
206 | Paper from Linux-Kongress in Erlangen 2004. | ||
207 | ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/pktgen_paper.pdf | ||
208 | |||
209 | Thanks to: | ||
210 | Grant Grundler for testing on IA-64 and parisc, Harald Welte, Lennert Buytenhek | ||
211 | Stephen Hemminger, Andi Kleen, Dave Miller and many others. | ||
212 | |||
213 | |||
214 | Good luck with the linux net-development. \ No newline at end of file | ||
diff --git a/Documentation/networking/policy-routing.txt b/Documentation/networking/policy-routing.txt new file mode 100644 index 000000000000..36f6936d7f21 --- /dev/null +++ b/Documentation/networking/policy-routing.txt | |||
@@ -0,0 +1,150 @@ | |||
1 | Classes | ||
2 | ------- | ||
3 | |||
4 | "Class" is a complete routing table in common sense. | ||
5 | I.e. it is tree of nodes (destination prefix, tos, metric) | ||
6 | with attached information: gateway, device etc. | ||
7 | This tree is looked up as specified in RFC1812 5.2.4.3 | ||
8 | 1. Basic match | ||
9 | 2. Longest match | ||
10 | 3. Weak TOS. | ||
11 | 4. Metric. (should not be in kernel space, but they are) | ||
12 | 5. Additional pruning rules. (not in kernel space). | ||
13 | |||
14 | We have two special type of nodes: | ||
15 | REJECT - abort route lookup and return an error value. | ||
16 | THROW - abort route lookup in this class. | ||
17 | |||
18 | |||
19 | Currently the number of classes is limited to 255 | ||
20 | (0 is reserved for "not specified class") | ||
21 | |||
22 | Three classes are builtin: | ||
23 | |||
24 | RT_CLASS_LOCAL=255 - local interface addresses, | ||
25 | broadcasts, nat addresses. | ||
26 | |||
27 | RT_CLASS_MAIN=254 - all normal routes are put there | ||
28 | by default. | ||
29 | |||
30 | RT_CLASS_DEFAULT=253 - if ip_fib_model==1, then | ||
31 | normal default routes are put there, if ip_fib_model==2 | ||
32 | all gateway routes are put there. | ||
33 | |||
34 | |||
35 | Rules | ||
36 | ----- | ||
37 | Rule is a record of (src prefix, src interface, tos, dst prefix) | ||
38 | with attached information. | ||
39 | |||
40 | Rule types: | ||
41 | RTP_ROUTE - lookup in attached class | ||
42 | RTP_NAT - lookup in attached class and if a match is found, | ||
43 | translate packet source address. | ||
44 | RTP_MASQUERADE - lookup in attached class and if a match is found, | ||
45 | masquerade packet as sourced by us. | ||
46 | RTP_DROP - silently drop the packet. | ||
47 | RTP_REJECT - drop the packet and send ICMP NET UNREACHABLE. | ||
48 | RTP_PROHIBIT - drop the packet and send ICMP COMM. ADM. PROHIBITED. | ||
49 | |||
50 | Rule flags: | ||
51 | RTRF_LOG - log route creations. | ||
52 | RTRF_VALVE - One way route (used with masquerading) | ||
53 | |||
54 | Default setup: | ||
55 | |||
56 | root@amber:/pub/ip-routing # iproute -r | ||
57 | Kernel routing policy rules | ||
58 | Pref Source Destination TOS Iface Cl | ||
59 | 0 default default 00 * 255 | ||
60 | 254 default default 00 * 254 | ||
61 | 255 default default 00 * 253 | ||
62 | |||
63 | |||
64 | Lookup algorithm | ||
65 | ---------------- | ||
66 | |||
67 | We scan rules list, and if a rule is matched, apply it. | ||
68 | If a route is found, return it. | ||
69 | If it is not found or a THROW node was matched, continue | ||
70 | to scan rules. | ||
71 | |||
72 | Applications | ||
73 | ------------ | ||
74 | |||
75 | 1. Just ignore classes. All the routes are put into MAIN class | ||
76 | (and/or into DEFAULT class). | ||
77 | |||
78 | HOWTO: iproute add PREFIX [ tos TOS ] [ gw GW ] [ dev DEV ] | ||
79 | [ metric METRIC ] [ reject ] ... (look at iproute utility) | ||
80 | |||
81 | or use route utility from current net-tools. | ||
82 | |||
83 | 2. Opposite case. Just forget all that you know about routing | ||
84 | tables. Every rule is supplied with its own gateway, device | ||
85 | info. record. This approach is not appropriate for automated | ||
86 | route maintenance, but it is ideal for manual configuration. | ||
87 | |||
88 | HOWTO: iproute addrule [ from PREFIX ] [ to PREFIX ] [ tos TOS ] | ||
89 | [ dev INPUTDEV] [ pref PREFERENCE ] route [ gw GATEWAY ] | ||
90 | [ dev OUTDEV ] ..... | ||
91 | |||
92 | Warning: As of now the size of the routing table in this | ||
93 | approach is limited to 256. If someone likes this model, I'll | ||
94 | relax this limitation. | ||
95 | |||
96 | 3. OSPF classes (see RFC1583, RFC1812 E.3.3) | ||
97 | Very clean, stable and robust algorithm for OSPF routing | ||
98 | domains. Unfortunately, it is not widely used in the Internet. | ||
99 | |||
100 | Proposed setup: | ||
101 | 255 local addresses | ||
102 | 254 interface routes | ||
103 | 253 ASE routes with external metric | ||
104 | 252 ASE routes with internal metric | ||
105 | 251 inter-area routes | ||
106 | 250 intra-area routes for 1st area | ||
107 | 249 intra-area routes for 2nd area | ||
108 | etc. | ||
109 | |||
110 | Rules: | ||
111 | iproute addrule class 253 | ||
112 | iproute addrule class 252 | ||
113 | iproute addrule class 251 | ||
114 | iproute addrule to a-prefix-for-1st-area class 250 | ||
115 | iproute addrule to another-prefix-for-1st-area class 250 | ||
116 | ... | ||
117 | iproute addrule to a-prefix-for-2nd-area class 249 | ||
118 | ... | ||
119 | |||
120 | Area classes must be terminated with reject record. | ||
121 | iproute add default reject class 250 | ||
122 | iproute add default reject class 249 | ||
123 | ... | ||
124 | |||
125 | 4. The Variant Router Requirements Algorithm (RFC1812 E.3.2) | ||
126 | Create 16 classes for different TOS values. | ||
127 | It is a funny, but pretty useless algorithm. | ||
128 | I listed it just to show the power of new routing code. | ||
129 | |||
130 | 5. All the variety of combinations...... | ||
131 | |||
132 | |||
133 | GATED | ||
134 | ----- | ||
135 | |||
136 | Gated does not understand classes, but it will work | ||
137 | happily in MAIN+DEFAULT. All policy routes can be set | ||
138 | and maintained manually. | ||
139 | |||
140 | IMPORTANT NOTE | ||
141 | -------------- | ||
142 | route.c has a compilation time switch CONFIG_IP_LOCAL_RT_POLICY. | ||
143 | If it is set, locally originated packets are routed | ||
144 | using all the policy list. This is not very convenient and | ||
145 | pretty ambiguous when used with NAT and masquerading. | ||
146 | I set it to FALSE by default. | ||
147 | |||
148 | |||
149 | Alexey Kuznetov | ||
150 | kuznet@ms2.inr.ac.ru | ||
diff --git a/Documentation/networking/ppp_generic.txt b/Documentation/networking/ppp_generic.txt new file mode 100644 index 000000000000..15b5172fbb98 --- /dev/null +++ b/Documentation/networking/ppp_generic.txt | |||
@@ -0,0 +1,432 @@ | |||
1 | PPP Generic Driver and Channel Interface | ||
2 | ---------------------------------------- | ||
3 | |||
4 | Paul Mackerras | ||
5 | paulus@samba.org | ||
6 | 7 Feb 2002 | ||
7 | |||
8 | The generic PPP driver in linux-2.4 provides an implementation of the | ||
9 | functionality which is of use in any PPP implementation, including: | ||
10 | |||
11 | * the network interface unit (ppp0 etc.) | ||
12 | * the interface to the networking code | ||
13 | * PPP multilink: splitting datagrams between multiple links, and | ||
14 | ordering and combining received fragments | ||
15 | * the interface to pppd, via a /dev/ppp character device | ||
16 | * packet compression and decompression | ||
17 | * TCP/IP header compression and decompression | ||
18 | * detecting network traffic for demand dialling and for idle timeouts | ||
19 | * simple packet filtering | ||
20 | |||
21 | For sending and receiving PPP frames, the generic PPP driver calls on | ||
22 | the services of PPP `channels'. A PPP channel encapsulates a | ||
23 | mechanism for transporting PPP frames from one machine to another. A | ||
24 | PPP channel implementation can be arbitrarily complex internally but | ||
25 | has a very simple interface with the generic PPP code: it merely has | ||
26 | to be able to send PPP frames, receive PPP frames, and optionally | ||
27 | handle ioctl requests. Currently there are PPP channel | ||
28 | implementations for asynchronous serial ports, synchronous serial | ||
29 | ports, and for PPP over ethernet. | ||
30 | |||
31 | This architecture makes it possible to implement PPP multilink in a | ||
32 | natural and straightforward way, by allowing more than one channel to | ||
33 | be linked to each ppp network interface unit. The generic layer is | ||
34 | responsible for splitting datagrams on transmit and recombining them | ||
35 | on receive. | ||
36 | |||
37 | |||
38 | PPP channel API | ||
39 | --------------- | ||
40 | |||
41 | See include/linux/ppp_channel.h for the declaration of the types and | ||
42 | functions used to communicate between the generic PPP layer and PPP | ||
43 | channels. | ||
44 | |||
45 | Each channel has to provide two functions to the generic PPP layer, | ||
46 | via the ppp_channel.ops pointer: | ||
47 | |||
48 | * start_xmit() is called by the generic layer when it has a frame to | ||
49 | send. The channel has the option of rejecting the frame for | ||
50 | flow-control reasons. In this case, start_xmit() should return 0 | ||
51 | and the channel should call the ppp_output_wakeup() function at a | ||
52 | later time when it can accept frames again, and the generic layer | ||
53 | will then attempt to retransmit the rejected frame(s). If the frame | ||
54 | is accepted, the start_xmit() function should return 1. | ||
55 | |||
56 | * ioctl() provides an interface which can be used by a user-space | ||
57 | program to control aspects of the channel's behaviour. This | ||
58 | procedure will be called when a user-space program does an ioctl | ||
59 | system call on an instance of /dev/ppp which is bound to the | ||
60 | channel. (Usually it would only be pppd which would do this.) | ||
61 | |||
62 | The generic PPP layer provides seven functions to channels: | ||
63 | |||
64 | * ppp_register_channel() is called when a channel has been created, to | ||
65 | notify the PPP generic layer of its presence. For example, setting | ||
66 | a serial port to the PPPDISC line discipline causes the ppp_async | ||
67 | channel code to call this function. | ||
68 | |||
69 | * ppp_unregister_channel() is called when a channel is to be | ||
70 | destroyed. For example, the ppp_async channel code calls this when | ||
71 | a hangup is detected on the serial port. | ||
72 | |||
73 | * ppp_output_wakeup() is called by a channel when it has previously | ||
74 | rejected a call to its start_xmit function, and can now accept more | ||
75 | packets. | ||
76 | |||
77 | * ppp_input() is called by a channel when it has received a complete | ||
78 | PPP frame. | ||
79 | |||
80 | * ppp_input_error() is called by a channel when it has detected that a | ||
81 | frame has been lost or dropped (for example, because of a FCS (frame | ||
82 | check sequence) error). | ||
83 | |||
84 | * ppp_channel_index() returns the channel index assigned by the PPP | ||
85 | generic layer to this channel. The channel should provide some way | ||
86 | (e.g. an ioctl) to transmit this back to user-space, as user-space | ||
87 | will need it to attach an instance of /dev/ppp to this channel. | ||
88 | |||
89 | * ppp_unit_number() returns the unit number of the ppp network | ||
90 | interface to which this channel is connected, or -1 if the channel | ||
91 | is not connected. | ||
92 | |||
93 | Connecting a channel to the ppp generic layer is initiated from the | ||
94 | channel code, rather than from the generic layer. The channel is | ||
95 | expected to have some way for a user-level process to control it | ||
96 | independently of the ppp generic layer. For example, with the | ||
97 | ppp_async channel, this is provided by the file descriptor to the | ||
98 | serial port. | ||
99 | |||
100 | Generally a user-level process will initialize the underlying | ||
101 | communications medium and prepare it to do PPP. For example, with an | ||
102 | async tty, this can involve setting the tty speed and modes, issuing | ||
103 | modem commands, and then going through some sort of dialog with the | ||
104 | remote system to invoke PPP service there. We refer to this process | ||
105 | as `discovery'. Then the user-level process tells the medium to | ||
106 | become a PPP channel and register itself with the generic PPP layer. | ||
107 | The channel then has to report the channel number assigned to it back | ||
108 | to the user-level process. From that point, the PPP negotiation code | ||
109 | in the PPP daemon (pppd) can take over and perform the PPP | ||
110 | negotiation, accessing the channel through the /dev/ppp interface. | ||
111 | |||
112 | At the interface to the PPP generic layer, PPP frames are stored in | ||
113 | skbuff structures and start with the two-byte PPP protocol number. | ||
114 | The frame does *not* include the 0xff `address' byte or the 0x03 | ||
115 | `control' byte that are optionally used in async PPP. Nor is there | ||
116 | any escaping of control characters, nor are there any FCS or framing | ||
117 | characters included. That is all the responsibility of the channel | ||
118 | code, if it is needed for the particular medium. That is, the skbuffs | ||
119 | presented to the start_xmit() function contain only the 2-byte | ||
120 | protocol number and the data, and the skbuffs presented to ppp_input() | ||
121 | must be in the same format. | ||
122 | |||
123 | The channel must provide an instance of a ppp_channel struct to | ||
124 | represent the channel. The channel is free to use the `private' field | ||
125 | however it wishes. The channel should initialize the `mtu' and | ||
126 | `hdrlen' fields before calling ppp_register_channel() and not change | ||
127 | them until after ppp_unregister_channel() returns. The `mtu' field | ||
128 | represents the maximum size of the data part of the PPP frames, that | ||
129 | is, it does not include the 2-byte protocol number. | ||
130 | |||
131 | If the channel needs some headroom in the skbuffs presented to it for | ||
132 | transmission (i.e., some space free in the skbuff data area before the | ||
133 | start of the PPP frame), it should set the `hdrlen' field of the | ||
134 | ppp_channel struct to the amount of headroom required. The generic | ||
135 | PPP layer will attempt to provide that much headroom but the channel | ||
136 | should still check if there is sufficient headroom and copy the skbuff | ||
137 | if there isn't. | ||
138 | |||
139 | On the input side, channels should ideally provide at least 2 bytes of | ||
140 | headroom in the skbuffs presented to ppp_input(). The generic PPP | ||
141 | code does not require this but will be more efficient if this is done. | ||
142 | |||
143 | |||
144 | Buffering and flow control | ||
145 | -------------------------- | ||
146 | |||
147 | The generic PPP layer has been designed to minimize the amount of data | ||
148 | that it buffers in the transmit direction. It maintains a queue of | ||
149 | transmit packets for the PPP unit (network interface device) plus a | ||
150 | queue of transmit packets for each attached channel. Normally the | ||
151 | transmit queue for the unit will contain at most one packet; the | ||
152 | exceptions are when pppd sends packets by writing to /dev/ppp, and | ||
153 | when the core networking code calls the generic layer's start_xmit() | ||
154 | function with the queue stopped, i.e. when the generic layer has | ||
155 | called netif_stop_queue(), which only happens on a transmit timeout. | ||
156 | The start_xmit function always accepts and queues the packet which it | ||
157 | is asked to transmit. | ||
158 | |||
159 | Transmit packets are dequeued from the PPP unit transmit queue and | ||
160 | then subjected to TCP/IP header compression and packet compression | ||
161 | (Deflate or BSD-Compress compression), as appropriate. After this | ||
162 | point the packets can no longer be reordered, as the decompression | ||
163 | algorithms rely on receiving compressed packets in the same order that | ||
164 | they were generated. | ||
165 | |||
166 | If multilink is not in use, this packet is then passed to the attached | ||
167 | channel's start_xmit() function. If the channel refuses to take | ||
168 | the packet, the generic layer saves it for later transmission. The | ||
169 | generic layer will call the channel's start_xmit() function again | ||
170 | when the channel calls ppp_output_wakeup() or when the core | ||
171 | networking code calls the generic layer's start_xmit() function | ||
172 | again. The generic layer contains no timeout and retransmission | ||
173 | logic; it relies on the core networking code for that. | ||
174 | |||
175 | If multilink is in use, the generic layer divides the packet into one | ||
176 | or more fragments and puts a multilink header on each fragment. It | ||
177 | decides how many fragments to use based on the length of the packet | ||
178 | and the number of channels which are potentially able to accept a | ||
179 | fragment at the moment. A channel is potentially able to accept a | ||
180 | fragment if it doesn't have any fragments currently queued up for it | ||
181 | to transmit. The channel may still refuse a fragment; in this case | ||
182 | the fragment is queued up for the channel to transmit later. This | ||
183 | scheme has the effect that more fragments are given to higher- | ||
184 | bandwidth channels. It also means that under light load, the generic | ||
185 | layer will tend to fragment large packets across all the channels, | ||
186 | thus reducing latency, while under heavy load, packets will tend to be | ||
187 | transmitted as single fragments, thus reducing the overhead of | ||
188 | fragmentation. | ||
189 | |||
190 | |||
191 | SMP safety | ||
192 | ---------- | ||
193 | |||
194 | The PPP generic layer has been designed to be SMP-safe. Locks are | ||
195 | used around accesses to the internal data structures where necessary | ||
196 | to ensure their integrity. As part of this, the generic layer | ||
197 | requires that the channels adhere to certain requirements and in turn | ||
198 | provides certain guarantees to the channels. Essentially the channels | ||
199 | are required to provide the appropriate locking on the ppp_channel | ||
200 | structures that form the basis of the communication between the | ||
201 | channel and the generic layer. This is because the channel provides | ||
202 | the storage for the ppp_channel structure, and so the channel is | ||
203 | required to provide the guarantee that this storage exists and is | ||
204 | valid at the appropriate times. | ||
205 | |||
206 | The generic layer requires these guarantees from the channel: | ||
207 | |||
208 | * The ppp_channel object must exist from the time that | ||
209 | ppp_register_channel() is called until after the call to | ||
210 | ppp_unregister_channel() returns. | ||
211 | |||
212 | * No thread may be in a call to any of ppp_input(), ppp_input_error(), | ||
213 | ppp_output_wakeup(), ppp_channel_index() or ppp_unit_number() for a | ||
214 | channel at the time that ppp_unregister_channel() is called for that | ||
215 | channel. | ||
216 | |||
217 | * ppp_register_channel() and ppp_unregister_channel() must be called | ||
218 | from process context, not interrupt or softirq/BH context. | ||
219 | |||
220 | * The remaining generic layer functions may be called at softirq/BH | ||
221 | level but must not be called from a hardware interrupt handler. | ||
222 | |||
223 | * The generic layer may call the channel start_xmit() function at | ||
224 | softirq/BH level but will not call it at interrupt level. Thus the | ||
225 | start_xmit() function may not block. | ||
226 | |||
227 | * The generic layer will only call the channel ioctl() function in | ||
228 | process context. | ||
229 | |||
230 | The generic layer provides these guarantees to the channels: | ||
231 | |||
232 | * The generic layer will not call the start_xmit() function for a | ||
233 | channel while any thread is already executing in that function for | ||
234 | that channel. | ||
235 | |||
236 | * The generic layer will not call the ioctl() function for a channel | ||
237 | while any thread is already executing in that function for that | ||
238 | channel. | ||
239 | |||
240 | * By the time a call to ppp_unregister_channel() returns, no thread | ||
241 | will be executing in a call from the generic layer to that channel's | ||
242 | start_xmit() or ioctl() function, and the generic layer will not | ||
243 | call either of those functions subsequently. | ||
244 | |||
245 | |||
246 | Interface to pppd | ||
247 | ----------------- | ||
248 | |||
249 | The PPP generic layer exports a character device interface called | ||
250 | /dev/ppp. This is used by pppd to control PPP interface units and | ||
251 | channels. Although there is only one /dev/ppp, each open instance of | ||
252 | /dev/ppp acts independently and can be attached either to a PPP unit | ||
253 | or a PPP channel. This is achieved using the file->private_data field | ||
254 | to point to a separate object for each open instance of /dev/ppp. In | ||
255 | this way an effect similar to Solaris' clone open is obtained, | ||
256 | allowing us to control an arbitrary number of PPP interfaces and | ||
257 | channels without having to fill up /dev with hundreds of device names. | ||
258 | |||
259 | When /dev/ppp is opened, a new instance is created which is initially | ||
260 | unattached. Using an ioctl call, it can then be attached to an | ||
261 | existing unit, attached to a newly-created unit, or attached to an | ||
262 | existing channel. An instance attached to a unit can be used to send | ||
263 | and receive PPP control frames, using the read() and write() system | ||
264 | calls, along with poll() if necessary. Similarly, an instance | ||
265 | attached to a channel can be used to send and receive PPP frames on | ||
266 | that channel. | ||
267 | |||
268 | In multilink terms, the unit represents the bundle, while the channels | ||
269 | represent the individual physical links. Thus, a PPP frame sent by a | ||
270 | write to the unit (i.e., to an instance of /dev/ppp attached to the | ||
271 | unit) will be subject to bundle-level compression and to fragmentation | ||
272 | across the individual links (if multilink is in use). In contrast, a | ||
273 | PPP frame sent by a write to the channel will be sent as-is on that | ||
274 | channel, without any multilink header. | ||
275 | |||
276 | A channel is not initially attached to any unit. In this state it can | ||
277 | be used for PPP negotiation but not for the transfer of data packets. | ||
278 | It can then be connected to a PPP unit with an ioctl call, which | ||
279 | makes it available to send and receive data packets for that unit. | ||
280 | |||
281 | The ioctl calls which are available on an instance of /dev/ppp depend | ||
282 | on whether it is unattached, attached to a PPP interface, or attached | ||
283 | to a PPP channel. The ioctl calls which are available on an | ||
284 | unattached instance are: | ||
285 | |||
286 | * PPPIOCNEWUNIT creates a new PPP interface and makes this /dev/ppp | ||
287 | instance the "owner" of the interface. The argument should point to | ||
288 | an int which is the desired unit number if >= 0, or -1 to assign the | ||
289 | lowest unused unit number. Being the owner of the interface means | ||
290 | that the interface will be shut down if this instance of /dev/ppp is | ||
291 | closed. | ||
292 | |||
293 | * PPPIOCATTACH attaches this instance to an existing PPP interface. | ||
294 | The argument should point to an int containing the unit number. | ||
295 | This does not make this instance the owner of the PPP interface. | ||
296 | |||
297 | * PPPIOCATTCHAN attaches this instance to an existing PPP channel. | ||
298 | The argument should point to an int containing the channel number. | ||
299 | |||
300 | The ioctl calls available on an instance of /dev/ppp attached to a | ||
301 | channel are: | ||
302 | |||
303 | * PPPIOCDETACH detaches the instance from the channel. This ioctl is | ||
304 | deprecated since the same effect can be achieved by closing the | ||
305 | instance. In order to prevent possible races this ioctl will fail | ||
306 | with an EINVAL error if more than one file descriptor refers to this | ||
307 | instance (i.e. as a result of dup(), dup2() or fork()). | ||
308 | |||
309 | * PPPIOCCONNECT connects this channel to a PPP interface. The | ||
310 | argument should point to an int containing the interface unit | ||
311 | number. It will return an EINVAL error if the channel is already | ||
312 | connected to an interface, or ENXIO if the requested interface does | ||
313 | not exist. | ||
314 | |||
315 | * PPPIOCDISCONN disconnects this channel from the PPP interface that | ||
316 | it is connected to. It will return an EINVAL error if the channel | ||
317 | is not connected to an interface. | ||
318 | |||
319 | * All other ioctl commands are passed to the channel ioctl() function. | ||
320 | |||
321 | The ioctl calls that are available on an instance that is attached to | ||
322 | an interface unit are: | ||
323 | |||
324 | * PPPIOCSMRU sets the MRU (maximum receive unit) for the interface. | ||
325 | The argument should point to an int containing the new MRU value. | ||
326 | |||
327 | * PPPIOCSFLAGS sets flags which control the operation of the | ||
328 | interface. The argument should be a pointer to an int containing | ||
329 | the new flags value. The bits in the flags value that can be set | ||
330 | are: | ||
331 | SC_COMP_TCP enable transmit TCP header compression | ||
332 | SC_NO_TCP_CCID disable connection-id compression for | ||
333 | TCP header compression | ||
334 | SC_REJ_COMP_TCP disable receive TCP header decompression | ||
335 | SC_CCP_OPEN Compression Control Protocol (CCP) is | ||
336 | open, so inspect CCP packets | ||
337 | SC_CCP_UP CCP is up, may (de)compress packets | ||
338 | SC_LOOP_TRAFFIC send IP traffic to pppd | ||
339 | SC_MULTILINK enable PPP multilink fragmentation on | ||
340 | transmitted packets | ||
341 | SC_MP_SHORTSEQ expect short multilink sequence | ||
342 | numbers on received multilink fragments | ||
343 | SC_MP_XSHORTSEQ transmit short multilink sequence nos. | ||
344 | |||
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 | ||
347 | SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option | ||
348 | is not selected. | ||
349 | |||
350 | * PPPIOCGFLAGS returns the value of the status/control flags for the | ||
351 | interface unit. The argument should point to an int where the ioctl | ||
352 | will store the flags value. As well as the values listed above for | ||
353 | PPPIOCSFLAGS, the following bits may be set in the returned value: | ||
354 | SC_COMP_RUN CCP compressor is running | ||
355 | SC_DECOMP_RUN CCP decompressor is running | ||
356 | SC_DC_ERROR CCP decompressor detected non-fatal error | ||
357 | SC_DC_FERROR CCP decompressor detected fatal error | ||
358 | |||
359 | * PPPIOCSCOMPRESS sets the parameters for packet compression or | ||
360 | decompression. The argument should point to a ppp_option_data | ||
361 | structure (defined in <linux/if_ppp.h>), which contains a | ||
362 | pointer/length pair which should describe a block of memory | ||
363 | containing a CCP option specifying a compression method and its | ||
364 | parameters. The ppp_option_data struct also contains a `transmit' | ||
365 | field. If this is 0, the ioctl will affect the receive path, | ||
366 | otherwise the transmit path. | ||
367 | |||
368 | * PPPIOCGUNIT returns, in the int pointed to by the argument, the unit | ||
369 | number of this interface unit. | ||
370 | |||
371 | * PPPIOCSDEBUG sets the debug flags for the interface to the value in | ||
372 | the int pointed to by the argument. Only the least significant bit | ||
373 | is used; if this is 1 the generic layer will print some debug | ||
374 | messages during its operation. This is only intended for debugging | ||
375 | the generic PPP layer code; it is generally not helpful for working | ||
376 | out why a PPP connection is failing. | ||
377 | |||
378 | * PPPIOCGDEBUG returns the debug flags for the interface in the int | ||
379 | pointed to by the argument. | ||
380 | |||
381 | * PPPIOCGIDLE returns the time, in seconds, since the last data | ||
382 | packets were sent and received. The argument should point to a | ||
383 | ppp_idle structure (defined in <linux/ppp_defs.h>). If the | ||
384 | CONFIG_PPP_FILTER option is enabled, the set of packets which reset | ||
385 | the transmit and receive idle timers is restricted to those which | ||
386 | pass the `active' packet filter. | ||
387 | |||
388 | * PPPIOCSMAXCID sets the maximum connection-ID parameter (and thus the | ||
389 | number of connection slots) for the TCP header compressor and | ||
390 | decompressor. The lower 16 bits of the int pointed to by the | ||
391 | argument specify the maximum connection-ID for the compressor. If | ||
392 | the upper 16 bits of that int are non-zero, they specify the maximum | ||
393 | connection-ID for the decompressor, otherwise the decompressor's | ||
394 | maximum connection-ID is set to 15. | ||
395 | |||
396 | * PPPIOCSNPMODE sets the network-protocol mode for a given network | ||
397 | protocol. The argument should point to an npioctl struct (defined | ||
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 | ||
400 | specifies what to do with packets for that protocol: | ||
401 | |||
402 | NPMODE_PASS normal operation, transmit and receive packets | ||
403 | NPMODE_DROP silently drop packets for this protocol | ||
404 | NPMODE_ERROR drop packets and return an error on transmit | ||
405 | NPMODE_QUEUE queue up packets for transmit, drop received | ||
406 | packets | ||
407 | |||
408 | At present NPMODE_ERROR and NPMODE_QUEUE have the same effect as | ||
409 | NPMODE_DROP. | ||
410 | |||
411 | * PPPIOCGNPMODE returns the network-protocol mode for a given | ||
412 | protocol. The argument should point to an npioctl struct with the | ||
413 | `protocol' field set to the PPP protocol number for the protocol of | ||
414 | interest. On return the `mode' field will be set to the network- | ||
415 | protocol mode for that protocol. | ||
416 | |||
417 | * PPPIOCSPASS and PPPIOCSACTIVE set the `pass' and `active' packet | ||
418 | filters. These ioctls are only available if the CONFIG_PPP_FILTER | ||
419 | option is selected. The argument should point to a sock_fprog | ||
420 | structure (defined in <linux/filter.h>) containing the compiled BPF | ||
421 | instructions for the filter. Packets are dropped if they fail the | ||
422 | `pass' filter; otherwise, if they fail the `active' filter they are | ||
423 | passed but they do not reset the transmit or receive idle timer. | ||
424 | |||
425 | * PPPIOCSMRRU enables or disables multilink processing for received | ||
426 | packets and sets the multilink MRRU (maximum reconstructed receive | ||
427 | unit). The argument should point to an int containing the new MRRU | ||
428 | value. If the MRRU value is 0, processing of received multilink | ||
429 | fragments is disabled. This ioctl is only available if the | ||
430 | CONFIG_PPP_MULTILINK option is selected. | ||
431 | |||
432 | Last modified: 7-feb-2002 | ||
diff --git a/Documentation/networking/proc_net_tcp.txt b/Documentation/networking/proc_net_tcp.txt new file mode 100644 index 000000000000..59cb915c3713 --- /dev/null +++ b/Documentation/networking/proc_net_tcp.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | This document describes the interfaces /proc/net/tcp and /proc/net/tcp6. | ||
2 | |||
3 | These /proc interfaces provide information about currently active TCP | ||
4 | connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and | ||
5 | tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively. | ||
6 | |||
7 | It will first list all listening TCP sockets, and next list all established | ||
8 | TCP connections. A typical entry of /proc/net/tcp would look like this (split | ||
9 | up into 3 parts because of the length of the line): | ||
10 | |||
11 | 46: 010310AC:9C4C 030310AC:1770 01 | ||
12 | | | | | | |--> connection state | ||
13 | | | | | |------> remote TCP port number | ||
14 | | | | |-------------> remote IPv4 address | ||
15 | | | |--------------------> local TCP port number | ||
16 | | |---------------------------> local IPv4 address | ||
17 | |----------------------------------> number of entry | ||
18 | |||
19 | 00000150:00000000 01:00000019 00000000 | ||
20 | | | | | |--> number of unrecovered RTO timeouts | ||
21 | | | | |----------> number of jiffies until timer expires | ||
22 | | | |----------------> timer_active (see below) | ||
23 | | |----------------------> receive-queue | ||
24 | |-------------------------------> transmit-queue | ||
25 | |||
26 | 1000 0 54165785 4 cd1e6040 25 4 27 3 -1 | ||
27 | | | | | | | | | | |--> slow start size threshold, | ||
28 | | | | | | | | | | or -1 if the treshold | ||
29 | | | | | | | | | | is >= 0xFFFF | ||
30 | | | | | | | | | |----> sending congestion window | ||
31 | | | | | | | | |-------> (ack.quick<<1)|ack.pingpong | ||
32 | | | | | | | |---------> Predicted tick of soft clock | ||
33 | | | | | | | (delayed ACK control data) | ||
34 | | | | | | |------------> retransmit timeout | ||
35 | | | | | |------------------> location of socket in memory | ||
36 | | | | |-----------------------> socket reference count | ||
37 | | | |-----------------------------> inode | ||
38 | | |----------------------------------> unanswered 0-window probes | ||
39 | |---------------------------------------------> uid | ||
40 | |||
41 | timer_active: | ||
42 | 0 no timer is pending | ||
43 | 1 retransmit-timer is pending | ||
44 | 2 another timer (e.g. delayed ack or keepalive) is pending | ||
45 | 3 this is a socket in TIME_WAIT state. Not all fields will contain | ||
46 | data (or even exist) | ||
47 | 4 zero window probe timer is pending | ||
diff --git a/Documentation/networking/pt.txt b/Documentation/networking/pt.txt new file mode 100644 index 000000000000..72e888c1d988 --- /dev/null +++ b/Documentation/networking/pt.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | This is the README for the Gracilis Packetwin device driver, version 0.5 | ||
2 | ALPHA for Linux 1.3.43. | ||
3 | |||
4 | These files will allow you to talk to the PackeTwin (now know as PT) and | ||
5 | connect through it just like a pair of TNCs. To do this you will also | ||
6 | require the AX.25 code in the kernel enabled. | ||
7 | |||
8 | There are four files in this archive; this readme, a patch file, a .c file | ||
9 | and finally a .h file. The two program files need to be put into the | ||
10 | drivers/net directory in the Linux source tree, for me this is the | ||
11 | directory /usr/src/linux/drivers/net. The patch file needs to be patched in | ||
12 | at the top of the Linux source tree (/usr/src/linux in my case). | ||
13 | |||
14 | You will most probably have to edit the pt.c file to suit your own setup, | ||
15 | this should just involve changing some of the defines at the top of the file. | ||
16 | Please note that if you run an external modem you must specify a speed of 0. | ||
17 | |||
18 | The program is currently setup to run a 4800 baud external modem on port A | ||
19 | and a Kantronics DE-9600 daughter board on port B so if you have this (or | ||
20 | something similar) then you're right. | ||
21 | |||
22 | To compile in the driver, put the files in the correct place and patch in | ||
23 | the diff. You will have to re-configure the kernel again before you | ||
24 | recompile it. | ||
25 | |||
26 | The driver is not real good at the moment for finding the card. You can | ||
27 | 'help' it by changing the order of the potential addresses in the structure | ||
28 | found in the pt_init() function so the address of where the card is is put | ||
29 | first. | ||
30 | |||
31 | After compiling, you have to get them going, they are pretty well like any | ||
32 | other net device and just need ifconfig to get them going. | ||
33 | As an example, here is my /etc/rc.net | ||
34 | -------------------------- | ||
35 | |||
36 | # | ||
37 | # Configure the PackeTwin, port A. | ||
38 | /sbin/ifconfig pt0a 44.136.8.87 hw ax25 vk2xlz mtu 512 | ||
39 | /sbin/ifconfig pt0a 44.136.8.87 broadcast 44.136.8.255 netmask 255.255.255.0 | ||
40 | /sbin/route add -net 44.136.8.0 netmask 255.255.255.0 dev pt0a | ||
41 | /sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.136.8.68 dev pt0a | ||
42 | /sbin/route add -net 138.25.16.0 netmask 255.255.240.0 dev pt0a | ||
43 | /sbin/route add -host 44.136.8.255 dev pt0a | ||
44 | # | ||
45 | # Configure the PackeTwin, port B. | ||
46 | /sbin/ifconfig pt0b 44.136.8.87 hw ax25 vk2xlz-1 mtu 512 | ||
47 | /sbin/ifconfig pt0b 44.136.8.87 broadcast 44.255.255.255 netmask 255.0.0.0 | ||
48 | /sbin/route add -host 44.136.8.216 dev pt0b | ||
49 | /sbin/route add -host 44.136.8.95 dev pt0b | ||
50 | /sbin/route add -host 44.255.255.255 dev pt0b | ||
51 | |||
52 | This version of the driver comes under the GNU GPL. If you have one of my | ||
53 | previous (non-GPL) versions of the driver, please update to this one. | ||
54 | |||
55 | I hope that this all works well for you. I would be pleased to hear how | ||
56 | many people use the driver and if it does its job. | ||
57 | |||
58 | - Craig vk2xlz <csmall@small.dropbear.id.au> | ||
diff --git a/Documentation/networking/ray_cs.txt b/Documentation/networking/ray_cs.txt new file mode 100644 index 000000000000..b1def00bc4a3 --- /dev/null +++ b/Documentation/networking/ray_cs.txt | |||
@@ -0,0 +1,151 @@ | |||
1 | September 21, 1999 | ||
2 | |||
3 | Copyright (c) 1998 Corey Thomas (corey@world.std.com) | ||
4 | |||
5 | This file is the documentation for the Raylink Wireless LAN card driver for | ||
6 | Linux. The Raylink wireless LAN card is a PCMCIA card which provides IEEE | ||
7 | 802.11 compatible wireless network connectivity at 1 and 2 megabits/second. | ||
8 | See http://www.raytheon.com/micro/raylink/ for more information on the Raylink | ||
9 | card. This driver is in early development and does have bugs. See the known | ||
10 | bugs and limitations at the end of this document for more information. | ||
11 | This driver also works with WebGear's Aviator 2.4 and Aviator Pro | ||
12 | wireless LAN cards. | ||
13 | |||
14 | As of kernel 2.3.18, the ray_cs driver is part of the Linux kernel | ||
15 | source. My web page for the development of ray_cs is at | ||
16 | http://world.std.com/~corey/raylink.html and I can be emailed at | ||
17 | corey@world.std.com | ||
18 | |||
19 | The kernel driver is based on ray_cs-1.62.tgz | ||
20 | |||
21 | The driver at my web page is intended to be used as an add on to | ||
22 | David Hinds pcmcia package. All the command line parameters are | ||
23 | available when compiled as a module. When built into the kernel, only | ||
24 | the essid= string parameter is available via the kernel command line. | ||
25 | This will change after the method of sorting out parameters for all | ||
26 | the PCMCIA drivers is agreed upon. If you must have a built in driver | ||
27 | with nondefault parameters, they can be edited in | ||
28 | /usr/src/linux/drivers/net/pcmcia/ray_cs.c. Searching for MODULE_PARM | ||
29 | will find them all. | ||
30 | |||
31 | Information on card services is available at: | ||
32 | ftp://hyper.stanford.edu/pub/pcmcia/doc | ||
33 | http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html | ||
34 | |||
35 | |||
36 | Card services user programs are still required for PCMCIA devices. | ||
37 | pcmcia-cs-3.1.1 or greater is required for the kernel version of | ||
38 | the driver. | ||
39 | |||
40 | Currently, ray_cs is not part of David Hinds card services package, | ||
41 | so the following magic is required. | ||
42 | |||
43 | At the end of the /etc/pcmcia/config.opts file, add the line: | ||
44 | source ./ray_cs.opts | ||
45 | This will make card services read the ray_cs.opts file | ||
46 | when starting. Create the file /etc/pcmcia/ray_cs.opts containing the | ||
47 | following: | ||
48 | |||
49 | #### start of /etc/pcmcia/ray_cs.opts ################### | ||
50 | # Configuration options for Raylink Wireless LAN PCMCIA card | ||
51 | device "ray_cs" | ||
52 | class "network" module "misc/ray_cs" | ||
53 | |||
54 | card "RayLink PC Card WLAN Adapter" | ||
55 | manfid 0x01a6, 0x0000 | ||
56 | bind "ray_cs" | ||
57 | |||
58 | module "misc/ray_cs" opts "" | ||
59 | #### end of /etc/pcmcia/ray_cs.opts ##################### | ||
60 | |||
61 | |||
62 | To join an existing network with | ||
63 | different parameters, contact the network administrator for the | ||
64 | configuration information, and edit /etc/pcmcia/ray_cs.opts. | ||
65 | Add the parameters below between the empty quotes. | ||
66 | |||
67 | Parameters for ray_cs driver which may be specified in ray_cs.opts: | ||
68 | |||
69 | bc integer 0 = normal mode (802.11 timing) | ||
70 | 1 = slow down inter frame timing to allow | ||
71 | operation with older breezecom access | ||
72 | points. | ||
73 | |||
74 | beacon_period integer beacon period in Kilo-microseconds | ||
75 | legal values = must be integer multiple | ||
76 | of hop dwell | ||
77 | default = 256 | ||
78 | |||
79 | country integer 1 = USA (default) | ||
80 | 2 = Europe | ||
81 | 3 = Japan | ||
82 | 4 = Korea | ||
83 | 5 = Spain | ||
84 | 6 = France | ||
85 | 7 = Israel | ||
86 | 8 = Australia | ||
87 | |||
88 | essid string ESS ID - network name to join | ||
89 | string with maximum length of 32 chars | ||
90 | default value = "ADHOC_ESSID" | ||
91 | |||
92 | hop_dwell integer hop dwell time in Kilo-microseconds | ||
93 | legal values = 16,32,64,128(default),256 | ||
94 | |||
95 | irq_mask integer linux standard 16 bit value 1bit/IRQ | ||
96 | lsb is IRQ 0, bit 1 is IRQ 1 etc. | ||
97 | Used to restrict choice of IRQ's to use. | ||
98 | Recommended method for controlling | ||
99 | interrupts is in /etc/pcmcia/config.opts | ||
100 | |||
101 | net_type integer 0 (default) = adhoc network, | ||
102 | 1 = infrastructure | ||
103 | |||
104 | phy_addr string string containing new MAC address in | ||
105 | hex, must start with x eg | ||
106 | x00008f123456 | ||
107 | |||
108 | psm integer 0 = continuously active | ||
109 | 1 = power save mode (not useful yet) | ||
110 | |||
111 | pc_debug integer (0-5) larger values for more verbose | ||
112 | logging. Replaces ray_debug. | ||
113 | |||
114 | ray_debug integer Replaced with pc_debug | ||
115 | |||
116 | ray_mem_speed integer defaults to 500 | ||
117 | |||
118 | sniffer integer 0 = not sniffer (default) | ||
119 | 1 = sniffer which can be used to record all | ||
120 | network traffic using tcpdump or similar, | ||
121 | but no normal network use is allowed. | ||
122 | |||
123 | translate integer 0 = no translation (encapsulate frames) | ||
124 | 1 = translation (RFC1042/802.1) | ||
125 | |||
126 | |||
127 | More on sniffer mode: | ||
128 | |||
129 | tcpdump does not understand 802.11 headers, so it can't | ||
130 | interpret the contents, but it can record to a file. This is only | ||
131 | useful for debugging 802.11 lowlevel protocols that are not visible to | ||
132 | linux. If you want to watch ftp xfers, or do similar things, you | ||
133 | don't need to use sniffer mode. Also, some packet types are never | ||
134 | sent up by the card, so you will never see them (ack, rts, cts, probe | ||
135 | etc.) There is a simple program (showcap) included in the ray_cs | ||
136 | package which parses the 802.11 headers. | ||
137 | |||
138 | Known Problems and missing features | ||
139 | |||
140 | Does not work with non x86 | ||
141 | |||
142 | Does not work with SMP | ||
143 | |||
144 | Support for defragmenting frames is not yet debugged, and in | ||
145 | fact is known to not work. I have never encountered a net set | ||
146 | up to fragment, but still, it should be fixed. | ||
147 | |||
148 | The ioctl support is incomplete. The hardware address cannot be set | ||
149 | using ifconfig yet. If a different hardware address is needed, it may | ||
150 | be set using the phy_addr parameter in ray_cs.opts. This requires | ||
151 | a card insertion to take effect. | ||
diff --git a/Documentation/networking/routing.txt b/Documentation/networking/routing.txt new file mode 100644 index 000000000000..a26838b930f2 --- /dev/null +++ b/Documentation/networking/routing.txt | |||
@@ -0,0 +1,46 @@ | |||
1 | The directory ftp.inr.ac.ru:/ip-routing contains: | ||
2 | |||
3 | - iproute.c - "professional" routing table maintenance utility. | ||
4 | |||
5 | - rdisc.tar.gz - rdisc daemon, ported from Sun. | ||
6 | STRONGLY RECOMMENDED FOR ALL HOSTS. | ||
7 | |||
8 | - routing.tgz - original Mike McLagan's route by source patch. | ||
9 | Currently it is obsolete. | ||
10 | |||
11 | - gated.dif-ss<NEWEST>.gz - gated-R3_6Alpha_2 fixes. | ||
12 | Look at README.gated | ||
13 | |||
14 | - mrouted-3.8.dif.gz - mrouted-3.8 fixes. | ||
15 | |||
16 | - rtmon.c - trivial debugging utility: reads and stores netlink. | ||
17 | |||
18 | |||
19 | NEWS for user. | ||
20 | |||
21 | - Policy based routing. Routing decisions are made on the basis | ||
22 | not only of destination address, but also source address, | ||
23 | TOS and incoming interface. | ||
24 | - Complete set of IP level control messages. | ||
25 | Now Linux is the only OS in the world complying to RFC requirements. | ||
26 | Great win 8) | ||
27 | - New interface addressing paradigm. | ||
28 | Assignment of address ranges to interface, | ||
29 | multiple prefixes etc. etc. | ||
30 | Do not bother, it is compatible with the old one. Moreover: | ||
31 | - You don't need to do "route add aaa.bbb.ccc... eth0" anymore, | ||
32 | it is done automatically. | ||
33 | - "Abstract" UNIX sockets and security enhancements. | ||
34 | This is necessary to use TIRPC and TLI emulation library. | ||
35 | |||
36 | NEWS for hacker. | ||
37 | |||
38 | - New destination cache. Flexible, robust and just beautiful. | ||
39 | - Network stack is reordered, simplified, optimized, a lot of bugs fixed. | ||
40 | (well, and new bugs were introduced, but I haven't seen them yet 8)) | ||
41 | It is difficult to describe all the changes, look into source. | ||
42 | |||
43 | If you see this file, then this patch works 8) | ||
44 | |||
45 | Alexey Kuznetsov. | ||
46 | kuznet@ms2.inr.ac.ru | ||
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt new file mode 100644 index 000000000000..6726b524ec45 --- /dev/null +++ b/Documentation/networking/s2io.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | S2IO Technologies XFrame 10 Gig adapter. | ||
2 | ------------------------------------------- | ||
3 | |||
4 | I. Module loadable parameters. | ||
5 | When loaded as a module, the driver provides a host of Module loadable | ||
6 | parameters, so the device can be tuned as per the users needs. | ||
7 | A list of the Module params is given below. | ||
8 | (i) ring_num: This can be used to program the number of | ||
9 | receive rings used in the driver. | ||
10 | (ii) ring_len: This defines the number of descriptors each ring | ||
11 | can have. There can be a maximum of 8 rings. | ||
12 | (iii) frame_len: This is an array of size 8. Using this we can | ||
13 | set the maximum size of the received frame that can | ||
14 | be steered into the corrsponding receive ring. | ||
15 | (iv) fifo_num: This defines the number of Tx FIFOs thats used in | ||
16 | the driver. | ||
17 | (v) fifo_len: Each element defines the number of | ||
18 | Tx descriptors that can be associated with each | ||
19 | corresponding FIFO. There are a maximum of 8 FIFOs. | ||
20 | (vi) tx_prio: This is a bool, if module is loaded with a non-zero | ||
21 | value for tx_prio multi FIFO scheme is activated. | ||
22 | (vii) rx_prio: This is a bool, if module is loaded with a non-zero | ||
23 | value for tx_prio multi RING scheme is activated. | ||
24 | (viii) latency_timer: The value given against this param will be | ||
25 | loaded into the latency timer register in PCI Config | ||
26 | space, else the register is left with its reset value. | ||
27 | |||
28 | II. Performance tuning. | ||
29 | By changing a few sysctl parameters. | ||
30 | Copy the following lines into a file and run the following command, | ||
31 | "sysctl -p <file_name>" | ||
32 | ### IPV4 specific settings | ||
33 | net.ipv4.tcp_timestamps = 0 # turns TCP timestamp support off, default 1, reduces CPU use | ||
34 | net.ipv4.tcp_sack = 0 # turn SACK support off, default on | ||
35 | # on systems with a VERY fast bus -> memory interface this is the big gainer | ||
36 | net.ipv4.tcp_rmem = 10000000 10000000 10000000 # sets min/default/max TCP read buffer, default 4096 87380 174760 | ||
37 | net.ipv4.tcp_wmem = 10000000 10000000 10000000 # sets min/pressure/max TCP write buffer, default 4096 16384 131072 | ||
38 | net.ipv4.tcp_mem = 10000000 10000000 10000000 # sets min/pressure/max TCP buffer space, default 31744 32256 32768 | ||
39 | |||
40 | ### CORE settings (mostly for socket and UDP effect) | ||
41 | net.core.rmem_max = 524287 # maximum receive socket buffer size, default 131071 | ||
42 | net.core.wmem_max = 524287 # maximum send socket buffer size, default 131071 | ||
43 | net.core.rmem_default = 524287 # default receive socket buffer size, default 65535 | ||
44 | net.core.wmem_default = 524287 # default send socket buffer size, default 65535 | ||
45 | net.core.optmem_max = 524287 # maximum amount of option memory buffers, default 10240 | ||
46 | net.core.netdev_max_backlog = 300000 # number of unprocessed input packets before kernel starts dropping them, default 300 | ||
47 | ---End of performance tuning file--- | ||
48 | |||
diff --git a/Documentation/networking/sctp.txt b/Documentation/networking/sctp.txt new file mode 100644 index 000000000000..0c790a76910e --- /dev/null +++ b/Documentation/networking/sctp.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Linux Kernel SCTP | ||
2 | |||
3 | This is the current BETA release of the Linux Kernel SCTP reference | ||
4 | implementation. | ||
5 | |||
6 | SCTP (Stream Control Transmission Protocol) is a IP based, message oriented, | ||
7 | reliable transport protocol, with congestion control, support for | ||
8 | transparent multi-homing, and multiple ordered streams of messages. | ||
9 | RFC2960 defines the core protocol. The IETF SIGTRAN working group originally | ||
10 | developed the SCTP protocol and later handed the protocol over to the | ||
11 | Transport Area (TSVWG) working group for the continued evolvement of SCTP as a | ||
12 | general purpose transport. | ||
13 | |||
14 | See the IETF website (http://www.ietf.org) for further documents on SCTP. | ||
15 | See http://www.ietf.org/rfc/rfc2960.txt | ||
16 | |||
17 | The initial project goal is to create an Linux kernel reference implementation | ||
18 | of SCTP that is RFC 2960 compliant and provides an programming interface | ||
19 | referred to as the UDP-style API of the Sockets Extensions for SCTP, as | ||
20 | proposed in IETF Internet-Drafts. | ||
21 | |||
22 | |||
23 | Caveats: | ||
24 | |||
25 | -lksctp can be built as statically or as a module. However, be aware that | ||
26 | module removal of lksctp is not yet a safe activity. | ||
27 | |||
28 | -There is tentative support for IPv6, but most work has gone towards | ||
29 | implementation and testing lksctp on IPv4. | ||
30 | |||
31 | |||
32 | For more information, please visit the lksctp project website: | ||
33 | http://www.sf.net/projects/lksctp | ||
34 | |||
35 | Or contact the lksctp developers through the mailing list: | ||
36 | <lksctp-developers@lists.sourceforge.net> | ||
37 | |||
38 | |||
diff --git a/Documentation/networking/shaper.txt b/Documentation/networking/shaper.txt new file mode 100644 index 000000000000..6c4ebb66a906 --- /dev/null +++ b/Documentation/networking/shaper.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | Traffic Shaper For Linux | ||
2 | |||
3 | This is the current BETA release of the traffic shaper for Linux. It works | ||
4 | within the following limits: | ||
5 | |||
6 | o Minimum shaping speed is currently about 9600 baud (it can only | ||
7 | shape down to 1 byte per clock tick) | ||
8 | |||
9 | o Maximum is about 256K, it will go above this but get a bit blocky. | ||
10 | |||
11 | o If you ifconfig the master device that a shaper is attached to down | ||
12 | then your machine will follow. | ||
13 | |||
14 | o The shaper must be a module. | ||
15 | |||
16 | |||
17 | Setup: | ||
18 | |||
19 | A shaper device is configured using the shapeconfig program. | ||
20 | Typically you will do something like this | ||
21 | |||
22 | shapecfg attach shaper0 eth1 | ||
23 | shapecfg speed shaper0 64000 | ||
24 | ifconfig shaper0 myhost netmask 255.255.255.240 broadcast 1.2.3.4.255 up | ||
25 | route add -net some.network netmask a.b.c.d dev shaper0 | ||
26 | |||
27 | The shaper should have the same IP address as the device it is attached to | ||
28 | for normal use. | ||
29 | |||
30 | Gotchas: | ||
31 | |||
32 | The shaper shapes transmitted traffic. It's rather impossible to | ||
33 | shape received traffic except at the end (or a router) transmitting it. | ||
34 | |||
35 | Gated/routed/rwhod/mrouted all see the shaper as an additional device | ||
36 | and will treat it as such unless patched. Note that for mrouted you can run | ||
37 | mrouted tunnels via a traffic shaper to control bandwidth usage. | ||
38 | |||
39 | The shaper is device/route based. This makes it very easy to use | ||
40 | with any setup BUT less flexible. You may need to use iproute2 to set up | ||
41 | multiple route tables to get the flexibility. | ||
42 | |||
43 | There is no "borrowing" or "sharing" scheme. This is a simple | ||
44 | traffic limiter. We implement Van Jacobson and Sally Floyd's CBQ | ||
45 | architecture into Linux 2.2. This is the preferred solution. Shaper is | ||
46 | for simple or back compatible setups. | ||
47 | |||
48 | Alan | ||
diff --git a/Documentation/networking/sis900.txt b/Documentation/networking/sis900.txt new file mode 100644 index 000000000000..bddffd7385ae --- /dev/null +++ b/Documentation/networking/sis900.txt | |||
@@ -0,0 +1,257 @@ | |||
1 | |||
2 | SiS 900/7016 Fast Ethernet Device Driver | ||
3 | |||
4 | Ollie Lho | ||
5 | |||
6 | Lei Chun Chang | ||
7 | |||
8 | Copyright © 1999 by Silicon Integrated System Corp. | ||
9 | |||
10 | This document gives some information on installation and usage of SiS | ||
11 | 900/7016 device driver under Linux. | ||
12 | |||
13 | This program is free software; you can redistribute it and/or modify | ||
14 | it under the terms of the GNU General Public License as published by | ||
15 | the Free Software Foundation; either version 2 of the License, or (at | ||
16 | your option) any later version. | ||
17 | |||
18 | This program is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; if not, write to the Free Software | ||
25 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
26 | USA | ||
27 | _________________________________________________________________ | ||
28 | |||
29 | Table of Contents | ||
30 | 1. Introduction | ||
31 | 2. Changes | ||
32 | 3. Tested Environment | ||
33 | 4. Files in This Package | ||
34 | 5. Installation | ||
35 | |||
36 | Building the driver as loadable module | ||
37 | Building the driver into kernel | ||
38 | |||
39 | 6. Known Problems and Bugs | ||
40 | 7. Revision History | ||
41 | 8. Acknowledgements | ||
42 | _________________________________________________________________ | ||
43 | |||
44 | Chapter 1. Introduction | ||
45 | |||
46 | This document describes the revision 1.06 and 1.07 of SiS 900/7016 | ||
47 | Fast Ethernet device driver under Linux. The driver is developed by | ||
48 | Silicon Integrated System Corp. and distributed freely under the GNU | ||
49 | General Public License (GPL). The driver can be compiled as a loadable | ||
50 | module and used under Linux kernel version 2.2.x. (rev. 1.06) With | ||
51 | minimal changes, the driver can also be used under 2.3.x and 2.4.x | ||
52 | kernel (rev. 1.07), please see Chapter 5. If you are intended to use | ||
53 | the driver for earlier kernels, you are on your own. | ||
54 | |||
55 | The driver is tested with usual TCP/IP applications including FTP, | ||
56 | Telnet, Netscape etc. and is used constantly by the developers. | ||
57 | |||
58 | Please send all comments/fixes/questions to Lei-Chun Chang. | ||
59 | _________________________________________________________________ | ||
60 | |||
61 | Chapter 2. Changes | ||
62 | |||
63 | Changes made in Revision 1.07 | ||
64 | |||
65 | 1. Separation of sis900.c and sis900.h in order to move most constant | ||
66 | definition to sis900.h (many of those constants were corrected) | ||
67 | 2. Clean up PCI detection, the pci-scan from Donald Becker were not | ||
68 | used, just simple pci_find_*. | ||
69 | 3. MII detection is modified to support multiple mii transceiver. | ||
70 | 4. Bugs in read_eeprom, mdio_* were removed. | ||
71 | 5. Lot of sis900 irrelevant comments were removed/changed and more | ||
72 | comments were added to reflect the real situation. | ||
73 | 6. Clean up of physical/virtual address space mess in buffer | ||
74 | descriptors. | ||
75 | 7. Better transmit/receive error handling. | ||
76 | 8. The driver now uses zero-copy single buffer management scheme to | ||
77 | improve performance. | ||
78 | 9. Names of variables were changed to be more consistent. | ||
79 | 10. Clean up of auo-negotiation and timer code. | ||
80 | 11. Automatic detection and change of PHY on the fly. | ||
81 | 12. Bug in mac probing fixed. | ||
82 | 13. Fix 630E equalier problem by modifying the equalizer workaround | ||
83 | rule. | ||
84 | 14. Support for ICS1893 10/100 Interated PHYceiver. | ||
85 | 15. Support for media select by ifconfig. | ||
86 | 16. Added kernel-doc extratable documentation. | ||
87 | _________________________________________________________________ | ||
88 | |||
89 | Chapter 3. Tested Environment | ||
90 | |||
91 | This driver is developed on the following hardware | ||
92 | |||
93 | * Intel Celeron 500 with SiS 630 (rev 02) chipset | ||
94 | * SiS 900 (rev 01) and SiS 7016/7014 Fast Ethernet Card | ||
95 | |||
96 | and tested with these software environments | ||
97 | |||
98 | * Red Hat Linux version 6.2 | ||
99 | * Linux kernel version 2.4.0 | ||
100 | * Netscape version 4.6 | ||
101 | * NcFTP 3.0.0 beta 18 | ||
102 | * Samba version 2.0.3 | ||
103 | _________________________________________________________________ | ||
104 | |||
105 | Chapter 4. Files in This Package | ||
106 | |||
107 | In the package you can find these files: | ||
108 | |||
109 | sis900.c | ||
110 | Driver source file in C | ||
111 | |||
112 | sis900.h | ||
113 | Header file for sis900.c | ||
114 | |||
115 | sis900.sgml | ||
116 | DocBook SGML source of the document | ||
117 | |||
118 | sis900.txt | ||
119 | Driver document in plain text | ||
120 | _________________________________________________________________ | ||
121 | |||
122 | Chapter 5. Installation | ||
123 | |||
124 | Silicon Integrated System Corp. is cooperating closely with core Linux | ||
125 | Kernel developers. The revisions of SiS 900 driver are distributed by | ||
126 | the usuall channels for kernel tar files and patches. Those kernel tar | ||
127 | files for official kernel and patches for kernel pre-release can be | ||
128 | download at official kernel ftp site and its mirrors. The 1.06 | ||
129 | revision can be found in kernel version later than 2.3.15 and | ||
130 | pre-2.2.14, and 1.07 revision can be found in kernel version 2.4.0. If | ||
131 | you have no prior experience in networking under Linux, please read | ||
132 | Ethernet HOWTO and Networking HOWTO available from Linux Documentation | ||
133 | Project (LDP). | ||
134 | |||
135 | The driver is bundled in release later than 2.2.11 and 2.3.15 so this | ||
136 | is the most easy case. Be sure you have the appropriate packages for | ||
137 | compiling kernel source. Those packages are listed in Document/Changes | ||
138 | in kernel source distribution. If you have to install the driver other | ||
139 | than those bundled in kernel release, you should have your driver file | ||
140 | sis900.c and sis900.h copied into /usr/src/linux/drivers/net/ first. | ||
141 | There are two alternative ways to install the driver | ||
142 | _________________________________________________________________ | ||
143 | |||
144 | Building the driver as loadable module | ||
145 | |||
146 | To build the driver as a loadable kernel module you have to | ||
147 | reconfigure the kernel to activate network support by | ||
148 | |||
149 | make menuconfig | ||
150 | |||
151 | Choose "Loadable module support --->", then select "Enable loadable | ||
152 | module support". | ||
153 | |||
154 | Choose "Network Device Support --->", select "Ethernet (10 or | ||
155 | 100Mbit)". Then select "EISA, VLB, PCI and on board controllers", and | ||
156 | choose "SiS 900/7016 PCI Fast Ethernet Adapter support" to "M". | ||
157 | |||
158 | After reconfiguring the kernel, you can make the driver module by | ||
159 | |||
160 | make modules | ||
161 | |||
162 | The driver should be compiled with no errors. After compiling the | ||
163 | driver, the driver can be installed to proper place by | ||
164 | |||
165 | make modules_install | ||
166 | |||
167 | Load the driver into kernel by | ||
168 | |||
169 | insmod sis900 | ||
170 | |||
171 | When loading the driver into memory, some information message can be | ||
172 | view by | ||
173 | |||
174 | dmesg | ||
175 | |||
176 | or | ||
177 | cat /var/log/message | ||
178 | |||
179 | If the driver is loaded properly you will have messages similar to | ||
180 | this: | ||
181 | |||
182 | sis900.c: v1.07.06 11/07/2000 | ||
183 | eth0: SiS 900 PCI Fast Ethernet at 0xd000, IRQ 10, 00:00:e8:83:7f:a4. | ||
184 | eth0: SiS 900 Internal MII PHY transceiver found at address 1. | ||
185 | eth0: Using SiS 900 Internal MII PHY as default | ||
186 | |||
187 | showing the version of the driver and the results of probing routine. | ||
188 | |||
189 | Once the driver is loaded, network can be brought up by | ||
190 | |||
191 | /sbin/ifconfig eth0 IPADDR broadcast BROADCAST netmask NETMASK media TYPE | ||
192 | |||
193 | where IPADDR, BROADCAST, NETMASK are your IP address, broadcast | ||
194 | address and netmask respectively. TYPE is used to set medium type used | ||
195 | by the device. Typical values are "10baseT"(twisted-pair 10Mbps | ||
196 | Ethernet) or "100baseT" (twisted-pair 100Mbps Ethernet). For more | ||
197 | information on how to configure network interface, please refer to | ||
198 | Networking HOWTO. | ||
199 | |||
200 | The link status is also shown by kernel messages. For example, after | ||
201 | the network interface is activated, you may have the message: | ||
202 | |||
203 | eth0: Media Link On 100mbps full-duplex | ||
204 | |||
205 | If you try to unplug the twist pair (TP) cable you will get | ||
206 | |||
207 | eth0: Media Link Off | ||
208 | |||
209 | indicating that the link is failed. | ||
210 | _________________________________________________________________ | ||
211 | |||
212 | Building the driver into kernel | ||
213 | |||
214 | If you want to make the driver into kernel, choose "Y" rather than "M" | ||
215 | on "SiS 900/7016 PCI Fast Ethernet Adapter support" when configuring | ||
216 | the kernel. Build the kernel image in the usual way | ||
217 | |||
218 | make clean | ||
219 | |||
220 | make bzlilo | ||
221 | |||
222 | Next time the system reboot, you have the driver in memory. | ||
223 | _________________________________________________________________ | ||
224 | |||
225 | Chapter 6. Known Problems and Bugs | ||
226 | |||
227 | There are some known problems and bugs. If you find any other bugs | ||
228 | please mail to lcchang@sis.com.tw | ||
229 | |||
230 | 1. AM79C901 HomePNA PHY is not thoroughly tested, there may be some | ||
231 | bugs in the "on the fly" change of transceiver. | ||
232 | 2. A bug is hidden somewhere in the receive buffer management code, | ||
233 | the bug causes NULL pointer reference in the kernel. This fault is | ||
234 | caught before bad things happen and reported with the message: | ||
235 | eth0: NULL pointer encountered in Rx ring, skipping which can be | ||
236 | viewed with dmesg or cat /var/log/message. | ||
237 | 3. The media type change from 10Mbps to 100Mbps twisted-pair ethernet | ||
238 | by ifconfig causes the media link down. | ||
239 | _________________________________________________________________ | ||
240 | |||
241 | Chapter 7. Revision History | ||
242 | |||
243 | * November 13, 2000, Revision 1.07, seventh release, 630E problem | ||
244 | fixed and further clean up. | ||
245 | * November 4, 1999, Revision 1.06, Second release, lots of clean up | ||
246 | and optimization. | ||
247 | * August 8, 1999, Revision 1.05, Initial Public Release | ||
248 | _________________________________________________________________ | ||
249 | |||
250 | Chapter 8. Acknowledgements | ||
251 | |||
252 | This driver was originally derived form Donald Becker's pci-skeleton | ||
253 | and rtl8139 drivers. Donald also provided various suggestion regarded | ||
254 | with improvements made in revision 1.06. | ||
255 | |||
256 | The 1.05 revision was created by Jim Huang, AMD 79c901 support was | ||
257 | added by Chin-Shan Li. | ||
diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt new file mode 100644 index 000000000000..851fc97bb22f --- /dev/null +++ b/Documentation/networking/sk98lin.txt | |||
@@ -0,0 +1,568 @@ | |||
1 | (C)Copyright 1999-2004 Marvell(R). | ||
2 | All rights reserved | ||
3 | =========================================================================== | ||
4 | |||
5 | sk98lin.txt created 13-Feb-2004 | ||
6 | |||
7 | Readme File for sk98lin v6.23 | ||
8 | Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX | ||
9 | |||
10 | This file contains | ||
11 | 1 Overview | ||
12 | 2 Required Files | ||
13 | 3 Installation | ||
14 | 3.1 Driver Installation | ||
15 | 3.2 Inclusion of adapter at system start | ||
16 | 4 Driver Parameters | ||
17 | 4.1 Per-Port Parameters | ||
18 | 4.2 Adapter Parameters | ||
19 | 5 Large Frame Support | ||
20 | 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) | ||
21 | 7 Troubleshooting | ||
22 | |||
23 | =========================================================================== | ||
24 | |||
25 | |||
26 | 1 Overview | ||
27 | =========== | ||
28 | |||
29 | The sk98lin driver supports the Marvell Yukon and SysKonnect | ||
30 | SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has | ||
31 | been tested with Linux on Intel/x86 machines. | ||
32 | *** | ||
33 | |||
34 | |||
35 | 2 Required Files | ||
36 | ================= | ||
37 | |||
38 | The linux kernel source. | ||
39 | No additional files required. | ||
40 | *** | ||
41 | |||
42 | |||
43 | 3 Installation | ||
44 | =============== | ||
45 | |||
46 | It is recommended to download the latest version of the driver from the | ||
47 | SysKonnect web site www.syskonnect.com. If you have downloaded the latest | ||
48 | driver, the Linux kernel has to be patched before the driver can be | ||
49 | installed. For details on how to patch a Linux kernel, refer to the | ||
50 | patch.txt file. | ||
51 | |||
52 | 3.1 Driver Installation | ||
53 | ------------------------ | ||
54 | |||
55 | The following steps describe the actions that are required to install | ||
56 | the driver and to start it manually. These steps should be carried | ||
57 | out for the initial driver setup. Once confirmed to be ok, they can | ||
58 | be included in the system start. | ||
59 | |||
60 | NOTE 1: To perform the following tasks you need 'root' access. | ||
61 | |||
62 | NOTE 2: In case of problems, please read the section "Troubleshooting" | ||
63 | below. | ||
64 | |||
65 | The driver can either be integrated into the kernel or it can be compiled | ||
66 | as a module. Select the appropriate option during the kernel | ||
67 | configuration. | ||
68 | |||
69 | Compile/use the driver as a module | ||
70 | ---------------------------------- | ||
71 | To compile the driver, go to the directory /usr/src/linux and | ||
72 | execute the command "make menuconfig" or "make xconfig" and proceed as | ||
73 | follows: | ||
74 | |||
75 | To integrate the driver permanently into the kernel, proceed as follows: | ||
76 | |||
77 | 1. Select the menu "Network device support" and then "Ethernet(1000Mbit)" | ||
78 | 2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" | ||
79 | with (*) | ||
80 | 3. Build a new kernel when the configuration of the above options is | ||
81 | finished. | ||
82 | 4. Install the new kernel. | ||
83 | 5. Reboot your system. | ||
84 | |||
85 | To use the driver as a module, proceed as follows: | ||
86 | |||
87 | 1. Enable 'loadable module support' in the kernel. | ||
88 | 2. For automatic driver start, enable the 'Kernel module loader'. | ||
89 | 3. Select the menu "Network device support" and then "Ethernet(1000Mbit)" | ||
90 | 4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" | ||
91 | with (M) | ||
92 | 5. Execute the command "make modules". | ||
93 | 6. Execute the command "make modules_install". | ||
94 | The appropiate modules will be installed. | ||
95 | 7. Reboot your system. | ||
96 | |||
97 | |||
98 | Load the module manually | ||
99 | ------------------------ | ||
100 | To load the module manually, proceed as follows: | ||
101 | |||
102 | 1. Enter "modprobe sk98lin". | ||
103 | 2. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in | ||
104 | your computer and you have a /proc file system, execute the command: | ||
105 | "ls /proc/net/sk98lin/" | ||
106 | This should produce an output containing a line with the following | ||
107 | format: | ||
108 | eth0 eth1 ... | ||
109 | which indicates that your adapter has been found and initialized. | ||
110 | |||
111 | NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx | ||
112 | adapter installed, the adapters will be listed as 'eth0', | ||
113 | 'eth1', 'eth2', etc. | ||
114 | For each adapter, repeat steps 3 and 4 below. | ||
115 | |||
116 | NOTE 2: If you have other Ethernet adapters installed, your Marvell | ||
117 | Yukon or SysKonnect SK-98xx adapter will be mapped to the | ||
118 | next available number, e.g. 'eth1'. The mapping is executed | ||
119 | automatically. | ||
120 | The module installation message (displayed either in a system | ||
121 | log file or on the console) prints a line for each adapter | ||
122 | found containing the corresponding 'ethX'. | ||
123 | |||
124 | 3. Select an IP address and assign it to the respective adapter by | ||
125 | entering: | ||
126 | ifconfig eth0 <ip-address> | ||
127 | With this command, the adapter is connected to the Ethernet. | ||
128 | |||
129 | SK-98xx Gigabit Ethernet Server Adapters: The yellow LED on the adapter | ||
130 | is now active, the link status LED of the primary port is active and | ||
131 | the link status LED of the secondary port (on dual port adapters) is | ||
132 | blinking (if the ports are connected to a switch or hub). | ||
133 | SK-98xx V2.0 Gigabit Ethernet Adapters: The link status LED is active. | ||
134 | In addition, you will receive a status message on the console stating | ||
135 | "ethX: network connection up using port Y" and showing the selected | ||
136 | connection parameters (x stands for the ethernet device number | ||
137 | (0,1,2, etc), y stands for the port name (A or B)). | ||
138 | |||
139 | NOTE: If you are in doubt about IP addresses, ask your network | ||
140 | administrator for assistance. | ||
141 | |||
142 | 4. Your adapter should now be fully operational. | ||
143 | Use 'ping <otherstation>' to verify the connection to other computers | ||
144 | on your network. | ||
145 | 5. To check the adapter configuration view /proc/net/sk98lin/[devicename]. | ||
146 | For example by executing: | ||
147 | "cat /proc/net/sk98lin/eth0" | ||
148 | |||
149 | Unload the module | ||
150 | ----------------- | ||
151 | To stop and unload the driver modules, proceed as follows: | ||
152 | |||
153 | 1. Execute the command "ifconfig eth0 down". | ||
154 | 2. Execute the command "rmmod sk98lin". | ||
155 | |||
156 | 3.2 Inclusion of adapter at system start | ||
157 | ----------------------------------------- | ||
158 | |||
159 | Since a large number of different Linux distributions are | ||
160 | available, we are unable to describe a general installation procedure | ||
161 | for the driver module. | ||
162 | Because the driver is now integrated in the kernel, installation should | ||
163 | be easy, using the standard mechanism of your distribution. | ||
164 | Refer to the distribution's manual for installation of ethernet adapters. | ||
165 | |||
166 | *** | ||
167 | |||
168 | 4 Driver Parameters | ||
169 | ==================== | ||
170 | |||
171 | Parameters can be set at the command line after the module has been | ||
172 | loaded with the command 'modprobe'. | ||
173 | In some distributions, the configuration tools are able to pass parameters | ||
174 | to the driver module. | ||
175 | |||
176 | If you use the kernel module loader, you can set driver parameters | ||
177 | in the file /etc/modprobe.conf (or /etc/modules.conf in 2.4 or earlier). | ||
178 | To set the driver parameters in this file, proceed as follows: | ||
179 | |||
180 | 1. Insert a line of the form : | ||
181 | options sk98lin ... | ||
182 | For "...", the same syntax is required as described for the command | ||
183 | line paramaters of modprobe below. | ||
184 | 2. To activate the new parameters, either reboot your computer | ||
185 | or | ||
186 | unload and reload the driver. | ||
187 | The syntax of the driver parameters is: | ||
188 | |||
189 | modprobe sk98lin parameter=value1[,value2[,value3...]] | ||
190 | |||
191 | where value1 refers to the first adapter, value2 to the second etc. | ||
192 | |||
193 | NOTE: All parameters are case sensitive. Write them exactly as shown | ||
194 | below. | ||
195 | |||
196 | Example: | ||
197 | Suppose you have two adapters. You want to set auto-negotiation | ||
198 | on the first adapter to ON and on the second adapter to OFF. | ||
199 | You also want to set DuplexCapabilities on the first adapter | ||
200 | to FULL, and on the second adapter to HALF. | ||
201 | Then, you must enter: | ||
202 | |||
203 | modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half | ||
204 | |||
205 | NOTE: The number of adapters that can be configured this way is | ||
206 | limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM). | ||
207 | The current limit is 16. If you happen to install | ||
208 | more adapters, adjust this and recompile. | ||
209 | |||
210 | |||
211 | 4.1 Per-Port Parameters | ||
212 | ------------------------ | ||
213 | |||
214 | These settings are available for each port on the adapter. | ||
215 | In the following description, '?' stands for the port for | ||
216 | which you set the parameter (A or B). | ||
217 | |||
218 | Speed | ||
219 | ----- | ||
220 | Parameter: Speed_? | ||
221 | Values: 10, 100, 1000, Auto | ||
222 | Default: Auto | ||
223 | |||
224 | This parameter is used to set the speed capabilities. It is only valid | ||
225 | for the SK-98xx V2.0 copper adapters. | ||
226 | Usually, the speed is negotiated between the two ports during link | ||
227 | establishment. If this fails, a port can be forced to a specific setting | ||
228 | with this parameter. | ||
229 | |||
230 | Auto-Negotiation | ||
231 | ---------------- | ||
232 | Parameter: AutoNeg_? | ||
233 | Values: On, Off, Sense | ||
234 | Default: On | ||
235 | |||
236 | The "Sense"-mode automatically detects whether the link partner supports | ||
237 | auto-negotiation or not. | ||
238 | |||
239 | Duplex Capabilities | ||
240 | ------------------- | ||
241 | Parameter: DupCap_? | ||
242 | Values: Half, Full, Both | ||
243 | Default: Both | ||
244 | |||
245 | This parameters is only relevant if auto-negotiation for this port is | ||
246 | not set to "Sense". If auto-negotiation is set to "On", all three values | ||
247 | are possible. If it is set to "Off", only "Full" and "Half" are allowed. | ||
248 | This parameter is usefull if your link partner does not support all | ||
249 | possible combinations. | ||
250 | |||
251 | Flow Control | ||
252 | ------------ | ||
253 | Parameter: FlowCtrl_? | ||
254 | Values: Sym, SymOrRem, LocSend, None | ||
255 | Default: SymOrRem | ||
256 | |||
257 | This parameter can be used to set the flow control capabilities the | ||
258 | port reports during auto-negotiation. It can be set for each port | ||
259 | individually. | ||
260 | Possible modes: | ||
261 | -- Sym = Symmetric: both link partners are allowed to send | ||
262 | PAUSE frames | ||
263 | -- SymOrRem = SymmetricOrRemote: both or only remote partner | ||
264 | are allowed to send PAUSE frames | ||
265 | -- LocSend = LocalSend: only local link partner is allowed | ||
266 | to send PAUSE frames | ||
267 | -- None = no link partner is allowed to send PAUSE frames | ||
268 | |||
269 | NOTE: This parameter is ignored if auto-negotiation is set to "Off". | ||
270 | |||
271 | Role in Master-Slave-Negotiation (1000Base-T only) | ||
272 | -------------------------------------------------- | ||
273 | Parameter: Role_? | ||
274 | Values: Auto, Master, Slave | ||
275 | Default: Auto | ||
276 | |||
277 | This parameter is only valid for the SK-9821 and SK-9822 adapters. | ||
278 | For two 1000Base-T ports to communicate, one must take the role of the | ||
279 | master (providing timing information), while the other must be the | ||
280 | slave. Usually, this is negotiated between the two ports during link | ||
281 | establishment. If this fails, a port can be forced to a specific setting | ||
282 | with this parameter. | ||
283 | |||
284 | |||
285 | 4.2 Adapter Parameters | ||
286 | ----------------------- | ||
287 | |||
288 | Connection Type (SK-98xx V2.0 copper adapters only) | ||
289 | --------------- | ||
290 | Parameter: ConType | ||
291 | Values: Auto, 100FD, 100HD, 10FD, 10HD | ||
292 | Default: Auto | ||
293 | |||
294 | The parameter 'ConType' is a combination of all five per-port parameters | ||
295 | within one single parameter. This simplifies the configuration of both ports | ||
296 | of an adapter card! The different values of this variable reflect the most | ||
297 | meaningful combinations of port parameters. | ||
298 | |||
299 | The following table shows the values of 'ConType' and the corresponding | ||
300 | combinations of the per-port parameters: | ||
301 | |||
302 | ConType | DupCap AutoNeg FlowCtrl Role Speed | ||
303 | ----------+------------------------------------------------------ | ||
304 | Auto | Both On SymOrRem Auto Auto | ||
305 | 100FD | Full Off None Auto (ignored) 100 | ||
306 | 100HD | Half Off None Auto (ignored) 100 | ||
307 | 10FD | Full Off None Auto (ignored) 10 | ||
308 | 10HD | Half Off None Auto (ignored) 10 | ||
309 | |||
310 | Stating any other port parameter together with this 'ConType' variable | ||
311 | will result in a merged configuration of those settings. This due to | ||
312 | the fact, that the per-port parameters (e.g. Speed_? ) have a higher | ||
313 | priority than the combined variable 'ConType'. | ||
314 | |||
315 | NOTE: This parameter is always used on both ports of the adapter card. | ||
316 | |||
317 | Interrupt Moderation | ||
318 | -------------------- | ||
319 | Parameter: Moderation | ||
320 | Values: None, Static, Dynamic | ||
321 | Default: None | ||
322 | |||
323 | Interrupt moderation is employed to limit the maxmimum number of interrupts | ||
324 | the driver has to serve. That is, one or more interrupts (which indicate any | ||
325 | transmit or receive packet to be processed) are queued until the driver | ||
326 | processes them. When queued interrupts are to be served, is determined by the | ||
327 | 'IntsPerSec' parameter, which is explained later below. | ||
328 | |||
329 | Possible modes: | ||
330 | |||
331 | -- None - No interrupt moderation is applied on the adapter card. | ||
332 | Therefore, each transmit or receive interrupt is served immediately | ||
333 | as soon as it appears on the interrupt line of the adapter card. | ||
334 | |||
335 | -- Static - Interrupt moderation is applied on the adapter card. | ||
336 | All transmit and receive interrupts are queued until a complete | ||
337 | moderation interval ends. If such a moderation interval ends, all | ||
338 | queued interrupts are processed in one big bunch without any delay. | ||
339 | The term 'static' reflects the fact, that interrupt moderation is | ||
340 | always enabled, regardless how much network load is currently | ||
341 | passing via a particular interface. In addition, the duration of | ||
342 | the moderation interval has a fixed length that never changes while | ||
343 | the driver is operational. | ||
344 | |||
345 | -- Dynamic - Interrupt moderation might be applied on the adapter card, | ||
346 | depending on the load of the system. If the driver detects that the | ||
347 | system load is too high, the driver tries to shield the system against | ||
348 | too much network load by enabling interrupt moderation. If - at a later | ||
349 | time - the CPU utilizaton decreases again (or if the network load is | ||
350 | negligible) the interrupt moderation will automatically be disabled. | ||
351 | |||
352 | Interrupt moderation should be used when the driver has to handle one or more | ||
353 | interfaces with a high network load, which - as a consequence - leads also to a | ||
354 | high CPU utilization. When moderation is applied in such high network load | ||
355 | situations, CPU load might be reduced by 20-30%. | ||
356 | |||
357 | NOTE: The drawback of using interrupt moderation is an increase of the round- | ||
358 | trip-time (RTT), due to the queueing and serving of interrupts at dedicated | ||
359 | moderation times. | ||
360 | |||
361 | Interrupts per second | ||
362 | --------------------- | ||
363 | Parameter: IntsPerSec | ||
364 | Values: 30...40000 (interrupts per second) | ||
365 | Default: 2000 | ||
366 | |||
367 | This parameter is only used, if either static or dynamic interrupt moderation | ||
368 | is used on a network adapter card. Using this paramter if no moderation is | ||
369 | applied, will lead to no action performed. | ||
370 | |||
371 | This parameter determines the length of any interrupt moderation interval. | ||
372 | Assuming that static interrupt moderation is to be used, an 'IntsPerSec' | ||
373 | parameter value of 2000 will lead to an interrupt moderation interval of | ||
374 | 500 microseconds. | ||
375 | |||
376 | NOTE: The duration of the moderation interval is to be chosen with care. | ||
377 | At first glance, selecting a very long duration (e.g. only 100 interrupts per | ||
378 | second) seems to be meaningful, but the increase of packet-processing delay | ||
379 | is tremendous. On the other hand, selecting a very short moderation time might | ||
380 | compensate the use of any moderation being applied. | ||
381 | |||
382 | |||
383 | Preferred Port | ||
384 | -------------- | ||
385 | Parameter: PrefPort | ||
386 | Values: A, B | ||
387 | Default: A | ||
388 | |||
389 | This is used to force the preferred port to A or B (on dual-port network | ||
390 | adapters). The preferred port is the one that is used if both are detected | ||
391 | as fully functional. | ||
392 | |||
393 | RLMT Mode (Redundant Link Management Technology) | ||
394 | ------------------------------------------------ | ||
395 | Parameter: RlmtMode | ||
396 | Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet | ||
397 | Default: CheckLinkState | ||
398 | |||
399 | RLMT monitors the status of the port. If the link of the active port | ||
400 | fails, RLMT switches immediately to the standby link. The virtual link is | ||
401 | maintained as long as at least one 'physical' link is up. | ||
402 | |||
403 | Possible modes: | ||
404 | |||
405 | -- CheckLinkState - Check link state only: RLMT uses the link state | ||
406 | reported by the adapter hardware for each individual port to | ||
407 | determine whether a port can be used for all network traffic or | ||
408 | not. | ||
409 | |||
410 | -- CheckLocalPort - In this mode, RLMT monitors the network path | ||
411 | between the two ports of an adapter by regularly exchanging packets | ||
412 | between them. This mode requires a network configuration in which | ||
413 | the two ports are able to "see" each other (i.e. there must not be | ||
414 | any router between the ports). | ||
415 | |||
416 | -- CheckSeg - Check local port and segmentation: This mode supports the | ||
417 | same functions as the CheckLocalPort mode and additionally checks | ||
418 | network segmentation between the ports. Therefore, this mode is only | ||
419 | to be used if Gigabit Ethernet switches are installed on the network | ||
420 | that have been configured to use the Spanning Tree protocol. | ||
421 | |||
422 | -- DualNet - In this mode, ports A and B are used as separate devices. | ||
423 | If you have a dual port adapter, port A will be configured as eth0 | ||
424 | and port B as eth1. Both ports can be used independently with | ||
425 | distinct IP addresses. The preferred port setting is not used. | ||
426 | RLMT is turned off. | ||
427 | |||
428 | NOTE: RLMT modes CLP and CLPSS are designed to operate in configurations | ||
429 | where a network path between the ports on one adapter exists. | ||
430 | Moreover, they are not designed to work where adapters are connected | ||
431 | back-to-back. | ||
432 | *** | ||
433 | |||
434 | |||
435 | 5 Large Frame Support | ||
436 | ====================== | ||
437 | |||
438 | The driver supports large frames (also called jumbo frames). Using large | ||
439 | frames can result in an improved throughput if transferring large amounts | ||
440 | of data. | ||
441 | To enable large frames, set the MTU (maximum transfer unit) of the | ||
442 | interface to the desired value (up to 9000), execute the following | ||
443 | command: | ||
444 | ifconfig eth0 mtu 9000 | ||
445 | This will only work if you have two adapters connected back-to-back | ||
446 | or if you use a switch that supports large frames. When using a switch, | ||
447 | it should be configured to allow large frames and auto-negotiation should | ||
448 | be set to OFF. The setting must be configured on all adapters that can be | ||
449 | reached by the large frames. If one adapter is not set to receive large | ||
450 | frames, it will simply drop them. | ||
451 | |||
452 | You can switch back to the standard ethernet frame size by executing the | ||
453 | following command: | ||
454 | ifconfig eth0 mtu 1500 | ||
455 | |||
456 | To permanently configure this setting, add a script with the 'ifconfig' | ||
457 | line to the system startup sequence (named something like "S99sk98lin" | ||
458 | in /etc/rc.d/rc2.d). | ||
459 | *** | ||
460 | |||
461 | |||
462 | 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) | ||
463 | ================================================================== | ||
464 | |||
465 | The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and | ||
466 | Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad. | ||
467 | These features are only available after installation of open source | ||
468 | modules available on the Internet: | ||
469 | For VLAN go to: http://www.candelatech.com/~greear/vlan.html | ||
470 | For Link Aggregation go to: http://www.st.rim.or.jp/~yumo | ||
471 | |||
472 | NOTE: SysKonnect GmbH does not offer any support for these open source | ||
473 | modules and does not take the responsibility for any kind of | ||
474 | failures or problems arising in connection with these modules. | ||
475 | |||
476 | NOTE: Configuring Link Aggregation on a SysKonnect dual link adapter may | ||
477 | cause problems when unloading the driver. | ||
478 | |||
479 | |||
480 | 7 Troubleshooting | ||
481 | ================== | ||
482 | |||
483 | If any problems occur during the installation process, check the | ||
484 | following list: | ||
485 | |||
486 | |||
487 | Problem: The SK-98xx adapter can not be found by the driver. | ||
488 | Solution: In /proc/pci search for the following entry: | ||
489 | 'Ethernet controller: SysKonnect SK-98xx ...' | ||
490 | If this entry exists, the SK-98xx or SK-98xx V2.0 adapter has | ||
491 | been found by the system and should be operational. | ||
492 | If this entry does not exist or if the file '/proc/pci' is not | ||
493 | found, there may be a hardware problem or the PCI support may | ||
494 | not be enabled in your kernel. | ||
495 | The adapter can be checked using the diagnostics program which | ||
496 | is available on the SysKonnect web site: | ||
497 | www.syskonnect.com | ||
498 | |||
499 | Some COMPAQ machines have problems dealing with PCI under Linux. | ||
500 | Linux. This problem is described in the 'PCI howto' document | ||
501 | (included in some distributions or available from the | ||
502 | web, e.g. at 'www.linux.org'). | ||
503 | |||
504 | |||
505 | Problem: Programs such as 'ifconfig' or 'route' can not be found or the | ||
506 | error message 'Operation not permitted' is displayed. | ||
507 | Reason: You are not logged in as user 'root'. | ||
508 | Solution: Logout and login as 'root' or change to 'root' via 'su'. | ||
509 | |||
510 | |||
511 | Problem: Upon use of the command 'ping <address>' the message | ||
512 | "ping: sendto: Network is unreachable" is displayed. | ||
513 | Reason: Your route is not set correctly. | ||
514 | Solution: If you are using RedHat, you probably forgot to set up the | ||
515 | route in the 'network configuration'. | ||
516 | Check the existing routes with the 'route' command and check | ||
517 | if an entry for 'eth0' exists, and if so, if it is set correctly. | ||
518 | |||
519 | |||
520 | Problem: The driver can be started, the adapter is connected to the | ||
521 | network, but you cannot receive or transmit any packets; | ||
522 | e.g. 'ping' does not work. | ||
523 | Reason: There is an incorrect route in your routing table. | ||
524 | Solution: Check the routing table with the command 'route' and read the | ||
525 | manual help pages dealing with routes (enter 'man route'). | ||
526 | |||
527 | NOTE: Although the 2.2.x kernel versions generate the routing entry | ||
528 | automatically, problems of this kind may occur here as well. We've | ||
529 | come across a situation in which the driver started correctly at | ||
530 | system start, but after the driver has been removed and reloaded, | ||
531 | the route of the adapter's network pointed to the 'dummy0'device | ||
532 | and had to be corrected manually. | ||
533 | |||
534 | |||
535 | Problem: Your computer should act as a router between multiple | ||
536 | IP subnetworks (using multiple adapters), but computers in | ||
537 | other subnetworks cannot be reached. | ||
538 | Reason: Either the router's kernel is not configured for IP forwarding | ||
539 | or the routing table and gateway configuration of at least one | ||
540 | computer is not working. | ||
541 | |||
542 | Problem: Upon driver start, the following error message is displayed: | ||
543 | "eth0: -- ERROR -- | ||
544 | Class: internal Software error | ||
545 | Nr: 0xcc | ||
546 | Msg: SkGeInitPort() cannot init running ports" | ||
547 | Reason: You are using a driver compiled for single processor machines | ||
548 | on a multiprocessor machine with SMP (Symmetric MultiProcessor) | ||
549 | kernel. | ||
550 | Solution: Configure your kernel appropriately and recompile the kernel or | ||
551 | the modules. | ||
552 | |||
553 | |||
554 | |||
555 | If your problem is not listed here, please contact SysKonnect's technical | ||
556 | support for help (linux@syskonnect.de). | ||
557 | When contacting our technical support, please ensure that the following | ||
558 | information is available: | ||
559 | - System Manufacturer and HW Informations (CPU, Memory... ) | ||
560 | - PCI-Boards in your system | ||
561 | - Distribution | ||
562 | - Kernel version | ||
563 | - Driver version | ||
564 | *** | ||
565 | |||
566 | |||
567 | |||
568 | ***End of Readme File*** | ||
diff --git a/Documentation/networking/skfp.txt b/Documentation/networking/skfp.txt new file mode 100644 index 000000000000..3a419ed42f81 --- /dev/null +++ b/Documentation/networking/skfp.txt | |||
@@ -0,0 +1,220 @@ | |||
1 | (C)Copyright 1998-2000 SysKonnect, | ||
2 | =========================================================================== | ||
3 | |||
4 | skfp.txt created 11-May-2000 | ||
5 | |||
6 | Readme File for skfp.o v2.06 | ||
7 | |||
8 | |||
9 | This file contains | ||
10 | (1) OVERVIEW | ||
11 | (2) SUPPORTED ADAPTERS | ||
12 | (3) GENERAL INFORMATION | ||
13 | (4) INSTALLATION | ||
14 | (5) INCLUSION OF THE ADAPTER IN SYSTEM START | ||
15 | (6) TROUBLESHOOTING | ||
16 | (7) FUNCTION OF THE ADAPTER LEDS | ||
17 | (8) HISTORY | ||
18 | |||
19 | =========================================================================== | ||
20 | |||
21 | |||
22 | |||
23 | (1) OVERVIEW | ||
24 | ============ | ||
25 | |||
26 | This README explains how to use the driver 'skfp' for Linux with your | ||
27 | network adapter. | ||
28 | |||
29 | Chapter 2: Contains a list of all network adapters that are supported by | ||
30 | this driver. | ||
31 | |||
32 | Chapter 3: Gives some general information. | ||
33 | |||
34 | Chapter 4: Describes common problems and solutions. | ||
35 | |||
36 | Chapter 5: Shows the changed functionality of the adapter LEDs. | ||
37 | |||
38 | Chapter 6: History of development. | ||
39 | |||
40 | *** | ||
41 | |||
42 | |||
43 | (2) SUPPORTED ADAPTERS | ||
44 | ====================== | ||
45 | |||
46 | The network driver 'skfp' supports the following network adapters: | ||
47 | SysKonnect adapters: | ||
48 | - SK-5521 (SK-NET FDDI-UP) | ||
49 | - SK-5522 (SK-NET FDDI-UP DAS) | ||
50 | - SK-5541 (SK-NET FDDI-FP) | ||
51 | - SK-5543 (SK-NET FDDI-LP) | ||
52 | - SK-5544 (SK-NET FDDI-LP DAS) | ||
53 | - SK-5821 (SK-NET FDDI-UP64) | ||
54 | - SK-5822 (SK-NET FDDI-UP64 DAS) | ||
55 | - SK-5841 (SK-NET FDDI-FP64) | ||
56 | - SK-5843 (SK-NET FDDI-LP64) | ||
57 | - SK-5844 (SK-NET FDDI-LP64 DAS) | ||
58 | Compaq adapters (not tested): | ||
59 | - Netelligent 100 FDDI DAS Fibre SC | ||
60 | - Netelligent 100 FDDI SAS Fibre SC | ||
61 | - Netelligent 100 FDDI DAS UTP | ||
62 | - Netelligent 100 FDDI SAS UTP | ||
63 | - Netelligent 100 FDDI SAS Fibre MIC | ||
64 | *** | ||
65 | |||
66 | |||
67 | (3) GENERAL INFORMATION | ||
68 | ======================= | ||
69 | |||
70 | From v2.01 on, the driver is integrated in the linux kernel sources. | ||
71 | Therefor, the installation is the same as for any other adapter | ||
72 | supported by the kernel. | ||
73 | Refer to the manual of your distribution about the installation | ||
74 | of network adapters. | ||
75 | Makes my life much easier :-) | ||
76 | *** | ||
77 | |||
78 | |||
79 | (4) TROUBLESHOOTING | ||
80 | =================== | ||
81 | |||
82 | If you run into problems during installation, check those items: | ||
83 | |||
84 | Problem: The FDDI adapter can not be found by the driver. | ||
85 | Reason: Look in /proc/pci for the following entry: | ||
86 | 'FDDI network controller: SysKonnect SK-FDDI-PCI ...' | ||
87 | If this entry exists, then the FDDI adapter has been | ||
88 | found by the system and should be able to be used. | ||
89 | If this entry does not exist or if the file '/proc/pci' | ||
90 | is not there, then you may have a hardware problem or PCI | ||
91 | support may not be enabled in your kernel. | ||
92 | The adapter can be checked using the diagnostic program | ||
93 | which is available from the SysKonnect web site: | ||
94 | www.syskonnect.de | ||
95 | Some COMPAQ machines have a problem with PCI under | ||
96 | Linux. This is described in the 'PCI howto' document | ||
97 | (included in some distributions or available from the | ||
98 | www, e.g. at 'www.linux.org') and no workaround is available. | ||
99 | |||
100 | Problem: You want to use your computer as a router between | ||
101 | multiple IP subnetworks (using multiple adapters), but | ||
102 | you can not reach computers in other subnetworks. | ||
103 | Reason: Either the router's kernel is not configured for IP | ||
104 | forwarding or there is a problem with the routing table | ||
105 | and gateway configuration in at least one of the | ||
106 | computers. | ||
107 | |||
108 | If your problem is not listed here, please contact our | ||
109 | technical support for help. | ||
110 | You can send email to: | ||
111 | linux@syskonnect.de | ||
112 | When contacting our technical support, | ||
113 | please ensure that the following information is available: | ||
114 | - System Manufacturer and Model | ||
115 | - Boards in your system | ||
116 | - Distribution | ||
117 | - Kernel version | ||
118 | |||
119 | *** | ||
120 | |||
121 | |||
122 | (5) FUNCTION OF THE ADAPTER LEDS | ||
123 | ================================ | ||
124 | |||
125 | The functionality of the LED's on the FDDI network adapters was | ||
126 | changed in SMT version v2.82. With this new SMT version, the yellow | ||
127 | LED works as a ring operational indicator. An active yellow LED | ||
128 | indicates that the ring is down. The green LED on the adapter now | ||
129 | works as a link indicator where an active GREEN LED indicates that | ||
130 | the respective port has a physical connection. | ||
131 | |||
132 | With versions of SMT prior to v2.82 a ring up was indicated if the | ||
133 | yellow LED was off while the green LED(s) showed the connection | ||
134 | status of the adapter. During a ring down the green LED was off and | ||
135 | the yellow LED was on. | ||
136 | |||
137 | All implementations indicate that a driver is not loaded if | ||
138 | all LEDs are off. | ||
139 | |||
140 | *** | ||
141 | |||
142 | |||
143 | (6) HISTORY | ||
144 | =========== | ||
145 | |||
146 | v2.06 (20000511) (In-Kernel version) | ||
147 | New features: | ||
148 | - 64 bit support | ||
149 | - new pci dma interface | ||
150 | - in kernel 2.3.99 | ||
151 | |||
152 | v2.05 (20000217) (In-Kernel version) | ||
153 | New features: | ||
154 | - Changes for 2.3.45 kernel | ||
155 | |||
156 | v2.04 (20000207) (Standalone version) | ||
157 | New features: | ||
158 | - Added rx/tx byte counter | ||
159 | |||
160 | v2.03 (20000111) (Standalone version) | ||
161 | Problems fixed: | ||
162 | - Fixed printk statements from v2.02 | ||
163 | |||
164 | v2.02 (991215) (Standalone version) | ||
165 | Problems fixed: | ||
166 | - Removed unnecessary output | ||
167 | - Fixed path for "printver.sh" in makefile | ||
168 | |||
169 | v2.01 (991122) (In-Kernel version) | ||
170 | New features: | ||
171 | - Integration in Linux kernel sources | ||
172 | - Support for memory mapped I/O. | ||
173 | |||
174 | v2.00 (991112) | ||
175 | New features: | ||
176 | - Full source released under GPL | ||
177 | |||
178 | v1.05 (991023) | ||
179 | Problems fixed: | ||
180 | - Compilation with kernel version 2.2.13 failed | ||
181 | |||
182 | v1.04 (990427) | ||
183 | Changes: | ||
184 | - New SMT module included, changing LED functionality | ||
185 | Problems fixed: | ||
186 | - Synchronization on SMP machines was buggy | ||
187 | |||
188 | v1.03 (990325) | ||
189 | Problems fixed: | ||
190 | - Interrupt routing on SMP machines could be incorrect | ||
191 | |||
192 | v1.02 (990310) | ||
193 | New features: | ||
194 | - Support for kernel versions 2.2.x added | ||
195 | - Kernel patch instead of private duplicate of kernel functions | ||
196 | |||
197 | v1.01 (980812) | ||
198 | Problems fixed: | ||
199 | Connection hangup with telnet | ||
200 | Slow telnet connection | ||
201 | |||
202 | v1.00 beta 01 (980507) | ||
203 | New features: | ||
204 | None. | ||
205 | Problems fixed: | ||
206 | None. | ||
207 | Known limitations: | ||
208 | - tar archive instead of standard package format (rpm). | ||
209 | - FDDI statistic is empty. | ||
210 | - not tested with 2.1.xx kernels | ||
211 | - integration in kernel not tested | ||
212 | - not tested simultaneously with FDDI adapters from other vendors. | ||
213 | - only X86 processors supported. | ||
214 | - SBA (Synchronous Bandwidth Allocator) parameters can | ||
215 | not be configured. | ||
216 | - does not work on some COMPAQ machines. See the PCI howto | ||
217 | document for details about this problem. | ||
218 | - data corruption with kernel versions below 2.0.33. | ||
219 | |||
220 | *** End of information file *** | ||
diff --git a/Documentation/networking/slicecom.hun b/Documentation/networking/slicecom.hun new file mode 100644 index 000000000000..5acf1918694a --- /dev/null +++ b/Documentation/networking/slicecom.hun | |||
@@ -0,0 +1,371 @@ | |||
1 | |||
2 | SliceCOM adapter felhasznaloi dokumentacioja - 0.51 verziohoz | ||
3 | |||
4 | Bartók István <bartoki@itc.hu> | ||
5 | Utolso modositas: Wed Aug 29 17:26:58 CEST 2001 | ||
6 | |||
7 | ----------------------------------------------------------------- | ||
8 | |||
9 | Hasznalata: | ||
10 | |||
11 | Forditas: | ||
12 | |||
13 | Code maturity level options | ||
14 | [*] Prompt for development and/or incomplete code/drivers | ||
15 | |||
16 | Network device support | ||
17 | Wan interfaces | ||
18 | <M> MultiGate (COMX) synchronous | ||
19 | <M> Support for MUNICH based boards: SliceCOM, PCICOM (NEW) | ||
20 | <M> Support for HDLC and syncPPP... | ||
21 | |||
22 | |||
23 | A modulok betoltese: | ||
24 | |||
25 | modprobe comx | ||
26 | |||
27 | modprobe comx-proto-ppp # a Cisco-HDLC es a SyncPPP protokollt is | ||
28 | # ez a modul adja | ||
29 | |||
30 | modprobe comx-hw-munich # a modul betoltodeskor azonnal jelent a | ||
31 | # syslogba a detektalt kartyakrol | ||
32 | |||
33 | |||
34 | Konfiguralas: | ||
35 | |||
36 | # Ezen az interfeszen Cisco-HDLC vonali protokoll fog futni | ||
37 | # Az interfeszhez rendelt idoszeletek: 1,2 (128 kbit/sec-es vonal) | ||
38 | # (a G.703 keretben az elso adatot vivo idoszelet az 1-es) | ||
39 | # | ||
40 | mkdir /proc/comx/comx0.1/ | ||
41 | echo slicecom >/proc/comx/comx0.1/boardtype | ||
42 | echo hdlc >/proc/comx/comx0.1/protocol | ||
43 | echo 1 2 >/proc/comx/comx0.1/timeslots | ||
44 | |||
45 | |||
46 | # Ezen az interfeszen SyncPPP vonali protokoll fog futni | ||
47 | # Az interfeszhez rendelt idoszelet: 3 (64 kbit/sec-es vonal) | ||
48 | # | ||
49 | mkdir /proc/comx/comx0.2/ | ||
50 | echo slicecom >/proc/comx/comx0.2/boardtype | ||
51 | echo ppp >/proc/comx/comx0.2/protocol | ||
52 | echo 3 >/proc/comx/comx0.2/timeslots | ||
53 | |||
54 | ... | ||
55 | |||
56 | ifconfig comx0.1 up | ||
57 | ifconfig comx0.2 up | ||
58 | |||
59 | ----------------------------------------------------------------- | ||
60 | |||
61 | A COMX driverek default 20 csomagnyi transmit queue-t rendelnek a halozati | ||
62 | interfeszekhez. WAN halozatokban ennel hosszabbat is szokas hasznalni | ||
63 | (20 es 100 kozott), hogy a vonal kihasznaltsaga nagy terheles eseten jobb | ||
64 | legyen (bar ezzel megno a varhato kesleltetes a csomagok sorban allasa miatt): | ||
65 | |||
66 | # ifconfig comx0 txqueuelen 50 | ||
67 | |||
68 | Ezt a beallitasi lehetoseget csak az ujabb disztribuciok ifconfig parancsa | ||
69 | tamogatja (amik mar a 2.2 kernelekhez keszultek, mint a RedHat 6.1 vagy a | ||
70 | Debian 2.2). | ||
71 | |||
72 | A 2.1-es Debian disztribuciohoz a http://www.debian.org/~rcw/2.2/netbase/ | ||
73 | cimrol toltheto le ujabb netbase csomag, ami mar ilyet tamogato ifconfig | ||
74 | parancsot tartalmaz. Bovebben a 2.2 kernel hasznalatarol Debian 2.1 alatt: | ||
75 | http://www.debian.org/releases/stable/running-kernel-2.2 | ||
76 | |||
77 | ----------------------------------------------------------------- | ||
78 | |||
79 | A kartya LED-jeinek jelentese: | ||
80 | |||
81 | piros - eg, ha Remote Alarm-ot kuld a tuloldal | ||
82 | zold - eg, ha a vett jelben megtalalja a keretszinkront | ||
83 | |||
84 | Reszletesebben: | ||
85 | |||
86 | piros: zold: jelentes: | ||
87 | |||
88 | - - nincs keretszinkron (nincs jel, vagy rossz a jel) | ||
89 | - eg "minden rendben" | ||
90 | eg eg a vetel OK, de a tuloldal Remote Alarm-ot kuld | ||
91 | eg - ez nincs ertelmezve, egyelore funkcio nelkul | ||
92 | |||
93 | ----------------------------------------------------------------- | ||
94 | |||
95 | Reszletesebb leiras a hardver beallitasi lehetosegeirol: | ||
96 | |||
97 | Az altalanos,- es a protokoll-retegek beallitasi lehetosegeirol a 'comx.txt' | ||
98 | fajlban leirtak SliceCOM kartyanal is ervenyesek, itt csak a hardver-specifikus | ||
99 | beallitasi lehetosegek vannak osszefoglalva: | ||
100 | |||
101 | Konfiguralasi interfesz a /proc/comx/ alatt: | ||
102 | |||
103 | Minden timeslot-csoportnak kulon comx* interfeszt kell letrehozni mkdir-rel: | ||
104 | comx0, comx1, .. stb. Itt beallithato, hogy az adott interfesz hanyadik kartya | ||
105 | melyik timeslotja(i)bol alljon ossze. A Cisco-fele serial3:1 elnevezesek | ||
106 | (serial3:1 = a 3. kartyaban az 1-es idoszelet-csoport) Linuxon aliasing-ot | ||
107 | jelentenenek, ezert mi nem tudunk ilyen elnevezest hasznalni. | ||
108 | |||
109 | Tobb kartya eseten a comx0.1, comx0.2, ... vagy slice0.1, slice0.2 nevek | ||
110 | hasznalhatoak. | ||
111 | |||
112 | Tobb SliceCOM kartya is lehet egy gepben, de sajat interrupt kell mindegyiknek, | ||
113 | nem tud meg megosztott interruptot kezelni. | ||
114 | |||
115 | Az egesz kartyat erinto beallitasok: | ||
116 | |||
117 | Az ioport es irq beallitas nincs: amit a PCI BIOS kioszt a rendszernek, | ||
118 | azt hasznalja a driver. | ||
119 | |||
120 | |||
121 | comx0/boardnum - hanyadik SliceCOM kartya a gepben (a 'termeszetes' PCI | ||
122 | sorrendben ertve: ahogyan a /proc/pci-ban vagy az 'lspci' | ||
123 | kimeneteben megjelenik, altalaban az alaplapi PCI meghajto | ||
124 | aramkorokhoz kozelebb eso kartyak a kisebb sorszamuak) | ||
125 | |||
126 | Default: 0 (0-tol kezdodik a szamolas) | ||
127 | |||
128 | |||
129 | Bar a kovetkezoket csak egy-egy interfeszen allitjuk at, megis az egesz kartya | ||
130 | mukodeset egyszerre allitjak. A megkotes hogy csak UP-ban levo interfeszen | ||
131 | hasznalhatoak, azert van, mert kulonben nem vart eredmenyekre vezetne egy ilyen | ||
132 | paranccsorozat: | ||
133 | |||
134 | echo 0 >boardnum | ||
135 | echo internal >clock_source | ||
136 | echo 1 >boardnum | ||
137 | |||
138 | - Ez a 0-s board clock_source-at allitana at. | ||
139 | |||
140 | Ezek a beallitasok megmaradnak az osszes interfesz torlesekor, de torlodnek | ||
141 | a driver modul ki/betoltesekor. | ||
142 | |||
143 | |||
144 | comx0/clock_source - A Tx orajelforrasa, a Cisco-val hasonlatosra keszult. | ||
145 | Hasznalata: | ||
146 | |||
147 | papaya:# echo line >/proc/comx/comx0/clock_source | ||
148 | papaya:# echo internal >/proc/comx/comx0/clock_source | ||
149 | |||
150 | line - A Tx orajelet a vett adatfolyambol dekodolja, igyekszik | ||
151 | igazodni hozza. Ha nem lat orajelet az inputon, akkor | ||
152 | atall a sajat orajelgeneratorara. | ||
153 | internal - A Tx orajelet a sajat orajelgeneratora szolgaltatja. | ||
154 | |||
155 | Default: line | ||
156 | |||
157 | Normal osszeallitas eseten a tavkozlesi szolgaltato eszkoze | ||
158 | (pl. HDSL modem) adja az orajelet, ezert ez a default. | ||
159 | |||
160 | |||
161 | comx0/framing - A CRC4 ki/be kapcsolasa | ||
162 | |||
163 | A CRC4: 16 PCM keretet (A PCM keret az, amibe a 32 darab 64 | ||
164 | kilobites csatorna van bemultiplexalva. Nem osszetevesztendo a HDLC | ||
165 | kerettel.) 2x8 -as csoportokra osztanak, es azokhoz 4-4 bites CRC-t | ||
166 | szamolnak. Elsosorban a vonal minosegenek a monitorozasara szolgal. | ||
167 | |||
168 | papaya:~# echo crc4 >/proc/comx/comx0/framing | ||
169 | papaya:~# echo no-crc4 >/proc/comx/comx0/framing | ||
170 | |||
171 | Default a 'crc4', a MATAV vonalak altalaban igy futnak. De ha nem | ||
172 | egyforma is a beallitas a vonal ket vegen, attol a forgalom altalaban | ||
173 | at tud menni. | ||
174 | |||
175 | |||
176 | comx0/linecode - A vonali kodolas beallitasa | ||
177 | |||
178 | papaya:~# echo hdb3 >/proc/comx/comx0/linecode | ||
179 | papaya:~# echo ami >/proc/comx/comx0/linecode | ||
180 | |||
181 | Default a 'hdb3', a MATAV vonalak igy futnak. | ||
182 | |||
183 | (az AMI kodolas igen ritka E1-es vonalaknal). Ha ez a beallitas nem | ||
184 | egyezik a vonal ket vegen, akkor elofordulhat hogy a keretszinkron | ||
185 | osszejon, de CRC4-hibak es a vonalakon atvitt adatokban is hibak | ||
186 | keletkeznek (amit a HDLC/SyncPPP szinten CRC-hibaval jelez) | ||
187 | |||
188 | |||
189 | comx0/reg - a kartya aramkoreinek, a MUNICH (reg) es a FALC (lbireg) | ||
190 | comx0/lbireg regisztereinek kozvetlen elerese. Hasznalata: | ||
191 | |||
192 | echo >reg 0x04 0x0 - a 4-es regiszterbe 0-t ir | ||
193 | echo >reg 0x104 - printk()-val kiirja a 4-es regiszter | ||
194 | tartalmat a syslogba. | ||
195 | |||
196 | WARNING: ezek csak a fejleszteshez keszultek, sok galibat | ||
197 | lehet veluk okozni! | ||
198 | |||
199 | |||
200 | comx0/loopback - A kartya G.703 jelenek a visszahurkolasara is van lehetoseg: | ||
201 | |||
202 | papaya:# echo none >/proc/comx/comx0/loopback | ||
203 | papaya:# echo local >/proc/comx/comx0/loopback | ||
204 | papaya:# echo remote >/proc/comx/comx0/loopback | ||
205 | |||
206 | none - nincs visszahurkolas, normal mukodes | ||
207 | local - a kartya a sajat maga altal adott jelet kapja vissza | ||
208 | remote - a kartya a kivulrol vett jelet adja kifele | ||
209 | |||
210 | Default: none | ||
211 | |||
212 | ----------------------------------------------------------------- | ||
213 | |||
214 | Az interfeszhez (Cisco terminologiaban 'channel-group') kapcsolodo beallitasok: | ||
215 | |||
216 | comx0/timeslots - mely timeslotok (idoszeletek) tartoznak az adott interfeszhez. | ||
217 | |||
218 | papaya:~# cat /proc/comx/comx0/timeslots | ||
219 | 1 3 4 5 6 | ||
220 | papaya:~# | ||
221 | |||
222 | Egy timeslot megkeresese (hanyas interfeszbe tartozik nalunk): | ||
223 | |||
224 | papaya:~# grep ' 4' /proc/comx/comx*/timeslots | ||
225 | /proc/comx/comx0/timeslots:1 3 4 5 6 | ||
226 | papaya:~# | ||
227 | |||
228 | Beallitasa: | ||
229 | papaya:~# echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots | ||
230 | |||
231 | A timeslotok sorrendje nem szamit, '1 3 2' ugyanaz mint az '1 2 3'. | ||
232 | |||
233 | Beallitashoz az adott interfesznek DOWN-ban kell lennie | ||
234 | (ifconfig comx0 down), de ugyanannak a kartyanak a tobbi interfesze | ||
235 | uzemelhet kozben. | ||
236 | |||
237 | Beallitaskor leellenorzi, hogy az uj timeslotok nem utkoznek-e egy | ||
238 | masik interfesz timeslotjaival. Ha utkoznek, akkor nem allitja at. | ||
239 | |||
240 | Mindig 10-es szamrendszerben tortenik a timeslotok ertelmezese, nehogy | ||
241 | a 08, 09 alaku felirast rosszul ertelmezze. | ||
242 | |||
243 | ----------------------------------------------------------------- | ||
244 | |||
245 | Az interfeszek es a kartya allapotanak lekerdezese: | ||
246 | |||
247 | - A ' '-szel kezdodo sorok az eredeti kimenetet, a //-rel kezdodo sorok a | ||
248 | magyarazatot jelzik. | ||
249 | |||
250 | papaya:~$ cat /proc/comx/comx1/status | ||
251 | Interface administrative status is UP, modem status is UP, protocol is UP | ||
252 | Modem status changes: 0, Transmitter status is IDLE, tbusy: 0 | ||
253 | Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m) | ||
254 | (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m) | ||
255 | Debug flags: none | ||
256 | RX errors: len: 22, overrun: 1, crc: 0, aborts: 0 | ||
257 | buffer overrun: 0, pbuffer overrun: 0 | ||
258 | TX errors: underrun: 0 | ||
259 | Line keepalive (value: 10) status UP [0] | ||
260 | |||
261 | // Itt kezdodik a hardver-specifikus resz: | ||
262 | Controller status: | ||
263 | No alarms | ||
264 | |||
265 | // Alarm: hibajelzes: | ||
266 | // | ||
267 | // No alarms - minden rendben | ||
268 | // | ||
269 | // LOS - Loss Of Signal - nem erzekel jelet a bemeneten. | ||
270 | // AIS - Alarm Indication Signal - csak egymas utani 1-esek jonnek | ||
271 | // a bemeneten, a tuloldal igy is jelezheti hogy meghibasodott vagy | ||
272 | // nincs inicializalva. | ||
273 | // AUXP - Auxiliary Pattern Indication - 01010101.. sorozat jon a bemeneten. | ||
274 | // LFA - Loss of Frame Alignment - nincs keretszinkron | ||
275 | // RRA - Receive Remote Alarm - a tuloldal el, de hibat jelez. | ||
276 | // LMFA - Loss of CRC4 Multiframe Alignment - nincs CRC4-multikeret-szinkron | ||
277 | // NMF - No Multiframe alignment Found after 400 msec - ilyen alarm a no-crc4 | ||
278 | // es crc4 keretezesek eseten nincs, lasd lentebb | ||
279 | // | ||
280 | // Egyeb lehetseges hibajelzesek: | ||
281 | // | ||
282 | // Transmit Line Short - a kartya ugy erzi hogy az adasi kimenete rovidre | ||
283 | // van zarva, ezert kikapcsolta az adast. (nem feltetlenul veszi eszre | ||
284 | // a kulso rovidzarat) | ||
285 | |||
286 | // A veteli oldal csomagjainak lancolt listai, debug celokra: | ||
287 | |||
288 | Rx ring: | ||
289 | rafutott: 0 | ||
290 | lastcheck: 50845731, jiffies: 51314281 | ||
291 | base: 017b1858 | ||
292 | rx_desc_ptr: 0 | ||
293 | rx_desc_ptr: 017b1858 | ||
294 | hw_curr_ptr: 017b1858 | ||
295 | 06040000 017b1868 017b1898 c016ff00 | ||
296 | 06040000 017b1878 017b1e9c c016ff00 | ||
297 | 46040000 017b1888 017b24a0 c016ff00 | ||
298 | 06040000 017b1858 017b2aa4 c016ff00 | ||
299 | |||
300 | // A kartyat hasznalo tobbi interfesz: a 0-s channel-group a comx1 interfesz, | ||
301 | // es az 1,2,...,16 timeslotok tartoznak hozza: | ||
302 | |||
303 | Interfaces using this board: (channel-group, interface, timeslots) | ||
304 | 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ||
305 | 1 comx2: 17 | ||
306 | 2 comx3: 18 | ||
307 | 3 comx4: 19 | ||
308 | 4 comx5: 20 | ||
309 | 5 comx6: 21 | ||
310 | 6 comx7: 22 | ||
311 | 7 comx8: 23 | ||
312 | 8 comx9: 24 | ||
313 | 9 comx10: 25 | ||
314 | 10 comx11: 26 | ||
315 | 11 comx12: 27 | ||
316 | 12 comx13: 28 | ||
317 | 13 comx14: 29 | ||
318 | 14 comx15: 30 | ||
319 | 15 comx16: 31 | ||
320 | |||
321 | // Hany esemenyt kezelt le a driver egy-egy hardver-interrupt kiszolgalasanal: | ||
322 | |||
323 | Interrupt work histogram: | ||
324 | hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79 | ||
325 | hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1 | ||
326 | hist[ 8]: 0 hist[ 9]: 7 | ||
327 | |||
328 | // Hany kikuldendo csomag volt mar a Tx-ringben amikor ujabb lett irva bele: | ||
329 | |||
330 | Tx ring histogram: | ||
331 | hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0 | ||
332 | |||
333 | // Az E1-interfesz hiba-szamlaloi, az rfc2495-nek megfeleloen: | ||
334 | // (kb. a Cisco routerek "show controllers e1" formatumaban: http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126) | ||
335 | |||
336 | Data in current interval (91 seconds elapsed): | ||
337 | 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors | ||
338 | 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins | ||
339 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs | ||
340 | Data in Interval 1 (15 minutes): | ||
341 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
342 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
343 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
344 | Data in last 4 intervals (1 hour): | ||
345 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
346 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
347 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
348 | Data in last 96 intervals (24 hours): | ||
349 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
350 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
351 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
352 | |||
353 | ----------------------------------------------------------------- | ||
354 | |||
355 | Nehany kulonlegesebb beallitasi lehetoseg (idovel beepulhetnek majd a driverbe): | ||
356 | Ezekkel sok galibat lehet okozni, nagyon ovatosan kell oket hasznalni! | ||
357 | |||
358 | modified CRC-4, for improved interworking of CRC-4 and non-CRC-4 | ||
359 | devices: (lasd page 107 es g706 Annex B) | ||
360 | lbireg[ 0x1b ] |= 0x08 | ||
361 | lbireg[ 0x1c ] |= 0xc0 | ||
362 | - ilyenkor ertelmezett az NMF - 'No Multiframe alignment Found after | ||
363 | 400 msec' alarm. | ||
364 | |||
365 | FALC - a vonali meghajto IC | ||
366 | local loop - a sajat adasomat halljam vissza | ||
367 | remote loop - a kivulrol jovo adast adom vissza | ||
368 | |||
369 | Egy hibakeresesre hasznalhato dolog: | ||
370 | - 1-es timeslot local loop a FALC-ban: echo >lbireg 0x1d 0x21 | ||
371 | - local loop kikapcsolasa: echo >lbireg 0x1d 0x00 | ||
diff --git a/Documentation/networking/slicecom.txt b/Documentation/networking/slicecom.txt new file mode 100644 index 000000000000..59cfd95121fb --- /dev/null +++ b/Documentation/networking/slicecom.txt | |||
@@ -0,0 +1,369 @@ | |||
1 | |||
2 | SliceCOM adapter user's documentation - for the 0.51 driver version | ||
3 | |||
4 | Written by Bartók István <bartoki@itc.hu> | ||
5 | |||
6 | English translation: Lakatos György <gyuri@itc.hu> | ||
7 | Mon Dec 11 15:28:42 CET 2000 | ||
8 | |||
9 | Last modified: Wed Aug 29 17:25:37 CEST 2001 | ||
10 | |||
11 | ----------------------------------------------------------------- | ||
12 | |||
13 | Usage: | ||
14 | |||
15 | Compiling the kernel: | ||
16 | |||
17 | Code maturity level options | ||
18 | [*] Prompt for development and/or incomplete code/drivers | ||
19 | |||
20 | Network device support | ||
21 | Wan interfaces | ||
22 | <M> MultiGate (COMX) synchronous | ||
23 | <M> Support for MUNICH based boards: SliceCOM, PCICOM (NEW) | ||
24 | <M> Support for HDLC and syncPPP... | ||
25 | |||
26 | |||
27 | Loading the modules: | ||
28 | |||
29 | modprobe comx | ||
30 | |||
31 | modprobe comx-proto-ppp # module for Cisco-HDLC and SyncPPP protocols | ||
32 | |||
33 | modprobe comx-hw-munich # the module logs information by the kernel | ||
34 | # about the detected boards | ||
35 | |||
36 | |||
37 | Configuring the board: | ||
38 | |||
39 | # This interface will use the Cisco-HDLC line protocol, | ||
40 | # the timeslices assigned are 1,2 (128 KiBit line speed) | ||
41 | # (the first data timeslice in the G.703 frame is no. 1) | ||
42 | # | ||
43 | mkdir /proc/comx/comx0.1/ | ||
44 | echo slicecom >/proc/comx/comx0.1/boardtype | ||
45 | echo hdlc >/proc/comx/comx0.1/protocol | ||
46 | echo 1 2 >/proc/comx/comx0.1/timeslots | ||
47 | |||
48 | |||
49 | # This interface uses SyncPPP line protocol, the assigned | ||
50 | # is no. 3 (64 KiBit line speed) | ||
51 | # | ||
52 | mkdir /proc/comx/comx0.2/ | ||
53 | echo slicecom >/proc/comx/comx0.2/boardtype | ||
54 | echo ppp >/proc/comx/comx0.2/protocol | ||
55 | echo 3 >/proc/comx/comx0.2/timeslots | ||
56 | |||
57 | ... | ||
58 | |||
59 | ifconfig comx0.1 up | ||
60 | ifconfig comx0.2 up | ||
61 | |||
62 | ----------------------------------------------------------------- | ||
63 | |||
64 | The COMX interfaces use a 10 packet transmit queue by default, however WAN | ||
65 | networks sometimes use bigger values (20 to 100), to utilize the line better | ||
66 | by large traffic (though the line delay increases because of more packets | ||
67 | join the queue). | ||
68 | |||
69 | # ifconfig comx0 txqueuelen 50 | ||
70 | |||
71 | This option is only supported by the ifconfig command of the later | ||
72 | distributions, which came with 2.2 kernels, such as RedHat 6.1 or Debian 2.2. | ||
73 | |||
74 | You can download a newer netbase packet from | ||
75 | http://www.debian.org/~rcw/2.2/netbase/ for Debian 2.1, which has a new | ||
76 | ifconfig. You can get further information about using 2.2 kernel with | ||
77 | Debian 2.1 from http://www.debian.org/releases/stable/running-kernel-2.2 | ||
78 | |||
79 | ----------------------------------------------------------------- | ||
80 | |||
81 | The SliceCom LEDs: | ||
82 | |||
83 | red - on, if the interface is unconfigured, or it gets Remote Alarm-s | ||
84 | green - on, if the board finds frame-sync in the received signal | ||
85 | |||
86 | A bit more detailed: | ||
87 | |||
88 | red: green: meaning: | ||
89 | |||
90 | - - no frame-sync, no signal received, or signal SNAFU. | ||
91 | - on "Everything is OK" | ||
92 | on on Recepion is ok, but the remote end sends Remote Alarm | ||
93 | on - The interface is unconfigured | ||
94 | |||
95 | ----------------------------------------------------------------- | ||
96 | |||
97 | A more detailed description of the hardware setting options: | ||
98 | |||
99 | The general and the protocol layer options described in the 'comx.txt' file | ||
100 | apply to the SliceCom as well, I only summarize the SliceCom hardware specific | ||
101 | settings below. | ||
102 | |||
103 | The '/proc/comx' configuring interface: | ||
104 | |||
105 | An interface directory should be created for every timeslot group with | ||
106 | 'mkdir', e,g: 'comx0', 'comx1' etc. The timeslots can be assigned here to the | ||
107 | specific interface. The Cisco-like naming convention (serial3:1 - first | ||
108 | timeslot group of the 3rd. board) can't be used here, because these mean IP | ||
109 | aliasing in Linux. | ||
110 | |||
111 | You can give any meaningful name to keep the configuration clear; | ||
112 | e.g: 'comx0.1', 'comx0.2', 'comx1.1', comx1.2', if you have two boards | ||
113 | with two interfaces each. | ||
114 | |||
115 | Settings, which apply to the board: | ||
116 | |||
117 | Neither 'io' nor 'irq' settings required, the driver uses the resources | ||
118 | given by the PCI BIOS. | ||
119 | |||
120 | comx0/boardnum - board number of the SliceCom in the PC (using the 'natural' | ||
121 | PCI order) as listed in '/proc/pci' or the output of the | ||
122 | 'lspci' command, generally the slots nearer to the motherboard | ||
123 | PCI driver chips have the lower numbers. | ||
124 | |||
125 | Default: 0 (the counting starts with 0) | ||
126 | |||
127 | Though the options below are to be set on a single interface, they apply to the | ||
128 | whole board. The restriction, to use them on 'UP' interfaces, is because the | ||
129 | command sequence below could lead to unpredicable results. | ||
130 | |||
131 | # echo 0 >boardnum | ||
132 | # echo internal >clock_source | ||
133 | # echo 1 >boardnum | ||
134 | |||
135 | The sequence would set the clock source of board 0. | ||
136 | |||
137 | These settings will persist after all the interfaces are cleared, but are | ||
138 | cleared when the driver module is unloaded and loaded again. | ||
139 | |||
140 | comx0/clock_source - source of the transmit clock | ||
141 | Usage: | ||
142 | |||
143 | # echo line >/proc/comx/comx0/clock_source | ||
144 | # echo internal >/proc/comx/comx0/clock_source | ||
145 | |||
146 | line - The Tx clock is being decoded if the input data stream, | ||
147 | if no clock seen on the input, then the board will use it's | ||
148 | own clock generator. | ||
149 | |||
150 | internal - The Tx clock is supplied by the builtin clock generator. | ||
151 | |||
152 | Default: line | ||
153 | |||
154 | Normally, the telecommunication company's end device (the HDSL | ||
155 | modem) provides the Tx clock, that's why 'line' is the default. | ||
156 | |||
157 | comx0/framing - Switching CRC4 off/on | ||
158 | |||
159 | CRC4: 16 PCM frames (The 32 64Kibit channels are multiplexed into a | ||
160 | PCM frame, nothing to do with HDLC frames) are divided into 2x8 | ||
161 | groups, each group has a 4 bit CRC. | ||
162 | |||
163 | # echo crc4 >/proc/comx/comx0/framing | ||
164 | # echo no-crc4 >/proc/comx/comx0/framing | ||
165 | |||
166 | Default is 'crc4', the Hungarian MATAV lines behave like this. | ||
167 | The traffic generally passes if this setting on both ends don't match. | ||
168 | |||
169 | comx0/linecode - Setting the line coding | ||
170 | |||
171 | # echo hdb3 >/proc/comx/comx0/linecode | ||
172 | # echo ami >/proc/comx/comx0/linecode | ||
173 | |||
174 | Default a 'hdb3', MATAV lines use this. | ||
175 | |||
176 | (AMI coding is rarely used with E1 lines). Frame sync may occur, if | ||
177 | this setting doesn't match the other end's, but CRC4 and data errors | ||
178 | will come, which will result in CRC errors on HDLC/SyncPPP level. | ||
179 | |||
180 | comx0/reg - direct access to the board's MUNICH (reg) and FALC (lbireg) | ||
181 | comx0/lbireg circuit's registers | ||
182 | |||
183 | # echo >reg 0x04 0x0 - write 0 to register 4 | ||
184 | # echo >reg 0x104 - write the contents of register 4 with | ||
185 | printk() to syslog | ||
186 | |||
187 | WARNING! These are only for development purposes, messing with this will | ||
188 | result much trouble! | ||
189 | |||
190 | comx0/loopback - Places a loop to the board's G.703 signals | ||
191 | |||
192 | # echo none >/proc/comx/comx0/loopback | ||
193 | # echo local >/proc/comx/comx0/loopback | ||
194 | # echo remote >/proc/comx/comx0/loopback | ||
195 | |||
196 | none - normal operation, no loop | ||
197 | local - the board receives it's own output | ||
198 | remote - the board sends the received data to the remote side | ||
199 | |||
200 | Default: none | ||
201 | |||
202 | ----------------------------------------------------------------- | ||
203 | |||
204 | Interface (channel group in Cisco terms) settings: | ||
205 | |||
206 | comx0/timeslots - which timeslots belong to the given interface | ||
207 | |||
208 | Setting: | ||
209 | |||
210 | # echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots | ||
211 | |||
212 | # cat /proc/comx/comx0/timeslots | ||
213 | 1 2 5 6 7 8 | ||
214 | # | ||
215 | |||
216 | Finding a timeslot: | ||
217 | |||
218 | # grep ' 4' /proc/comx/comx*/timeslots | ||
219 | /proc/comx/comx0/timeslots:1 3 4 5 6 | ||
220 | # | ||
221 | |||
222 | The timeslots can be in any order, '1 2 3' is the same as '1 3 2'. | ||
223 | |||
224 | The interface has to be DOWN during the setting ('ifconfig comx0 | ||
225 | down'), but the other interfaces could operate normally. | ||
226 | |||
227 | The driver checks if the assigned timeslots are vacant, if not, then | ||
228 | the setting won't be applied. | ||
229 | |||
230 | The timeslot values are treated as decimal numbers, not to misunderstand | ||
231 | values of 08, 09 form. | ||
232 | |||
233 | ----------------------------------------------------------------- | ||
234 | |||
235 | Checking the interface and board status: | ||
236 | |||
237 | - Lines beginning with ' ' (space) belong to the original output, the lines | ||
238 | which begin with '//' are the comments. | ||
239 | |||
240 | papaya:~$ cat /proc/comx/comx1/status | ||
241 | Interface administrative status is UP, modem status is UP, protocol is UP | ||
242 | Modem status changes: 0, Transmitter status is IDLE, tbusy: 0 | ||
243 | Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m) | ||
244 | (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m) | ||
245 | Debug flags: none | ||
246 | RX errors: len: 22, overrun: 1, crc: 0, aborts: 0 | ||
247 | buffer overrun: 0, pbuffer overrun: 0 | ||
248 | TX errors: underrun: 0 | ||
249 | Line keepalive (value: 10) status UP [0] | ||
250 | |||
251 | // The hardware specific part starts here: | ||
252 | Controller status: | ||
253 | No alarms | ||
254 | |||
255 | // Alarm: | ||
256 | // | ||
257 | // No alarms - Everything OK | ||
258 | // | ||
259 | // LOS - Loss Of Signal - No signal sensed on the input | ||
260 | // AIS - Alarm Indication Signal - The remot side sends '11111111'-s, | ||
261 | // it tells, that there's an error condition, or it's not | ||
262 | // initialised. | ||
263 | // AUXP - Auxiliary Pattern Indication - 01010101.. received. | ||
264 | // LFA - Loss of Frame Alignment - no frame sync received. | ||
265 | // RRA - Receive Remote Alarm - the remote end's OK, but singnals error cond. | ||
266 | // LMFA - Loss of CRC4 Multiframe Alignment - no CRC4 multiframe sync. | ||
267 | // NMF - No Multiframe alignment Found after 400 msec - no such alarm using | ||
268 | // no-crc4 or crc4 framing, see below. | ||
269 | // | ||
270 | // Other possible error messages: | ||
271 | // | ||
272 | // Transmit Line Short - the board felt, that it's output is short-circuited, | ||
273 | // so it switched the transmission off. (The board can't definitely tell, | ||
274 | // that it's output is short-circuited.) | ||
275 | |||
276 | // Chained list of the received packets, for debug purposes: | ||
277 | |||
278 | Rx ring: | ||
279 | rafutott: 0 | ||
280 | lastcheck: 50845731, jiffies: 51314281 | ||
281 | base: 017b1858 | ||
282 | rx_desc_ptr: 0 | ||
283 | rx_desc_ptr: 017b1858 | ||
284 | hw_curr_ptr: 017b1858 | ||
285 | 06040000 017b1868 017b1898 c016ff00 | ||
286 | 06040000 017b1878 017b1e9c c016ff00 | ||
287 | 46040000 017b1888 017b24a0 c016ff00 | ||
288 | 06040000 017b1858 017b2aa4 c016ff00 | ||
289 | |||
290 | // All the interfaces using the board: comx1, using the 1,2,...16 timeslots, | ||
291 | // comx2, using timeslot 17, etc. | ||
292 | |||
293 | Interfaces using this board: (channel-group, interface, timeslots) | ||
294 | 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ||
295 | 1 comx2: 17 | ||
296 | 2 comx3: 18 | ||
297 | 3 comx4: 19 | ||
298 | 4 comx5: 20 | ||
299 | 5 comx6: 21 | ||
300 | 6 comx7: 22 | ||
301 | 7 comx8: 23 | ||
302 | 8 comx9: 24 | ||
303 | 9 comx10: 25 | ||
304 | 10 comx11: 26 | ||
305 | 11 comx12: 27 | ||
306 | 12 comx13: 28 | ||
307 | 13 comx14: 29 | ||
308 | 14 comx15: 30 | ||
309 | 15 comx16: 31 | ||
310 | |||
311 | // The number of events handled by the driver during an interrupt cycle: | ||
312 | |||
313 | Interrupt work histogram: | ||
314 | hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79 | ||
315 | hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1 | ||
316 | hist[ 8]: 0 hist[ 9]: 7 | ||
317 | |||
318 | // The number of packets to send in the Tx ring, when a new one arrived: | ||
319 | |||
320 | Tx ring histogram: | ||
321 | hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0 | ||
322 | |||
323 | // The error counters of the E1 interface, according to the RFC2495, | ||
324 | // (similar to the Cisco "show controllers e1" command's output: | ||
325 | // http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126) | ||
326 | |||
327 | Data in current interval (91 seconds elapsed): | ||
328 | 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors | ||
329 | 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins | ||
330 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs | ||
331 | Data in Interval 1 (15 minutes): | ||
332 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
333 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
334 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
335 | Data in last 4 intervals (1 hour): | ||
336 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
337 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
338 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
339 | Data in last 96 intervals (24 hours): | ||
340 | 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors | ||
341 | 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins | ||
342 | 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs | ||
343 | |||
344 | ----------------------------------------------------------------- | ||
345 | |||
346 | Some unique options, (may get into the driver later): | ||
347 | Treat them very carefully, these can cause much trouble! | ||
348 | |||
349 | modified CRC-4, for improved interworking of CRC-4 and non-CRC-4 | ||
350 | devices: (see page 107 and g706 Annex B) | ||
351 | lbireg[ 0x1b ] |= 0x08 | ||
352 | lbireg[ 0x1c ] |= 0xc0 | ||
353 | |||
354 | - The NMF - 'No Multiframe alignment Found after 400 msec' alarm | ||
355 | comes into account. | ||
356 | |||
357 | FALC - the line driver chip. | ||
358 | local loop - I hear my transmission back. | ||
359 | remote loop - I echo the remote transmission back. | ||
360 | |||
361 | Something useful for finding errors: | ||
362 | |||
363 | - local loop for timeslot 1 in the FALC chip: | ||
364 | |||
365 | # echo >lbireg 0x1d 0x21 | ||
366 | |||
367 | - Swithing the loop off: | ||
368 | |||
369 | # echo >lbireg 0x1d 0x00 | ||
diff --git a/Documentation/networking/smc9.txt b/Documentation/networking/smc9.txt new file mode 100644 index 000000000000..d1e15074e43d --- /dev/null +++ b/Documentation/networking/smc9.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | |||
2 | SMC 9xxxx Driver | ||
3 | Revision 0.12 | ||
4 | 3/5/96 | ||
5 | Copyright 1996 Erik Stahlman | ||
6 | Released under terms of the GNU General Public License. | ||
7 | |||
8 | This file contains the instructions and caveats for my SMC9xxx driver. You | ||
9 | should not be using the driver without reading this file. | ||
10 | |||
11 | Things to note about installation: | ||
12 | |||
13 | 1. The driver should work on all kernels from 1.2.13 until 1.3.71. | ||
14 | (A kernel patch is supplied for 1.3.71 ) | ||
15 | |||
16 | 2. If you include this into the kernel, you might need to change some | ||
17 | options, such as for forcing IRQ. | ||
18 | |||
19 | |||
20 | 3. To compile as a module, run 'make' . | ||
21 | Make will give you the appropriate options for various kernel support. | ||
22 | |||
23 | 4. Loading the driver as a module : | ||
24 | |||
25 | use: insmod smc9194.o | ||
26 | optional parameters: | ||
27 | io=xxxx : your base address | ||
28 | irq=xx : your irq | ||
29 | ifport=x : 0 for whatever is default | ||
30 | 1 for twisted pair | ||
31 | 2 for AUI ( or BNC on some cards ) | ||
32 | |||
33 | How to obtain the latest version? | ||
34 | |||
35 | FTP: | ||
36 | ftp://fenris.campus.vt.edu/smc9/smc9-12.tar.gz | ||
37 | ftp://sfbox.vt.edu/filebox/F/fenris/smc9/smc9-12.tar.gz | ||
38 | |||
39 | |||
40 | Contacting me: | ||
41 | erik@mail.vt.edu | ||
42 | |||
diff --git a/Documentation/networking/smctr.txt b/Documentation/networking/smctr.txt new file mode 100644 index 000000000000..4c866f5a0ee4 --- /dev/null +++ b/Documentation/networking/smctr.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | Text File for the SMC TokenCard TokenRing Linux driver (smctr.c). | ||
2 | By Jay Schulist <jschlst@samba.org> | ||
3 | |||
4 | The Linux SMC Token Ring driver works with the SMC TokenCard Elite (8115T) | ||
5 | ISA and SMC TokenCard Elite/A (8115T/A) MCA adapters. | ||
6 | |||
7 | Latest information on this driver can be obtained on the Linux-SNA WWW site. | ||
8 | Please point your browser to: http://www.linux-sna.org | ||
9 | |||
10 | This driver is rather simple to use. Select Y to Token Ring adapter support | ||
11 | in the kernel configuration. A choice for SMC Token Ring adapters will | ||
12 | appear. This drives supports all SMC ISA/MCA adapters. Choose this | ||
13 | option. I personally recommend compiling the driver as a module (M), but if you | ||
14 | you would like to compile it staticly answer Y instead. | ||
15 | |||
16 | This driver supports multiple adapters without the need to load multiple copies | ||
17 | of the driver. You should be able to load up to 7 adapters without any kernel | ||
18 | modifications, if you are in need of more please contact the maintainer of this | ||
19 | driver. | ||
20 | |||
21 | Load the driver either by lilo/loadlin or as a module. When a module using the | ||
22 | following command will suffice for most: | ||
23 | |||
24 | # modprobe smctr | ||
25 | smctr.c: v1.00 12/6/99 by jschlst@samba.org | ||
26 | tr0: SMC TokenCard 8115T at Io 0x300, Irq 10, Rom 0xd8000, Ram 0xcc000. | ||
27 | |||
28 | Now just setup the device via ifconfig and set and routes you may have. After | ||
29 | this you are ready to start sending some tokens. | ||
30 | |||
31 | Errata: | ||
32 | 1). For anyone wondering where to pick up the SMC adapters please browse | ||
33 | to http://www.smc.com | ||
34 | |||
35 | 2). If you are the first/only Token Ring Client on a Token Ring LAN, please | ||
36 | specify the ringspeed with the ringspeed=[4/16] module option. If no | ||
37 | ringspeed is specified the driver will attempt to autodetect the ring | ||
38 | speed and/or if the adapter is the first/only station on the ring take | ||
39 | the appropriate actions. | ||
40 | |||
41 | NOTE: Default ring speed is 16MB UTP. | ||
42 | |||
43 | 3). PnP support for this adapter sucks. I recommend hard setting the | ||
44 | IO/MEM/IRQ by the jumpers on the adapter. If this is not possible | ||
45 | load the module with the following io=[ioaddr] mem=[mem_addr] | ||
46 | irq=[irq_num]. | ||
47 | |||
48 | The following IRQ, IO, and MEM settings are supported. | ||
49 | |||
50 | IO ports: | ||
51 | 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, 0x300, | ||
52 | 0x320, 0x340, 0x360, 0x380. | ||
53 | |||
54 | IRQs: | ||
55 | 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15 | ||
56 | |||
57 | Memory addresses: | ||
58 | 0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000, | ||
59 | 0xB8000, 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000, | ||
60 | 0xD0000, 0xD4000, 0xD8000, 0xDC000, 0xE0000, 0xE4000, | ||
61 | 0xE8000, 0xEC000, 0xF0000, 0xF4000, 0xF8000, 0xFC000 | ||
62 | |||
63 | This driver is under the GNU General Public License. Its Firmware image is | ||
64 | included as an initialized C-array and is licensed by SMC to the Linux | ||
65 | users of this driver. However no warranty about its fitness is expressed or | ||
66 | implied by SMC. | ||
diff --git a/Documentation/networking/tcp.txt b/Documentation/networking/tcp.txt new file mode 100644 index 000000000000..71749007091e --- /dev/null +++ b/Documentation/networking/tcp.txt | |||
@@ -0,0 +1,39 @@ | |||
1 | How the new TCP output machine [nyi] works. | ||
2 | |||
3 | |||
4 | Data is kept on a single queue. The skb->users flag tells us if the frame is | ||
5 | one that has been queued already. To add a frame we throw it on the end. Ack | ||
6 | walks down the list from the start. | ||
7 | |||
8 | We keep a set of control flags | ||
9 | |||
10 | |||
11 | sk->tcp_pend_event | ||
12 | |||
13 | TCP_PEND_ACK Ack needed | ||
14 | TCP_ACK_NOW Needed now | ||
15 | TCP_WINDOW Window update check | ||
16 | TCP_WINZERO Zero probing | ||
17 | |||
18 | |||
19 | sk->transmit_queue The transmission frame begin | ||
20 | sk->transmit_new First new frame pointer | ||
21 | sk->transmit_end Where to add frames | ||
22 | |||
23 | sk->tcp_last_tx_ack Last ack seen | ||
24 | sk->tcp_dup_ack Dup ack count for fast retransmit | ||
25 | |||
26 | |||
27 | Frames are queued for output by tcp_write. We do our best to send the frames | ||
28 | off immediately if possible, but otherwise queue and compute the body | ||
29 | checksum in the copy. | ||
30 | |||
31 | When a write is done we try to clear any pending events and piggy back them. | ||
32 | If the window is full we queue full sized frames. On the first timeout in | ||
33 | zero window we split this. | ||
34 | |||
35 | On a timer we walk the retransmit list to send any retransmits, update the | ||
36 | backoff timers etc. A change of route table stamp causes a change of header | ||
37 | and recompute. We add any new tcp level headers and refinish the checksum | ||
38 | before sending. | ||
39 | |||
diff --git a/Documentation/networking/tlan.txt b/Documentation/networking/tlan.txt new file mode 100644 index 000000000000..7e6aa5b20c37 --- /dev/null +++ b/Documentation/networking/tlan.txt | |||
@@ -0,0 +1,117 @@ | |||
1 | (C) 1997-1998 Caldera, Inc. | ||
2 | (C) 1998 James Banks | ||
3 | (C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com> | ||
4 | |||
5 | For driver information/updates visit http://opensource.compaq.com | ||
6 | |||
7 | |||
8 | TLAN driver for Linux, version 1.14a | ||
9 | README | ||
10 | |||
11 | |||
12 | I. Supported Devices. | ||
13 | |||
14 | Only PCI devices will work with this driver. | ||
15 | |||
16 | Supported: | ||
17 | Vendor ID Device ID Name | ||
18 | 0e11 ae32 Compaq Netelligent 10/100 TX PCI UTP | ||
19 | 0e11 ae34 Compaq Netelligent 10 T PCI UTP | ||
20 | 0e11 ae35 Compaq Integrated NetFlex 3/P | ||
21 | 0e11 ae40 Compaq Netelligent Dual 10/100 TX PCI UTP | ||
22 | 0e11 ae43 Compaq Netelligent Integrated 10/100 TX UTP | ||
23 | 0e11 b011 Compaq Netelligent 10/100 TX Embedded UTP | ||
24 | 0e11 b012 Compaq Netelligent 10 T/2 PCI UTP/Coax | ||
25 | 0e11 b030 Compaq Netelligent 10/100 TX UTP | ||
26 | 0e11 f130 Compaq NetFlex 3/P | ||
27 | 0e11 f150 Compaq NetFlex 3/P | ||
28 | 108d 0012 Olicom OC-2325 | ||
29 | 108d 0013 Olicom OC-2183 | ||
30 | 108d 0014 Olicom OC-2326 | ||
31 | |||
32 | |||
33 | Caveats: | ||
34 | |||
35 | I am not sure if 100BaseTX daughterboards (for those cards which | ||
36 | support such things) will work. I haven't had any solid evidence | ||
37 | either way. | ||
38 | |||
39 | However, if a card supports 100BaseTx without requiring an add | ||
40 | on daughterboard, it should work with 100BaseTx. | ||
41 | |||
42 | The "Netelligent 10 T/2 PCI UTP/Coax" (b012) device is untested, | ||
43 | but I do not expect any problems. | ||
44 | |||
45 | |||
46 | II. Driver Options | ||
47 | 1. You can append debug=x to the end of the insmod line to get | ||
48 | debug messages, where x is a bit field where the bits mean | ||
49 | the following: | ||
50 | |||
51 | 0x01 Turn on general debugging messages. | ||
52 | 0x02 Turn on receive debugging messages. | ||
53 | 0x04 Turn on transmit debugging messages. | ||
54 | 0x08 Turn on list debugging messages. | ||
55 | |||
56 | 2. You can append aui=1 to the end of the insmod line to cause | ||
57 | the adapter to use the AUI interface instead of the 10 Base T | ||
58 | interface. This is also what to do if you want to use the BNC | ||
59 | connector on a TLAN based device. (Setting this option on a | ||
60 | device that does not have an AUI/BNC connector will probably | ||
61 | cause it to not function correctly.) | ||
62 | |||
63 | 3. You can set duplex=1 to force half duplex, and duplex=2 to | ||
64 | force full duplex. | ||
65 | |||
66 | 4. You can set speed=10 to force 10Mbs operation, and speed=100 | ||
67 | to force 100Mbs operation. (I'm not sure what will happen | ||
68 | if a card which only supports 10Mbs is forced into 100Mbs | ||
69 | mode.) | ||
70 | |||
71 | 5. You have to use speed=X duplex=Y together now. If you just | ||
72 | do "insmod tlan.o speed=100" the driver will do Auto-Neg. | ||
73 | To force a 10Mbps Half-Duplex link do "insmod tlan.o speed=10 | ||
74 | duplex=1". | ||
75 | |||
76 | 6. If the driver is built into the kernel, you can use the 3rd | ||
77 | and 4th parameters to set aui and debug respectively. For | ||
78 | example: | ||
79 | |||
80 | ether=0,0,0x1,0x7,eth0 | ||
81 | |||
82 | This sets aui to 0x1 and debug to 0x7, assuming eth0 is a | ||
83 | supported TLAN device. | ||
84 | |||
85 | The bits in the third byte are assigned as follows: | ||
86 | |||
87 | 0x01 = aui | ||
88 | 0x02 = use half duplex | ||
89 | 0x04 = use full duplex | ||
90 | 0x08 = use 10BaseT | ||
91 | 0x10 = use 100BaseTx | ||
92 | |||
93 | You also need to set both speed and duplex settings when forcing | ||
94 | speeds with kernel-parameters. | ||
95 | ether=0,0,0x12,0,eth0 will force link to 100Mbps Half-Duplex. | ||
96 | |||
97 | 7. If you have more than one tlan adapter in your system, you can | ||
98 | use the above options on a per adapter basis. To force a 100Mbit/HD | ||
99 | link with your eth1 adapter use: | ||
100 | |||
101 | insmod tlan speed=0,100 duplex=0,1 | ||
102 | |||
103 | Now eth0 will use auto-neg and eth1 will be forced to 100Mbit/HD. | ||
104 | Note that the tlan driver supports a maximum of 8 adapters. | ||
105 | |||
106 | |||
107 | III. Things to try if you have problems. | ||
108 | 1. Make sure your card's PCI id is among those listed in | ||
109 | section I, above. | ||
110 | 2. Make sure routing is correct. | ||
111 | 3. Try forcing different speed/duplex settings | ||
112 | |||
113 | |||
114 | There is also a tlan mailing list which you can join by sending "subscribe tlan" | ||
115 | in the body of an email to majordomo@vuser.vu.union.edu. | ||
116 | There is also a tlan website at http://opensource.compaq.com | ||
117 | |||
diff --git a/Documentation/networking/tms380tr.txt b/Documentation/networking/tms380tr.txt new file mode 100644 index 000000000000..179e527b9da1 --- /dev/null +++ b/Documentation/networking/tms380tr.txt | |||
@@ -0,0 +1,147 @@ | |||
1 | Text file for the Linux SysKonnect Token Ring ISA/PCI Adapter Driver. | ||
2 | Text file by: Jay Schulist <jschlst@samba.org> | ||
3 | |||
4 | The Linux SysKonnect Token Ring driver works with the SysKonnect TR4/16(+) ISA, | ||
5 | SysKonnect TR4/16(+) PCI, SysKonnect TR4/16 PCI, and older revisions of the | ||
6 | SK NET TR4/16 ISA card. | ||
7 | |||
8 | Latest information on this driver can be obtained on the Linux-SNA WWW site. | ||
9 | Please point your browser to: | ||
10 | http://www.linux-sna.org | ||
11 | |||
12 | Many thanks to Christoph Goos for his excellent work on this driver and | ||
13 | SysKonnect for donating the adapters to Linux-SNA for the testing and | ||
14 | maintenance of this device driver. | ||
15 | |||
16 | Important information to be noted: | ||
17 | 1. Adapters can be slow to open (~20 secs) and close (~5 secs), please be | ||
18 | patient. | ||
19 | 2. This driver works very well when autoprobing for adapters. Why even | ||
20 | think about those nasty io/int/dma settings of modprobe when the driver | ||
21 | will do it all for you! | ||
22 | |||
23 | This driver is rather simple to use. Select Y to Token Ring adapter support | ||
24 | in the kernel configuration. A choice for SysKonnect Token Ring adapters will | ||
25 | appear. This drives supports all SysKonnect ISA and PCI adapters. Choose this | ||
26 | option. I personally recommend compiling the driver as a module (M), but if you | ||
27 | you would like to compile it staticly answer Y instead. | ||
28 | |||
29 | This driver supports multiple adapters without the need to load multiple copies | ||
30 | of the driver. You should be able to load up to 7 adapters without any kernel | ||
31 | modifications, if you are in need of more please contact the maintainer of this | ||
32 | driver. | ||
33 | |||
34 | Load the driver either by lilo/loadlin or as a module. When a module using the | ||
35 | following command will suffice for most: | ||
36 | |||
37 | # modprobe sktr | ||
38 | |||
39 | This will produce output similar to the following: (Output is user specific) | ||
40 | |||
41 | sktr.c: v1.01 08/29/97 by Christoph Goos | ||
42 | tr0: SK NET TR 4/16 PCI found at 0x6100, using IRQ 17. | ||
43 | tr1: SK NET TR 4/16 PCI found at 0x6200, using IRQ 16. | ||
44 | tr2: SK NET TR 4/16 ISA found at 0xa20, using IRQ 10 and DMA 5. | ||
45 | |||
46 | Now just setup the device via ifconfig and set and routes you may have. After | ||
47 | this you are ready to start sending some tokens. | ||
48 | |||
49 | Errata: | ||
50 | For anyone wondering where to pick up the SysKonnect adapters please browse | ||
51 | to http://www.syskonnect.com | ||
52 | |||
53 | This driver is under the GNU General Public License. Its Firmware image is | ||
54 | included as an initialized C-array and is licensed by SysKonnect to the Linux | ||
55 | users of this driver. However no warranty about its fitness is expressed or | ||
56 | implied by SysKonnect. | ||
57 | |||
58 | Below find attached the setting for the SK NET TR 4/16 ISA adapters | ||
59 | ------------------------------------------------------------------- | ||
60 | |||
61 | *************************** | ||
62 | *** C O N T E N T S *** | ||
63 | *************************** | ||
64 | |||
65 | 1) Location of DIP-Switch W1 | ||
66 | 2) Default settings | ||
67 | 3) DIP-Switch W1 description | ||
68 | |||
69 | |||
70 | ============================================================== | ||
71 | CHAPTER 1 LOCATION OF DIP-SWITCH | ||
72 | ============================================================== | ||
73 | |||
74 | UÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | ||
75 | þUÄÄÄÄÄÄ¿ UÄÄÄÄÄ¿ UÄÄÄ¿ þ | ||
76 | þAÄÄÄÄÄÄU W1 AÄÄÄÄÄU UÄÄÄÄ¿ þ þ þ | ||
77 | þUÄÄÄÄÄÄ¿ þ þ þ þ UÄÄÅ¿ | ||
78 | þAÄÄÄÄÄÄU UÄÄÄÄÄÄÄÄÄÄÄ¿ AÄÄÄÄU þ þ þ þþ | ||
79 | þUÄÄÄÄÄÄ¿ þ þ UÄÄÄ¿ AÄÄÄU AÄÄÅU | ||
80 | þAÄÄÄÄÄÄU þ TMS380C26 þ þ þ þ | ||
81 | þUÄÄÄÄÄÄ¿ þ þ AÄÄÄU AÄ¿ | ||
82 | þAÄÄÄÄÄÄU þ þ þ þ | ||
83 | þ AÄÄÄÄÄÄÄÄÄÄÄU þ þ | ||
84 | þ þ þ | ||
85 | þ AÄU | ||
86 | þ þ | ||
87 | þ þ | ||
88 | þ þ | ||
89 | þ þ | ||
90 | AÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄAÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAÄÄÄÄÄÄÄÄÄU | ||
91 | AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄU | ||
92 | |||
93 | ============================================================== | ||
94 | CHAPTER 2 DEFAULT SETTINGS | ||
95 | ============================================================== | ||
96 | |||
97 | W1 1 2 3 4 5 6 7 8 | ||
98 | +------------------------------+ | ||
99 | | ON X | | ||
100 | | OFF X X X X X X X | | ||
101 | +------------------------------+ | ||
102 | |||
103 | W1.1 = ON Adapter drives address lines SA17..19 | ||
104 | W1.2 - 1.5 = OFF BootROM disabled | ||
105 | W1.6 - 1.8 = OFF I/O address 0A20h | ||
106 | |||
107 | ============================================================== | ||
108 | CHAPTER 3 DIP SWITCH W1 DESCRIPTION | ||
109 | ============================================================== | ||
110 | |||
111 | UÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄ¿ ON | ||
112 | þ 1 þ 2 þ 3 þ 4 þ 5 þ 6 þ 7 þ 8 þ | ||
113 | AÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄAÄÄÄU OFF | ||
114 | |AD | BootROM Addr. | I/O | | ||
115 | +-+-+-------+-------+-----+-----+ | ||
116 | | | | | ||
117 | | | +------ 6 7 8 | ||
118 | | | ON ON ON 1900h | ||
119 | | | ON ON OFF 0900h | ||
120 | | | ON OFF ON 1980h | ||
121 | | | ON OFF OFF 0980h | ||
122 | | | OFF ON ON 1b20h | ||
123 | | | OFF ON OFF 0b20h | ||
124 | | | OFF OFF ON 1a20h | ||
125 | | | OFF OFF OFF 0a20h (+) | ||
126 | | | | ||
127 | | | | ||
128 | | +-------- 2 3 4 5 | ||
129 | | OFF x x x disabled (+) | ||
130 | | ON ON ON ON C0000 | ||
131 | | ON ON ON OFF C4000 | ||
132 | | ON ON OFF ON C8000 | ||
133 | | ON ON OFF OFF CC000 | ||
134 | | ON OFF ON ON D0000 | ||
135 | | ON OFF ON OFF D4000 | ||
136 | | ON OFF OFF ON D8000 | ||
137 | | ON OFF OFF OFF DC000 | ||
138 | | | ||
139 | | | ||
140 | +----- 1 | ||
141 | OFF adapter does NOT drive SA<17..19> | ||
142 | ON adapter drives SA<17..19> (+) | ||
143 | |||
144 | |||
145 | (+) means default setting | ||
146 | |||
147 | ******************************** | ||
diff --git a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt new file mode 100644 index 000000000000..ec3d109d787a --- /dev/null +++ b/Documentation/networking/tuntap.txt | |||
@@ -0,0 +1,147 @@ | |||
1 | Universal TUN/TAP device driver. | ||
2 | Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com> | ||
3 | |||
4 | Linux, Solaris drivers | ||
5 | Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com> | ||
6 | |||
7 | FreeBSD TAP driver | ||
8 | Copyright (c) 1999-2000 Maksim Yevmenkin <m_evmenkin@yahoo.com> | ||
9 | |||
10 | Revision of this document 2002 by Florian Thiel <florian.thiel@gmx.net> | ||
11 | |||
12 | 1. Description | ||
13 | TUN/TAP provides packet reception and transmission for user space programs. | ||
14 | It can be seen as a simple Point-to-Point or Ethernet device, which, | ||
15 | instead of receiving packets from physical media, receives them from | ||
16 | user space program and instead of sending packets via physical media | ||
17 | writes them to the user space program. | ||
18 | |||
19 | In order to use the driver a program has to open /dev/net/tun and issue a | ||
20 | corresponding ioctl() to register a network device with the kernel. A network | ||
21 | device will appear as tunXX or tapXX, depending on the options chosen. When | ||
22 | the program closes the file descriptor, the network device and all | ||
23 | corresponding routes will disappear. | ||
24 | |||
25 | Depending on the type of device chosen the userspace program has to read/write | ||
26 | IP packets (with tun) or ethernet frames (with tap). Which one is being used | ||
27 | depends on the flags given with the ioctl(). | ||
28 | |||
29 | The package from http://vtun.sourceforge.net/tun contains two simple examples | ||
30 | for how to use tun and tap devices. Both programs work like a bridge between | ||
31 | two network interfaces. | ||
32 | br_select.c - bridge based on select system call. | ||
33 | br_sigio.c - bridge based on async io and SIGIO signal. | ||
34 | However, the best example is VTun http://vtun.sourceforge.net :)) | ||
35 | |||
36 | 2. Configuration | ||
37 | Create device node: | ||
38 | mkdir /dev/net (if it doesn't exist already) | ||
39 | mknod /dev/net/tun c 10 200 | ||
40 | |||
41 | Set permissions: | ||
42 | e.g. chmod 0700 /dev/net/tun | ||
43 | if you want the device only accessible by root. Giving regular users the | ||
44 | right to assign network devices is NOT a good idea. Users could assign | ||
45 | bogus network interfaces to trick firewalls or administrators. | ||
46 | |||
47 | Driver module autoloading | ||
48 | |||
49 | Make sure that "Kernel module loader" - module auto-loading | ||
50 | support is enabled in your kernel. The kernel should load it on | ||
51 | first access. | ||
52 | |||
53 | Manual loading | ||
54 | insert the module by hand: | ||
55 | modprobe tun | ||
56 | |||
57 | If you do it the latter way, you have to load the module every time you | ||
58 | need it, if you do it the other way it will be automatically loaded when | ||
59 | /dev/net/tun is being opened. | ||
60 | |||
61 | 3. Program interface | ||
62 | 3.1 Network device allocation: | ||
63 | |||
64 | char *dev should be the name of the device with a format string (e.g. | ||
65 | "tun%d"), but (as far as I can see) this can be any valid network device name. | ||
66 | Note that the character pointer becomes overwritten with the real device name | ||
67 | (e.g. "tun0") | ||
68 | |||
69 | #include <linux/if.h> | ||
70 | #include <linux/if_tun.h> | ||
71 | |||
72 | int tun_alloc(char *dev) | ||
73 | { | ||
74 | struct ifreq ifr; | ||
75 | int fd, err; | ||
76 | |||
77 | if( (fd = open("/dev/net/tun", O_RDWR)) < 0 ) | ||
78 | return tun_alloc_old(dev); | ||
79 | |||
80 | memset(&ifr, 0, sizeof(ifr)); | ||
81 | |||
82 | /* Flags: IFF_TUN - TUN device (no Ethernet headers) | ||
83 | * IFF_TAP - TAP device | ||
84 | * | ||
85 | * IFF_NO_PI - Do not provide packet information | ||
86 | */ | ||
87 | ifr.ifr_flags = IFF_TUN; | ||
88 | if( *dev ) | ||
89 | strncpy(ifr.ifr_name, dev, IFNAMSIZ); | ||
90 | |||
91 | if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 ){ | ||
92 | close(fd); | ||
93 | return err; | ||
94 | } | ||
95 | strcpy(dev, ifr.ifr_name); | ||
96 | return fd; | ||
97 | } | ||
98 | |||
99 | 3.2 Frame format: | ||
100 | If flag IFF_NO_PI is not set each frame format is: | ||
101 | Flags [2 bytes] | ||
102 | Proto [2 bytes] | ||
103 | Raw protocol(IP, IPv6, etc) frame. | ||
104 | |||
105 | Universal TUN/TAP device driver Frequently Asked Question. | ||
106 | |||
107 | 1. What platforms are supported by TUN/TAP driver ? | ||
108 | Currently driver has been written for 3 Unices: | ||
109 | Linux kernels 2.2.x, 2.4.x | ||
110 | FreeBSD 3.x, 4.x, 5.x | ||
111 | Solaris 2.6, 7.0, 8.0 | ||
112 | |||
113 | 2. What is TUN/TAP driver used for? | ||
114 | As mentioned above, main purpose of TUN/TAP driver is tunneling. | ||
115 | It is used by VTun (http://vtun.sourceforge.net). | ||
116 | |||
117 | Another interesting application using TUN/TAP is pipsecd | ||
118 | (http://perso.enst.fr/~beyssac/pipsec/), an userspace IPSec | ||
119 | implementation that can use complete kernel routing (unlike FreeS/WAN). | ||
120 | |||
121 | 3. How does Virtual network device actually work ? | ||
122 | Virtual network device can be viewed as a simple Point-to-Point or | ||
123 | Ethernet device, which instead of receiving packets from a physical | ||
124 | media, receives them from user space program and instead of sending | ||
125 | packets via physical media sends them to the user space program. | ||
126 | |||
127 | Let's say that you configured IPX on the tap0, then whenever | ||
128 | the kernel sends an IPX packet to tap0, it is passed to the application | ||
129 | (VTun for example). The application encrypts, compresses and sends it to | ||
130 | the other side over TCP or UDP. The application on the other side decompresses | ||
131 | and decrypts the data received and writes the packet to the TAP device, | ||
132 | the kernel handles the packet like it came from real physical device. | ||
133 | |||
134 | 4. What is the difference between TUN driver and TAP driver? | ||
135 | TUN works with IP frames. TAP works with Ethernet frames. | ||
136 | |||
137 | This means that you have to read/write IP packets when you are using tun and | ||
138 | ethernet frames when using tap. | ||
139 | |||
140 | 5. What is the difference between BPF and TUN/TAP driver? | ||
141 | BFP is an advanced packet filter. It can be attached to existing | ||
142 | network interface. It does not provide a virtual network interface. | ||
143 | A TUN/TAP driver does provide a virtual network interface and it is possible | ||
144 | to attach BPF to this interface. | ||
145 | |||
146 | 6. Does TAP driver support kernel Ethernet bridging? | ||
147 | Yes. Linux and FreeBSD drivers support Ethernet bridging. | ||
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt new file mode 100644 index 000000000000..fa12a9e4abdd --- /dev/null +++ b/Documentation/networking/vortex.txt | |||
@@ -0,0 +1,450 @@ | |||
1 | Documentation/networking/vortex.txt | ||
2 | Andrew Morton <andrewm@uow.edu.au> | ||
3 | 30 April 2000 | ||
4 | |||
5 | |||
6 | This document describes the usage and errata of the 3Com "Vortex" device | ||
7 | driver for Linux, 3c59x.c. | ||
8 | |||
9 | The driver was written by Donald Becker <becker@scyld.com> | ||
10 | |||
11 | Don is no longer the prime maintainer of this version of the driver. | ||
12 | Please report problems to one or more of: | ||
13 | |||
14 | Andrew Morton <andrewm@uow.edu.au> | ||
15 | Netdev mailing list <netdev@oss.sgi.com> | ||
16 | Linux kernel mailing list <linux-kernel@vger.kernel.org> | ||
17 | |||
18 | Please note the 'Reporting and Diagnosing Problems' section at the end | ||
19 | of this file. | ||
20 | |||
21 | |||
22 | Since kernel 2.3.99-pre6, this driver incorporates the support for the | ||
23 | 3c575-series Cardbus cards which used to be handled by 3c575_cb.c. | ||
24 | |||
25 | This driver supports the following hardware: | ||
26 | |||
27 | 3c590 Vortex 10Mbps | ||
28 | 3c592 EISA 10mbps Demon/Vortex | ||
29 | 3c597 EISA Fast Demon/Vortex | ||
30 | 3c595 Vortex 100baseTx | ||
31 | 3c595 Vortex 100baseT4 | ||
32 | 3c595 Vortex 100base-MII | ||
33 | 3Com Vortex | ||
34 | 3c900 Boomerang 10baseT | ||
35 | 3c900 Boomerang 10Mbps Combo | ||
36 | 3c900 Cyclone 10Mbps TPO | ||
37 | 3c900B Cyclone 10Mbps T | ||
38 | 3c900 Cyclone 10Mbps Combo | ||
39 | 3c900 Cyclone 10Mbps TPC | ||
40 | 3c900B-FL Cyclone 10base-FL | ||
41 | 3c905 Boomerang 100baseTx | ||
42 | 3c905 Boomerang 100baseT4 | ||
43 | 3c905B Cyclone 100baseTx | ||
44 | 3c905B Cyclone 10/100/BNC | ||
45 | 3c905B-FX Cyclone 100baseFx | ||
46 | 3c905C Tornado | ||
47 | 3c980 Cyclone | ||
48 | 3cSOHO100-TX Hurricane | ||
49 | 3c555 Laptop Hurricane | ||
50 | 3c575 Boomerang CardBus | ||
51 | 3CCFE575 Cyclone CardBus | ||
52 | 3CCFE575CT Cyclone CardBus | ||
53 | 3CCFE656 Cyclone CardBus | ||
54 | 3CCFEM656 Cyclone CardBus | ||
55 | 3c450 Cyclone/unknown | ||
56 | |||
57 | |||
58 | Module parameters | ||
59 | ================= | ||
60 | |||
61 | There are several parameters which may be provided to the driver when | ||
62 | its module is loaded. These are usually placed in /etc/modprobe.conf | ||
63 | (/etc/modules.conf in 2.4). Example: | ||
64 | |||
65 | options 3c59x debug=3 rx_copybreak=300 | ||
66 | |||
67 | If you are using the PCMCIA tools (cardmgr) then the options may be | ||
68 | placed in /etc/pcmcia/config.opts: | ||
69 | |||
70 | module "3c59x" opts "debug=3 rx_copybreak=300" | ||
71 | |||
72 | |||
73 | The supported parameters are: | ||
74 | |||
75 | debug=N | ||
76 | |||
77 | Where N is a number from 0 to 7. Anything above 3 produces a lot | ||
78 | of output in your system logs. debug=1 is default. | ||
79 | |||
80 | options=N1,N2,N3,... | ||
81 | |||
82 | Each number in the list provides an option to the corresponding | ||
83 | network card. So if you have two 3c905's and you wish to provide | ||
84 | them with option 0x204 you would use: | ||
85 | |||
86 | options=0x204,0x204 | ||
87 | |||
88 | The individual options are composed of a number of bitfields which | ||
89 | have the following meanings: | ||
90 | |||
91 | Possible media type settings | ||
92 | 0 10baseT | ||
93 | 1 10Mbs AUI | ||
94 | 2 undefined | ||
95 | 3 10base2 (BNC) | ||
96 | 4 100base-TX | ||
97 | 5 100base-FX | ||
98 | 6 MII (Media Independent Interface) | ||
99 | 7 Use default setting from EEPROM | ||
100 | 8 Autonegotiate | ||
101 | 9 External MII | ||
102 | 10 Use default setting from EEPROM | ||
103 | |||
104 | When generating a value for the 'options' setting, the above media | ||
105 | selection values may be OR'ed (or added to) the following: | ||
106 | |||
107 | 0x8000 Set driver debugging level to 7 | ||
108 | 0x4000 Set driver debugging level to 2 | ||
109 | 0x0400 Enable Wake-on-LAN | ||
110 | 0x0200 Force full duplex mode. | ||
111 | 0x0010 Bus-master enable bit (Old Vortex cards only) | ||
112 | |||
113 | For example: | ||
114 | |||
115 | insmod 3c59x options=0x204 | ||
116 | |||
117 | will force full-duplex 100base-TX, rather than allowing the usual | ||
118 | autonegotiation. | ||
119 | |||
120 | global_options=N | ||
121 | |||
122 | Sets the `options' parameter for all 3c59x NICs in the machine. | ||
123 | Entries in the `options' array above will override any setting of | ||
124 | this. | ||
125 | |||
126 | full_duplex=N1,N2,N3... | ||
127 | |||
128 | Similar to bit 9 of 'options'. Forces the corresponding card into | ||
129 | full-duplex mode. Please use this in preference to the `options' | ||
130 | parameter. | ||
131 | |||
132 | In fact, please don't use this at all! You're better off getting | ||
133 | autonegotiation working properly. | ||
134 | |||
135 | global_full_duplex=N1 | ||
136 | |||
137 | Sets full duplex mode for all 3c59x NICs in the machine. Entries | ||
138 | in the `full_duplex' array above will override any setting of this. | ||
139 | |||
140 | flow_ctrl=N1,N2,N3... | ||
141 | |||
142 | Use 802.3x MAC-layer flow control. The 3com cards only support the | ||
143 | PAUSE command, which means that they will stop sending packets for a | ||
144 | short period if they receive a PAUSE frame from the link partner. | ||
145 | |||
146 | The driver only allows flow control on a link which is operating in | ||
147 | full duplex mode. | ||
148 | |||
149 | This feature does not appear to work on the 3c905 - only 3c905B and | ||
150 | 3c905C have been tested. | ||
151 | |||
152 | The 3com cards appear to only respond to PAUSE frames which are | ||
153 | sent to the reserved destination address of 01:80:c2:00:00:01. They | ||
154 | do not honour PAUSE frames which are sent to the station MAC address. | ||
155 | |||
156 | rx_copybreak=M | ||
157 | |||
158 | The driver preallocates 32 full-sized (1536 byte) network buffers | ||
159 | for receiving. When a packet arrives, the driver has to decide | ||
160 | whether to leave the packet in its full-sized buffer, or to allocate | ||
161 | a smaller buffer and copy the packet across into it. | ||
162 | |||
163 | This is a speed/space tradeoff. | ||
164 | |||
165 | The value of rx_copybreak is used to decide when to make the copy. | ||
166 | If the packet size is less than rx_copybreak, the packet is copied. | ||
167 | The default value for rx_copybreak is 200 bytes. | ||
168 | |||
169 | max_interrupt_work=N | ||
170 | |||
171 | The driver's interrupt service routine can handle many receive and | ||
172 | transmit packets in a single invocation. It does this in a loop. | ||
173 | The value of max_interrupt_work governs how mnay times the interrupt | ||
174 | service routine will loop. The default value is 32 loops. If this | ||
175 | is exceeded the interrupt service routine gives up and generates a | ||
176 | warning message "eth0: Too much work in interrupt". | ||
177 | |||
178 | hw_checksums=N1,N2,N3,... | ||
179 | |||
180 | Recent 3com NICs are able to generate IPv4, TCP and UDP checksums | ||
181 | in hardware. Linux has used the Rx checksumming for a long time. | ||
182 | The "zero copy" patch which is planned for the 2.4 kernel series | ||
183 | allows you to make use of the NIC's DMA scatter/gather and transmit | ||
184 | checksumming as well. | ||
185 | |||
186 | The driver is set up so that, when the zerocopy patch is applied, | ||
187 | all Tornado and Cyclone devices will use S/G and Tx checksums. | ||
188 | |||
189 | This module parameter has been provided so you can override this | ||
190 | decision. If you think that Tx checksums are causing a problem, you | ||
191 | may disable the feature with `hw_checksums=0'. | ||
192 | |||
193 | If you think your NIC should be performing Tx checksumming and the | ||
194 | driver isn't enabling it, you can force the use of hardware Tx | ||
195 | checksumming with `hw_checksums=1'. | ||
196 | |||
197 | The driver drops a message in the logfiles to indicate whether or | ||
198 | not it is using hardware scatter/gather and hardware Tx checksums. | ||
199 | |||
200 | Scatter/gather and hardware checksums provide considerable | ||
201 | performance improvement for the sendfile() system call, but a small | ||
202 | decrease in throughput for send(). There is no effect upon receive | ||
203 | efficiency. | ||
204 | |||
205 | compaq_ioaddr=N | ||
206 | compaq_irq=N | ||
207 | compaq_device_id=N | ||
208 | |||
209 | "Variables to work-around the Compaq PCI BIOS32 problem".... | ||
210 | |||
211 | watchdog=N | ||
212 | |||
213 | Sets the time duration (in milliseconds) after which the kernel | ||
214 | decides that the transmitter has become stuck and needs to be reset. | ||
215 | This is mainly for debugging purposes, although it may be advantageous | ||
216 | to increase this value on LANs which have very high collision rates. | ||
217 | The default value is 5000 (5.0 seconds). | ||
218 | |||
219 | enable_wol=N1,N2,N3,... | ||
220 | |||
221 | Enable Wake-on-LAN support for the relevant interface. Donald | ||
222 | Becker's `ether-wake' application may be used to wake suspended | ||
223 | machines. | ||
224 | |||
225 | Also enables the NIC's power management support. | ||
226 | |||
227 | global_enable_wol=N | ||
228 | |||
229 | Sets enable_wol mode for all 3c59x NICs in the machine. Entries in | ||
230 | the `enable_wol' array above will override any setting of this. | ||
231 | |||
232 | Media selection | ||
233 | --------------- | ||
234 | |||
235 | A number of the older NICs such as the 3c590 and 3c900 series have | ||
236 | 10base2 and AUI interfaces. | ||
237 | |||
238 | Prior to January, 2001 this driver would autoeselect the 10base2 or AUI | ||
239 | port if it didn't detect activity on the 10baseT port. It would then | ||
240 | get stuck on the 10base2 port and a driver reload was necessary to | ||
241 | switch back to 10baseT. This behaviour could not be prevented with a | ||
242 | module option override. | ||
243 | |||
244 | Later (current) versions of the driver _do_ support locking of the | ||
245 | media type. So if you load the driver module with | ||
246 | |||
247 | modprobe 3c59x options=0 | ||
248 | |||
249 | it will permanently select the 10baseT port. Automatic selection of | ||
250 | other media types does not occur. | ||
251 | |||
252 | |||
253 | Transmit error, Tx status register 82 | ||
254 | ------------------------------------- | ||
255 | |||
256 | This is a common error which is almost always caused by another host on | ||
257 | the same network being in full-duplex mode, while this host is in | ||
258 | half-duplex mode. You need to find that other host and make it run in | ||
259 | half-duplex mode or fix this host to run in full-duplex mode. | ||
260 | |||
261 | As a last resort, you can force the 3c59x driver into full-duplex mode | ||
262 | with | ||
263 | |||
264 | options 3c59x full_duplex=1 | ||
265 | |||
266 | but this has to be viewed as a workaround for broken network gear and | ||
267 | should only really be used for equipment which cannot autonegotiate. | ||
268 | |||
269 | |||
270 | Additional resources | ||
271 | -------------------- | ||
272 | |||
273 | Details of the device driver implementation are at the top of the source file. | ||
274 | |||
275 | Additional documentation is available at Don Becker's Linux Drivers site: | ||
276 | |||
277 | http://www.scyld.com/network/vortex.html | ||
278 | |||
279 | Donald Becker's driver development site: | ||
280 | |||
281 | http://www.scyld.com/network | ||
282 | |||
283 | Donald's vortex-diag program is useful for inspecting the NIC's state: | ||
284 | |||
285 | http://www.scyld.com/diag/#pci-diags | ||
286 | |||
287 | Donald's mii-diag program may be used for inspecting and manipulating | ||
288 | the NIC's Media Independent Interface subsystem: | ||
289 | |||
290 | http://www.scyld.com/diag/#mii-diag | ||
291 | |||
292 | Donald's wake-on-LAN page: | ||
293 | |||
294 | http://www.scyld.com/expert/wake-on-lan.html | ||
295 | |||
296 | 3Com's documentation for many NICs, including the ones supported by | ||
297 | this driver is available at | ||
298 | |||
299 | http://support.3com.com/partners/developer/developer_form.html | ||
300 | |||
301 | 3Com's DOS-based application for setting up the NICs EEPROMs: | ||
302 | |||
303 | ftp://ftp.3com.com/pub/nic/3c90x/3c90xx2.exe | ||
304 | |||
305 | Driver updates and a detailed changelog for the modifications which | ||
306 | were made for the 2.3/2,4 series kernel is available at | ||
307 | |||
308 | http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3 | ||
309 | |||
310 | |||
311 | Autonegotiation notes | ||
312 | --------------------- | ||
313 | |||
314 | The driver uses a one-minute heartbeat for adapting to changes in | ||
315 | the external LAN environment. This means that when, for example, a | ||
316 | machine is unplugged from a hubbed 10baseT LAN plugged into a | ||
317 | switched 100baseT LAN, the throughput will be quite dreadful for up | ||
318 | to sixty seconds. Be patient. | ||
319 | |||
320 | Cisco interoperability note from Walter Wong <wcw+@CMU.EDU>: | ||
321 | |||
322 | On a side note, adding HAS_NWAY seems to share a problem with the | ||
323 | Cisco 6509 switch. Specifically, you need to change the spanning | ||
324 | tree parameter for the port the machine is plugged into to 'portfast' | ||
325 | mode. Otherwise, the negotiation fails. This has been an issue | ||
326 | we've noticed for a while but haven't had the time to track down. | ||
327 | |||
328 | Cisco switches (Jeff Busch <jbusch@deja.com>) | ||
329 | |||
330 | My "standard config" for ports to which PC's/servers connect directly: | ||
331 | |||
332 | interface FastEthernet0/N | ||
333 | description machinename | ||
334 | load-interval 30 | ||
335 | spanning-tree portfast | ||
336 | |||
337 | If autonegotiation is a problem, you may need to specify "speed | ||
338 | 100" and "duplex full" as well (or "speed 10" and "duplex half"). | ||
339 | |||
340 | WARNING: DO NOT hook up hubs/switches/bridges to these | ||
341 | specially-configured ports! The switch will become very confused. | ||
342 | |||
343 | |||
344 | Reporting and diagnosing problems | ||
345 | --------------------------------- | ||
346 | |||
347 | Maintainers find that accurate and complete problem reports are | ||
348 | invaluable in resolving driver problems. We are frequently not able to | ||
349 | reproduce problems and must rely on your patience and efforts to get to | ||
350 | the bottom of the problem. | ||
351 | |||
352 | If you believe you have a driver problem here are some of the | ||
353 | steps you should take: | ||
354 | |||
355 | - Is it really a driver problem? | ||
356 | |||
357 | Eliminate some variables: try different cards, different | ||
358 | computers, different cables, different ports on the switch/hub, | ||
359 | different versions of the kernel or ofthe driver, etc. | ||
360 | |||
361 | - OK, it's a driver problem. | ||
362 | |||
363 | You need to generate a report. Typically this is an email to the | ||
364 | maintainer and/or linux-net@vger.kernel.org. The maintainer's | ||
365 | email address will be inthe driver source or in the MAINTAINERS file. | ||
366 | |||
367 | - The contents of your report will vary a lot depending upon the | ||
368 | problem. If it's a kernel crash then you should refer to the | ||
369 | REPORTING-BUGS file. | ||
370 | |||
371 | But for most problems it is useful to provide the following: | ||
372 | |||
373 | o Kernel version, driver version | ||
374 | |||
375 | o A copy of the banner message which the driver generates when | ||
376 | it is initialised. For example: | ||
377 | |||
378 | eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19 | ||
379 | 8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface. | ||
380 | MII transceiver found at address 24, status 782d. | ||
381 | Enabling bus-master transmits and whole-frame receives. | ||
382 | |||
383 | NOTE: You must provide the `debug=2' modprobe option to generate | ||
384 | a full detection message. Please do this: | ||
385 | |||
386 | modprobe 3c59x debug=2 | ||
387 | |||
388 | o If it is a PCI device, the relevant output from 'lspci -vx', eg: | ||
389 | |||
390 | 00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74) | ||
391 | Subsystem: 3Com Corporation: Unknown device 9200 | ||
392 | Flags: bus master, medium devsel, latency 32, IRQ 19 | ||
393 | I/O ports at a400 [size=128] | ||
394 | Memory at db000000 (32-bit, non-prefetchable) [size=128] | ||
395 | Expansion ROM at <unassigned> [disabled] [size=128K] | ||
396 | Capabilities: [dc] Power Management version 2 | ||
397 | 00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00 | ||
398 | 10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00 | ||
399 | 20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10 | ||
400 | 30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a | ||
401 | |||
402 | o A description of the environment: 10baseT? 100baseT? | ||
403 | full/half duplex? switched or hubbed? | ||
404 | |||
405 | o Any additional module parameters which you may be providing to the driver. | ||
406 | |||
407 | o Any kernel logs which are produced. The more the merrier. | ||
408 | If this is a large file and you are sending your report to a | ||
409 | mailing list, mention that you have the logfile, but don't send | ||
410 | it. If you're reporting direct to the maintainer then just send | ||
411 | it. | ||
412 | |||
413 | To ensure that all kernel logs are available, add the | ||
414 | following line to /etc/syslog.conf: | ||
415 | |||
416 | kern.* /var/log/messages | ||
417 | |||
418 | Then restart syslogd with: | ||
419 | |||
420 | /etc/rc.d/init.d/syslog restart | ||
421 | |||
422 | (The above may vary, depending upon which Linux distribution you use). | ||
423 | |||
424 | o If your problem is reproducible then that's great. Try the | ||
425 | following: | ||
426 | |||
427 | 1) Increase the debug level. Usually this is done via: | ||
428 | |||
429 | a) modprobe driver debug=7 | ||
430 | b) In /etc/modprobe.conf (or /etc/modules.conf for 2.4): | ||
431 | options driver debug=7 | ||
432 | |||
433 | 2) Recreate the problem with the higher debug level, | ||
434 | send all logs to the maintainer. | ||
435 | |||
436 | 3) Download you card's diagnostic tool from Donald | ||
437 | Backer's website http://www.scyld.com/diag. Download | ||
438 | mii-diag.c as well. Build these. | ||
439 | |||
440 | a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is | ||
441 | working correctly. Save the output. | ||
442 | |||
443 | b) Run the above commands when the card is malfunctioning. Send | ||
444 | both sets of output. | ||
445 | |||
446 | Finally, please be patient and be prepared to do some work. You may end up working on | ||
447 | this problem for a week or more as the maintainer asks more questions, asks for more | ||
448 | tests, asks for patches to be applied, etc. At the end of it all, the problem may even | ||
449 | remain unresolved. | ||
450 | |||
diff --git a/Documentation/networking/wan-router.txt b/Documentation/networking/wan-router.txt new file mode 100644 index 000000000000..aea20cd2a56e --- /dev/null +++ b/Documentation/networking/wan-router.txt | |||
@@ -0,0 +1,622 @@ | |||
1 | ------------------------------------------------------------------------------ | ||
2 | Linux WAN Router Utilities Package | ||
3 | ------------------------------------------------------------------------------ | ||
4 | Version 2.2.1 | ||
5 | Mar 28, 2001 | ||
6 | Author: Nenad Corbic <ncorbic@sangoma.com> | ||
7 | Copyright (c) 1995-2001 Sangoma Technologies Inc. | ||
8 | ------------------------------------------------------------------------------ | ||
9 | |||
10 | INTRODUCTION | ||
11 | |||
12 | Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs) | ||
13 | and/or stand-alone hosts over vast distances with data transfer rates | ||
14 | significantly higher than those achievable with commonly used dial-up | ||
15 | connections. | ||
16 | |||
17 | Usually an external device called `WAN router' sitting on your local network | ||
18 | or connected to your machine's serial port provides physical connection to | ||
19 | WAN. Although router's job may be as simple as taking your local network | ||
20 | traffic, converting it to WAN format and piping it through the WAN link, these | ||
21 | devices are notoriously expensive, with prices as much as 2 - 5 times higher | ||
22 | then the price of a typical PC box. | ||
23 | |||
24 | Alternatively, considering robustness and multitasking capabilities of Linux, | ||
25 | an internal router can be built (most routers use some sort of stripped down | ||
26 | Unix-like operating system anyway). With a number of relatively inexpensive WAN | ||
27 | interface cards available on the market, a perfectly usable router can be | ||
28 | built for less than half a price of an external router. Yet a Linux box | ||
29 | acting as a router can still be used for other purposes, such as fire-walling, | ||
30 | running FTP, WWW or DNS server, etc. | ||
31 | |||
32 | This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux | ||
33 | operating system and provides generic hardware-independent services for such | ||
34 | drivers. Why can existing Linux network device interface not be used for | ||
35 | this purpose? Well, it can. However, there are a few key differences between | ||
36 | a typical network interface (e.g. Ethernet) and a WAN link. | ||
37 | |||
38 | Many WAN protocols, such as X.25 and frame relay, allow for multiple logical | ||
39 | connections (known as `virtual circuits' in X.25 terminology) over a single | ||
40 | physical link. Each such virtual circuit may (and almost always does) lead | ||
41 | to a different geographical location and, therefore, different network. As a | ||
42 | result, it is the virtual circuit, not the physical link, that represents a | ||
43 | route and, therefore, a network interface in Linux terms. | ||
44 | |||
45 | To further complicate things, virtual circuits are usually volatile in nature | ||
46 | (excluding so called `permanent' virtual circuits or PVCs). With almost no | ||
47 | time required to set up and tear down a virtual circuit, it is highly desirable | ||
48 | to implement on-demand connections in order to minimize network charges. So | ||
49 | unlike a typical network driver, the WAN driver must be able to handle multiple | ||
50 | network interfaces and cope as multiple virtual circuits come into existence | ||
51 | and go away dynamically. | ||
52 | |||
53 | Last, but not least, WAN configuration is much more complex than that of say | ||
54 | Ethernet and may well amount to several dozens of parameters. Some of them | ||
55 | are "link-wide" while others are virtual circuit-specific. The same holds | ||
56 | true for WAN statistics which is by far more extensive and extremely useful | ||
57 | when troubleshooting WAN connections. Extending the ifconfig utility to suit | ||
58 | these needs may be possible, but does not seem quite reasonable. Therefore, a | ||
59 | WAN configuration utility and corresponding application programmer's interface | ||
60 | is needed for this purpose. | ||
61 | |||
62 | Most of these problems are taken care of by this module. Its goal is to | ||
63 | provide a user with more-or-less standard look and feel for all WAN devices and | ||
64 | assist a WAN device driver writer by providing common services, such as: | ||
65 | |||
66 | o User-level interface via /proc file system | ||
67 | o Centralized configuration | ||
68 | o Device management (setup, shutdown, etc.) | ||
69 | o Network interface management (dynamic creation/destruction) | ||
70 | o Protocol encapsulation/decapsulation | ||
71 | |||
72 | To ba able to use the Linux WAN Router you will also need a WAN Tools package | ||
73 | available from | ||
74 | |||
75 | ftp.sangoma.com/pub/linux/current_wanpipe/wanpipe-X.Y.Z.tgz | ||
76 | |||
77 | where vX.Y.Z represent the wanpipe version number. | ||
78 | |||
79 | For technical questions and/or comments please e-mail to ncorbic@sangoma.com. | ||
80 | For general inquiries please contact Sangoma Technologies Inc. by | ||
81 | |||
82 | Hotline: 1-800-388-2475 (USA and Canada, toll free) | ||
83 | Phone: (905) 474-1990 ext: 106 | ||
84 | Fax: (905) 474-9223 | ||
85 | E-mail: dm@sangoma.com (David Mandelstam) | ||
86 | WWW: http://www.sangoma.com | ||
87 | |||
88 | |||
89 | INSTALLATION | ||
90 | |||
91 | Please read the WanpipeForLinux.pdf manual on how to | ||
92 | install the WANPIPE tools and drivers properly. | ||
93 | |||
94 | |||
95 | After installing wanpipe package: /usr/local/wanrouter/doc. | ||
96 | On the ftp.sangoma.com : /linux/current_wanpipe/doc | ||
97 | |||
98 | |||
99 | COPYRIGHT AND LICENSING INFORMATION | ||
100 | |||
101 | This program is free software; you can redistribute it and/or modify it under | ||
102 | the terms of the GNU General Public License as published by the Free Software | ||
103 | Foundation; either version 2, or (at your option) any later version. | ||
104 | |||
105 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
106 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
107 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
108 | |||
109 | You should have received a copy of the GNU General Public License along with | ||
110 | this program; if not, write to the Free Software Foundation, Inc., 675 Mass | ||
111 | Ave, Cambridge, MA 02139, USA. | ||
112 | |||
113 | |||
114 | |||
115 | ACKNOWLEDGEMENTS | ||
116 | |||
117 | This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed | ||
118 | by Sangoma Technologies Inc. for Linux 2.0.x and 2.2.x. Success of the WANPIPE | ||
119 | together with the next major release of Linux kernel in summer 1996 commanded | ||
120 | adequate changes to the WANPIPE code to take full advantage of new Linux | ||
121 | features. | ||
122 | |||
123 | Instead of continuing developing proprietary interface tied to Sangoma WAN | ||
124 | cards, we decided to separate all hardware-independent code into a separate | ||
125 | module and defined two levels of interfaces - one for user-level applications | ||
126 | and another for kernel-level WAN drivers. WANPIPE is now implemented as a | ||
127 | WAN driver compliant with the WAN Link Driver interface. Also a general | ||
128 | purpose WAN configuration utility and a set of shell scripts was developed to | ||
129 | support WAN router at the user level. | ||
130 | |||
131 | Many useful ideas concerning hardware-independent interface implementation | ||
132 | were given by Mike McLagan <mike.mclagan@linux.org> and his implementation | ||
133 | of the Frame Relay router and drivers for Sangoma cards (dlci/sdla). | ||
134 | |||
135 | With the new implementation of the APIs being incorporated into the WANPIPE, | ||
136 | a special thank goes to Alan Cox in providing insight into BSD sockets. | ||
137 | |||
138 | Special thanks to all the WANPIPE users who performed field-testing, reported | ||
139 | bugs and made valuable comments and suggestions that help us to improve this | ||
140 | product. | ||
141 | |||
142 | |||
143 | |||
144 | NEW IN THIS RELEASE | ||
145 | |||
146 | o Updated the WANCFG utility | ||
147 | Calls the pppconfig to configure the PPPD | ||
148 | for async connections. | ||
149 | |||
150 | o Added the PPPCONFIG utility | ||
151 | Used to configure the PPPD dameon for the | ||
152 | WANPIPE Async PPP and standard serial port. | ||
153 | The wancfg calls the pppconfig to configure | ||
154 | the pppd. | ||
155 | |||
156 | o Fixed the PCI autodetect feature. | ||
157 | The SLOT 0 was used as an autodetect option | ||
158 | however, some high end PC's slot numbers start | ||
159 | from 0. | ||
160 | |||
161 | o This release has been tested with the new backupd | ||
162 | daemon release. | ||
163 | |||
164 | |||
165 | PRODUCT COMPONENTS AND RELATED FILES | ||
166 | |||
167 | /etc: (or user defined) | ||
168 | wanpipe1.conf default router configuration file | ||
169 | |||
170 | /lib/modules/X.Y.Z/misc: | ||
171 | wanrouter.o router kernel loadable module | ||
172 | af_wanpipe.o wanpipe api socket module | ||
173 | |||
174 | /lib/modules/X.Y.Z/net: | ||
175 | sdladrv.o Sangoma SDLA support module | ||
176 | wanpipe.o Sangoma WANPIPE(tm) driver module | ||
177 | |||
178 | /proc/net/wanrouter | ||
179 | Config reads current router configuration | ||
180 | Status reads current router status | ||
181 | {name} reads WAN driver statistics | ||
182 | |||
183 | /usr/sbin: | ||
184 | wanrouter wanrouter start-up script | ||
185 | wanconfig wanrouter configuration utility | ||
186 | sdladump WANPIPE adapter memory dump utility | ||
187 | fpipemon Monitor for Frame Relay | ||
188 | cpipemon Monitor for Cisco HDLC | ||
189 | ppipemon Monitor for PPP | ||
190 | xpipemon Monitor for X25 | ||
191 | wpkbdmon WANPIPE keyboard led monitor/debugger | ||
192 | |||
193 | /usr/local/wanrouter: | ||
194 | README this file | ||
195 | COPYING GNU General Public License | ||
196 | Setup installation script | ||
197 | Filelist distribution definition file | ||
198 | wanrouter.rc meta-configuration file | ||
199 | (used by the Setup and wanrouter script) | ||
200 | |||
201 | /usr/local/wanrouter/doc: | ||
202 | wanpipeForLinux.pdf WAN Router User's Manual | ||
203 | |||
204 | /usr/local/wanrouter/patches: | ||
205 | wanrouter-v2213.gz patch for Linux kernels 2.2.11 up to 2.2.13. | ||
206 | wanrouter-v2214.gz patch for Linux kernel 2.2.14. | ||
207 | wanrouter-v2215.gz patch for Linux kernels 2.2.15 to 2.2.17. | ||
208 | wanrouter-v2218.gz patch for Linux kernels 2.2.18 and up. | ||
209 | wanrouter-v240.gz patch for Linux kernel 2.4.0. | ||
210 | wanrouter-v242.gz patch for Linux kernel 2.4.2 and up. | ||
211 | wanrouter-v2034.gz patch for Linux kernel 2.0.34 | ||
212 | wanrouter-v2036.gz patch for Linux kernel 2.0.36 and up. | ||
213 | |||
214 | /usr/local/wanrouter/patches/kdrivers: | ||
215 | Sources of the latest WANPIPE device drivers. | ||
216 | These are used to UPGRADE the linux kernel to the newest | ||
217 | version if the kernel source has already been pathced with | ||
218 | WANPIPE drivers. | ||
219 | |||
220 | /usr/local/wanrouter/samples: | ||
221 | interface sample interface configuration file | ||
222 | wanpipe1.cpri CHDLC primary port | ||
223 | wanpipe2.csec CHDLC secondary port | ||
224 | wanpipe1.fr Frame Relay protocol | ||
225 | wanpipe1.ppp PPP protocol ) | ||
226 | wanpipe1.asy CHDLC ASYNC protocol | ||
227 | wanpipe1.x25 X25 protocol | ||
228 | wanpipe1.stty Sync TTY driver (Used by Kernel PPPD daemon) | ||
229 | wanpipe1.atty Async TTY driver (Used by Kernel PPPD daemon) | ||
230 | wanrouter.rc sample meta-configuration file | ||
231 | |||
232 | /usr/local/wanrouter/util: | ||
233 | * wan-tools utilities source code | ||
234 | |||
235 | /usr/local/wanrouter/api/x25: | ||
236 | * x25 api sample programs. | ||
237 | /usr/local/wanrouter/api/chdlc: | ||
238 | * chdlc api sample programs. | ||
239 | /usr/local/wanrouter/api/fr: | ||
240 | * fr api sample programs. | ||
241 | /usr/local/wanrouter/config/wancfg: | ||
242 | wancfg WANPIPE GUI configuration program. | ||
243 | Creates wanpipe#.conf files. | ||
244 | /usr/local/wanrouter/config/cfgft1: | ||
245 | cfgft1 GUI CSU/DSU configuration program. | ||
246 | |||
247 | /usr/include/linux: | ||
248 | wanrouter.h router API definitions | ||
249 | wanpipe.h WANPIPE API definitions | ||
250 | sdladrv.h SDLA support module API definitions | ||
251 | sdlasfm.h SDLA firmware module definitions | ||
252 | if_wanpipe.h WANPIPE Socket definitions | ||
253 | if_wanpipe_common.h WANPIPE Socket/Driver common definitions. | ||
254 | sdlapci.h WANPIPE PCI definitions | ||
255 | |||
256 | |||
257 | /usr/src/linux/net/wanrouter: | ||
258 | * wanrouter source code | ||
259 | |||
260 | /var/log: | ||
261 | wanrouter wanrouter start-up log (created by the Setup script) | ||
262 | |||
263 | /var/lock: (or /var/lock/subsys for RedHat) | ||
264 | wanrouter wanrouter lock file (created by the Setup script) | ||
265 | |||
266 | /usr/local/wanrouter/firmware: | ||
267 | fr514.sfm Frame relay firmware for Sangoma S508/S514 card | ||
268 | cdual514.sfm Dual Port Cisco HDLC firmware for Sangoma S508/S514 card | ||
269 | ppp514.sfm PPP Firmware for Sangoma S508 and S514 cards | ||
270 | x25_508.sfm X25 Firmware for Sangoma S508 card. | ||
271 | |||
272 | |||
273 | REVISION HISTORY | ||
274 | |||
275 | 1.0.0 December 31, 1996 Initial version | ||
276 | |||
277 | 1.0.1 January 30, 1997 Status and statistics can be read via /proc | ||
278 | filesystem entries. | ||
279 | |||
280 | 1.0.2 April 30, 1997 Added UDP management via monitors. | ||
281 | |||
282 | 1.0.3 June 3, 1997 UDP management for multiple boards using Frame | ||
283 | Relay and PPP | ||
284 | Enabled continuous transmission of Configure | ||
285 | Request Packet for PPP (for 508 only) | ||
286 | Connection Timeout for PPP changed from 900 to 0 | ||
287 | Flow Control Problem fixed for Frame Relay | ||
288 | |||
289 | 1.0.4 July 10, 1997 S508/FT1 monitoring capability in fpipemon and | ||
290 | ppipemon utilities. | ||
291 | Configurable TTL for UDP packets. | ||
292 | Multicast and Broadcast IP source addresses are | ||
293 | silently discarded. | ||
294 | |||
295 | 1.0.5 July 28, 1997 Configurable T391,T392,N391,N392,N393 for Frame | ||
296 | Relay in router.conf. | ||
297 | Configurable Memory Address through router.conf | ||
298 | for Frame Relay, PPP and X.25. (commenting this | ||
299 | out enables auto-detection). | ||
300 | Fixed freeing up received buffers using kfree() | ||
301 | for Frame Relay and X.25. | ||
302 | Protect sdla_peek() by calling save_flags(), | ||
303 | cli() and restore_flags(). | ||
304 | Changed number of Trace elements from 32 to 20 | ||
305 | Added DLCI specific data monitoring in FPIPEMON. | ||
306 | 2.0.0 Nov 07, 1997 Implemented protection of RACE conditions by | ||
307 | critical flags for FRAME RELAY and PPP. | ||
308 | DLCI List interrupt mode implemented. | ||
309 | IPX support in FRAME RELAY and PPP. | ||
310 | IPX Server Support (MARS) | ||
311 | More driver specific stats included in FPIPEMON | ||
312 | and PIPEMON. | ||
313 | |||
314 | 2.0.1 Nov 28, 1997 Bug Fixes for version 2.0.0. | ||
315 | Protection of "enable_irq()" while | ||
316 | "disable_irq()" has been enabled from any other | ||
317 | routine (for Frame Relay, PPP and X25). | ||
318 | Added additional Stats for Fpipemon and Ppipemon | ||
319 | Improved Load Sharing for multiple boards | ||
320 | |||
321 | 2.0.2 Dec 09, 1997 Support for PAP and CHAP for ppp has been | ||
322 | implemented. | ||
323 | |||
324 | 2.0.3 Aug 15, 1998 New release supporting Cisco HDLC, CIR for Frame | ||
325 | relay, Dynamic IP assignment for PPP and Inverse | ||
326 | Arp support for Frame-relay. Man Pages are | ||
327 | included for better support and a new utility | ||
328 | for configuring FT1 cards. | ||
329 | |||
330 | 2.0.4 Dec 09, 1998 Dual Port support for Cisco HDLC. | ||
331 | Support for HDLC (LAPB) API. | ||
332 | Supports BiSync Streaming code for S502E | ||
333 | and S503 cards. | ||
334 | Support for Streaming HDLC API. | ||
335 | Provides a BSD socket interface for | ||
336 | creating applications using BiSync | ||
337 | streaming. | ||
338 | |||
339 | 2.0.5 Aug 04, 1999 CHDLC initializatin bug fix. | ||
340 | PPP interrupt driven driver: | ||
341 | Fix to the PPP line hangup problem. | ||
342 | New PPP firmware | ||
343 | Added comments to the startup SYSTEM ERROR messages | ||
344 | Xpipemon debugging application for the X25 protocol | ||
345 | New USER_MANUAL.txt | ||
346 | Fixed the odd boundary 4byte writes to the board. | ||
347 | BiSync Streaming code has been taken out. | ||
348 | Available as a patch. | ||
349 | Streaming HDLC API has been taken out. | ||
350 | Available as a patch. | ||
351 | |||
352 | 2.0.6 Aug 17, 1999 Increased debugging in statup scripts | ||
353 | Fixed insallation bugs from 2.0.5 | ||
354 | Kernel patch works for both 2.2.10 and 2.2.11 kernels. | ||
355 | There is no functional difference between the two packages | ||
356 | |||
357 | 2.0.7 Aug 26, 1999 o Merged X25API code into WANPIPE. | ||
358 | o Fixed a memeory leak for X25API | ||
359 | o Updated the X25API code for 2.2.X kernels. | ||
360 | o Improved NEM handling. | ||
361 | |||
362 | 2.1.0 Oct 25, 1999 o New code for S514 PCI Card | ||
363 | o New CHDLC and Frame Relay drivers | ||
364 | o PPP and X25 are not supported in this release | ||
365 | |||
366 | 2.1.1 Nov 30, 1999 o PPP support for S514 PCI Cards | ||
367 | |||
368 | 2.1.3 Apr 06, 2000 o Socket based x25api | ||
369 | o Socket based chdlc api | ||
370 | o Socket based fr api | ||
371 | o Dual Port Receive only CHDLC support. | ||
372 | o Asynchronous CHDLC support (Secondary Port) | ||
373 | o cfgft1 GUI csu/dsu configurator | ||
374 | o wancfg GUI configuration file | ||
375 | configurator. | ||
376 | o Architectual directory changes. | ||
377 | |||
378 | beta-2.1.4 Jul 2000 o Dynamic interface configuration: | ||
379 | Network interfaces reflect the state | ||
380 | of protocol layer. If the protocol becomes | ||
381 | disconnected, driver will bring down | ||
382 | the interface. Once the protocol reconnects | ||
383 | the interface will be brought up. | ||
384 | |||
385 | Note: This option is turned off by default. | ||
386 | |||
387 | o Dynamic wanrouter setup using 'wanconfig': | ||
388 | wanconfig utility can be used to | ||
389 | shutdown,restart,start or reconfigure | ||
390 | a virtual circuit dynamically. | ||
391 | |||
392 | Frame Relay: Each DLCI can be: | ||
393 | created,stopped,restarted and reconfigured | ||
394 | dynamically using wanconfig. | ||
395 | |||
396 | ex: wanconfig card wanpipe1 dev wp1_fr16 up | ||
397 | |||
398 | o Wanrouter startup via command line arguments: | ||
399 | wanconfig also supports wanrouter startup via command line | ||
400 | arguments. Thus, there is no need to create a wanpipe#.conf | ||
401 | configuration file. | ||
402 | |||
403 | o Socket based x25api update/bug fixes. | ||
404 | Added support for LCN numbers greater than 255. | ||
405 | Option to pass up modem messages. | ||
406 | Provided a PCI IRQ check, so a single S514 | ||
407 | card is guaranteed to have a non-sharing interrupt. | ||
408 | |||
409 | o Fixes to the wancfg utility. | ||
410 | o New FT1 debugging support via *pipemon utilities. | ||
411 | o Frame Relay ARP support Enabled. | ||
412 | |||
413 | beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix. | ||
414 | o Added the Multi-Port PPP | ||
415 | Updated utilites for the Multi-Port PPP. | ||
416 | |||
417 | 2.1.4 Aut 2000 | ||
418 | o In X25API: | ||
419 | Maximum packet an application can send | ||
420 | to the driver has been extended to 4096 bytes. | ||
421 | |||
422 | Fixed the x25 startup bug. Enable | ||
423 | communications only after all interfaces | ||
424 | come up. HIGH SVC/PVC is used to calculate | ||
425 | the number of channels. | ||
426 | Enable protocol only after all interfaces | ||
427 | are enabled. | ||
428 | |||
429 | o Added an extra state to the FT1 config, kernel module. | ||
430 | o Updated the pipemon debuggers. | ||
431 | |||
432 | o Blocked the Multi-Port PPP from running on kernels | ||
433 | 2.2.16 or greater, due to syncppp kernel module | ||
434 | change. | ||
435 | |||
436 | beta1-2.1.5 Nov 15 2000 | ||
437 | o Fixed the MulitPort PPP Support for kernels 2.2.16 and above. | ||
438 | 2.2.X kernels only | ||
439 | |||
440 | o Secured the driver UDP debugging calls | ||
441 | - All illegal netowrk debugging calls are reported to | ||
442 | the log. | ||
443 | - Defined a set of allowed commands, all other denied. | ||
444 | |||
445 | o Cpipemon | ||
446 | - Added set FT1 commands to the cpipemon. Thus CSU/DSU | ||
447 | configuraiton can be performed using cpipemon. | ||
448 | All systems that cannot run cfgft1 GUI utility should | ||
449 | use cpipemon to configure the on board CSU/DSU. | ||
450 | |||
451 | |||
452 | o Keyboard Led Monitor/Debugger | ||
453 | - A new utilty /usr/sbin/wpkbdmon uses keyboard leds | ||
454 | to convey operatinal statistic information of the | ||
455 | Sangoma WANPIPE cards. | ||
456 | NUM_LOCK = Line State (On=connected, Off=disconnected) | ||
457 | CAPS_LOCK = Tx data (On=transmitting, Off=no tx data) | ||
458 | SCROLL_LOCK = Rx data (On=receiving, Off=no rx data | ||
459 | |||
460 | o Hardware probe on module load and dynamic device allocation | ||
461 | - During WANPIPE module load, all Sangoma cards are probed | ||
462 | and found information is printed in the /var/log/messages. | ||
463 | - If no cards are found, the module load fails. | ||
464 | - Appropriate number of devices are dynamically loaded | ||
465 | based on the number of Sangoma cards found. | ||
466 | |||
467 | Note: The kernel configuraiton option | ||
468 | CONFIG_WANPIPE_CARDS has been taken out. | ||
469 | |||
470 | o Fixed the Frame Relay and Chdlc network interfaces so they are | ||
471 | compatible with libpcap libraries. Meaning, tcpdump, snort, | ||
472 | ethereal, and all other packet sniffers and debuggers work on | ||
473 | all WANPIPE netowrk interfaces. | ||
474 | - Set the network interface encoding type to ARPHRD_PPP. | ||
475 | This tell the sniffers that data obtained from the | ||
476 | network interface is in pure IP format. | ||
477 | Fix for 2.2.X kernels only. | ||
478 | |||
479 | o True interface encoding option for Frame Relay and CHDLC | ||
480 | - The above fix sets the network interface encoding | ||
481 | type to ARPHRD_PPP, however some customers use | ||
482 | the encoding interface type to determine the | ||
483 | protocol running. Therefore, the TURE ENCODING | ||
484 | option will set the interface type back to the | ||
485 | original value. | ||
486 | |||
487 | NOTE: If this option is used with Frame Relay and CHDLC | ||
488 | libpcap library support will be broken. | ||
489 | i.e. tcpdump will not work. | ||
490 | Fix for 2.2.x Kernels only. | ||
491 | |||
492 | o Ethernet Bridgind over Frame Relay | ||
493 | - The Frame Relay bridging has been developed by | ||
494 | Kristian Hoffmann and Mark Wells. | ||
495 | - The Linux kernel bridge is used to send ethernet | ||
496 | data over the frame relay links. | ||
497 | For 2.2.X Kernels only. | ||
498 | |||
499 | o Added extensive 2.0.X support. Most new features of | ||
500 | 2.1.5 for protocols Frame Relay, PPP and CHDLC are | ||
501 | supported under 2.0.X kernels. | ||
502 | |||
503 | beta1-2.2.0 Dec 30 2000 | ||
504 | o Updated drivers for 2.4.X kernels. | ||
505 | o Updated drivers for SMP support. | ||
506 | o X25API is now able to share PCI interrupts. | ||
507 | o Took out a general polling routine that was used | ||
508 | only by X25API. | ||
509 | o Added appropriate locks to the dynamic reconfiguration | ||
510 | code. | ||
511 | o Fixed a bug in the keyboard debug monitor. | ||
512 | |||
513 | beta2-2.2.0 Jan 8 2001 | ||
514 | o Patches for 2.4.0 kernel | ||
515 | o Patches for 2.2.18 kernel | ||
516 | o Minor updates to PPP and CHLDC drivers. | ||
517 | Note: No functinal difference. | ||
518 | |||
519 | beta3-2.2.9 Jan 10 2001 | ||
520 | o I missed the 2.2.18 kernel patches in beta2-2.2.0 | ||
521 | release. They are included in this release. | ||
522 | |||
523 | Stable Release | ||
524 | 2.2.0 Feb 01 2001 | ||
525 | o Bug fix in wancfg GUI configurator. | ||
526 | The edit function didn't work properly. | ||
527 | |||
528 | |||
529 | bata1-2.2.1 Feb 09 2001 | ||
530 | o WANPIPE TTY Driver emulation. | ||
531 | Two modes of operation Sync and Async. | ||
532 | Sync: Using the PPPD daemon, kernel SyncPPP layer | ||
533 | and the Wanpipe sync TTY driver: a PPP protocol | ||
534 | connection can be established via Sangoma adapter, over | ||
535 | a T1 leased line. | ||
536 | |||
537 | The 2.4.0 kernel PPP layer supports MULTILINK | ||
538 | protocol, that can be used to bundle any number of Sangoma | ||
539 | adapters (T1 lines) into one, under a single IP address. | ||
540 | Thus, efficiently obtaining multiple T1 throughput. | ||
541 | |||
542 | NOTE: The remote side must also implement MULTILINK PPP | ||
543 | protocol. | ||
544 | |||
545 | Async:Using the PPPD daemon, kernel AsyncPPP layer | ||
546 | and the WANPIPE async TTY driver: a PPP protocol | ||
547 | connection can be established via Sangoma adapter and | ||
548 | a modem, over a telephone line. | ||
549 | |||
550 | Thus, the WANPIPE async TTY driver simulates a serial | ||
551 | TTY driver that would normally be used to interface the | ||
552 | MODEM to the linux kernel. | ||
553 | |||
554 | o WANPIPE PPP Backup Utility | ||
555 | This utility will monitor the state of the PPP T1 line. | ||
556 | In case of failure, a dial up connection will be established | ||
557 | via pppd daemon, ether via a serial tty driver (serial port), | ||
558 | or a WANPIPE async TTY driver (in case serial port is unavailable). | ||
559 | |||
560 | Furthermore, while in dial up mode, the primary PPP T1 link | ||
561 | will be monitored for signs of life. | ||
562 | |||
563 | If the PPP T1 link comes back to life, the dial up connection | ||
564 | will be shutdown and T1 line re-established. | ||
565 | |||
566 | |||
567 | o New Setup installation script. | ||
568 | Option to UPGRADE device drivers if the kernel source has | ||
569 | already been patched with WANPIPE. | ||
570 | |||
571 | Option to COMPILE WANPIPE modules against the currently | ||
572 | running kernel, thus no need for manual kernel and module | ||
573 | re-compilatin. | ||
574 | |||
575 | o Updates and Bug Fixes to wancfg utility. | ||
576 | |||
577 | bata2-2.2.1 Feb 20 2001 | ||
578 | |||
579 | o Bug fixes to the CHDLC device drivers. | ||
580 | The driver had compilation problems under kernels | ||
581 | 2.2.14 or lower. | ||
582 | |||
583 | o Bug fixes to the Setup installation script. | ||
584 | The device drivers compilation options didn't work | ||
585 | properly. | ||
586 | |||
587 | o Update to the wpbackupd daemon. | ||
588 | Optimized the cross-over times, between the primary | ||
589 | link and the backup dialup. | ||
590 | |||
591 | beta3-2.2.1 Mar 02 2001 | ||
592 | o Patches for 2.4.2 kernel. | ||
593 | |||
594 | o Bug fixes to util/ make files. | ||
595 | o Bug fixes to the Setup installation script. | ||
596 | |||
597 | o Took out the backupd support and made it into | ||
598 | as separate package. | ||
599 | |||
600 | beta4-2.2.1 Mar 12 2001 | ||
601 | |||
602 | o Fix to the Frame Relay Device driver. | ||
603 | IPSAC sends a packet of zero length | ||
604 | header to the frame relay driver. The | ||
605 | driver tries to push its own 2 byte header | ||
606 | into the packet, which causes the driver to | ||
607 | crash. | ||
608 | |||
609 | o Fix the WANPIPE re-configuration code. | ||
610 | Bug was found by trying to run the cfgft1 while the | ||
611 | interface was already running. | ||
612 | |||
613 | o Updates to cfgft1. | ||
614 | Writes a wanpipe#.cfgft1 configuration file | ||
615 | once the CSU/DSU is configured. This file can | ||
616 | holds the current CSU/DSU configuration. | ||
617 | |||
618 | |||
619 | |||
620 | >>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
621 | |||
622 | |||
diff --git a/Documentation/networking/wanpipe.txt b/Documentation/networking/wanpipe.txt new file mode 100644 index 000000000000..aea20cd2a56e --- /dev/null +++ b/Documentation/networking/wanpipe.txt | |||
@@ -0,0 +1,622 @@ | |||
1 | ------------------------------------------------------------------------------ | ||
2 | Linux WAN Router Utilities Package | ||
3 | ------------------------------------------------------------------------------ | ||
4 | Version 2.2.1 | ||
5 | Mar 28, 2001 | ||
6 | Author: Nenad Corbic <ncorbic@sangoma.com> | ||
7 | Copyright (c) 1995-2001 Sangoma Technologies Inc. | ||
8 | ------------------------------------------------------------------------------ | ||
9 | |||
10 | INTRODUCTION | ||
11 | |||
12 | Wide Area Networks (WANs) are used to interconnect Local Area Networks (LANs) | ||
13 | and/or stand-alone hosts over vast distances with data transfer rates | ||
14 | significantly higher than those achievable with commonly used dial-up | ||
15 | connections. | ||
16 | |||
17 | Usually an external device called `WAN router' sitting on your local network | ||
18 | or connected to your machine's serial port provides physical connection to | ||
19 | WAN. Although router's job may be as simple as taking your local network | ||
20 | traffic, converting it to WAN format and piping it through the WAN link, these | ||
21 | devices are notoriously expensive, with prices as much as 2 - 5 times higher | ||
22 | then the price of a typical PC box. | ||
23 | |||
24 | Alternatively, considering robustness and multitasking capabilities of Linux, | ||
25 | an internal router can be built (most routers use some sort of stripped down | ||
26 | Unix-like operating system anyway). With a number of relatively inexpensive WAN | ||
27 | interface cards available on the market, a perfectly usable router can be | ||
28 | built for less than half a price of an external router. Yet a Linux box | ||
29 | acting as a router can still be used for other purposes, such as fire-walling, | ||
30 | running FTP, WWW or DNS server, etc. | ||
31 | |||
32 | This kernel module introduces the notion of a WAN Link Driver (WLD) to Linux | ||
33 | operating system and provides generic hardware-independent services for such | ||
34 | drivers. Why can existing Linux network device interface not be used for | ||
35 | this purpose? Well, it can. However, there are a few key differences between | ||
36 | a typical network interface (e.g. Ethernet) and a WAN link. | ||
37 | |||
38 | Many WAN protocols, such as X.25 and frame relay, allow for multiple logical | ||
39 | connections (known as `virtual circuits' in X.25 terminology) over a single | ||
40 | physical link. Each such virtual circuit may (and almost always does) lead | ||
41 | to a different geographical location and, therefore, different network. As a | ||
42 | result, it is the virtual circuit, not the physical link, that represents a | ||
43 | route and, therefore, a network interface in Linux terms. | ||
44 | |||
45 | To further complicate things, virtual circuits are usually volatile in nature | ||
46 | (excluding so called `permanent' virtual circuits or PVCs). With almost no | ||
47 | time required to set up and tear down a virtual circuit, it is highly desirable | ||
48 | to implement on-demand connections in order to minimize network charges. So | ||
49 | unlike a typical network driver, the WAN driver must be able to handle multiple | ||
50 | network interfaces and cope as multiple virtual circuits come into existence | ||
51 | and go away dynamically. | ||
52 | |||
53 | Last, but not least, WAN configuration is much more complex than that of say | ||
54 | Ethernet and may well amount to several dozens of parameters. Some of them | ||
55 | are "link-wide" while others are virtual circuit-specific. The same holds | ||
56 | true for WAN statistics which is by far more extensive and extremely useful | ||
57 | when troubleshooting WAN connections. Extending the ifconfig utility to suit | ||
58 | these needs may be possible, but does not seem quite reasonable. Therefore, a | ||
59 | WAN configuration utility and corresponding application programmer's interface | ||
60 | is needed for this purpose. | ||
61 | |||
62 | Most of these problems are taken care of by this module. Its goal is to | ||
63 | provide a user with more-or-less standard look and feel for all WAN devices and | ||
64 | assist a WAN device driver writer by providing common services, such as: | ||
65 | |||
66 | o User-level interface via /proc file system | ||
67 | o Centralized configuration | ||
68 | o Device management (setup, shutdown, etc.) | ||
69 | o Network interface management (dynamic creation/destruction) | ||
70 | o Protocol encapsulation/decapsulation | ||
71 | |||
72 | To ba able to use the Linux WAN Router you will also need a WAN Tools package | ||
73 | available from | ||
74 | |||
75 | ftp.sangoma.com/pub/linux/current_wanpipe/wanpipe-X.Y.Z.tgz | ||
76 | |||
77 | where vX.Y.Z represent the wanpipe version number. | ||
78 | |||
79 | For technical questions and/or comments please e-mail to ncorbic@sangoma.com. | ||
80 | For general inquiries please contact Sangoma Technologies Inc. by | ||
81 | |||
82 | Hotline: 1-800-388-2475 (USA and Canada, toll free) | ||
83 | Phone: (905) 474-1990 ext: 106 | ||
84 | Fax: (905) 474-9223 | ||
85 | E-mail: dm@sangoma.com (David Mandelstam) | ||
86 | WWW: http://www.sangoma.com | ||
87 | |||
88 | |||
89 | INSTALLATION | ||
90 | |||
91 | Please read the WanpipeForLinux.pdf manual on how to | ||
92 | install the WANPIPE tools and drivers properly. | ||
93 | |||
94 | |||
95 | After installing wanpipe package: /usr/local/wanrouter/doc. | ||
96 | On the ftp.sangoma.com : /linux/current_wanpipe/doc | ||
97 | |||
98 | |||
99 | COPYRIGHT AND LICENSING INFORMATION | ||
100 | |||
101 | This program is free software; you can redistribute it and/or modify it under | ||
102 | the terms of the GNU General Public License as published by the Free Software | ||
103 | Foundation; either version 2, or (at your option) any later version. | ||
104 | |||
105 | This program is distributed in the hope that it will be useful, but WITHOUT | ||
106 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
107 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
108 | |||
109 | You should have received a copy of the GNU General Public License along with | ||
110 | this program; if not, write to the Free Software Foundation, Inc., 675 Mass | ||
111 | Ave, Cambridge, MA 02139, USA. | ||
112 | |||
113 | |||
114 | |||
115 | ACKNOWLEDGEMENTS | ||
116 | |||
117 | This product is based on the WANPIPE(tm) Multiprotocol WAN Router developed | ||
118 | by Sangoma Technologies Inc. for Linux 2.0.x and 2.2.x. Success of the WANPIPE | ||
119 | together with the next major release of Linux kernel in summer 1996 commanded | ||
120 | adequate changes to the WANPIPE code to take full advantage of new Linux | ||
121 | features. | ||
122 | |||
123 | Instead of continuing developing proprietary interface tied to Sangoma WAN | ||
124 | cards, we decided to separate all hardware-independent code into a separate | ||
125 | module and defined two levels of interfaces - one for user-level applications | ||
126 | and another for kernel-level WAN drivers. WANPIPE is now implemented as a | ||
127 | WAN driver compliant with the WAN Link Driver interface. Also a general | ||
128 | purpose WAN configuration utility and a set of shell scripts was developed to | ||
129 | support WAN router at the user level. | ||
130 | |||
131 | Many useful ideas concerning hardware-independent interface implementation | ||
132 | were given by Mike McLagan <mike.mclagan@linux.org> and his implementation | ||
133 | of the Frame Relay router and drivers for Sangoma cards (dlci/sdla). | ||
134 | |||
135 | With the new implementation of the APIs being incorporated into the WANPIPE, | ||
136 | a special thank goes to Alan Cox in providing insight into BSD sockets. | ||
137 | |||
138 | Special thanks to all the WANPIPE users who performed field-testing, reported | ||
139 | bugs and made valuable comments and suggestions that help us to improve this | ||
140 | product. | ||
141 | |||
142 | |||
143 | |||
144 | NEW IN THIS RELEASE | ||
145 | |||
146 | o Updated the WANCFG utility | ||
147 | Calls the pppconfig to configure the PPPD | ||
148 | for async connections. | ||
149 | |||
150 | o Added the PPPCONFIG utility | ||
151 | Used to configure the PPPD dameon for the | ||
152 | WANPIPE Async PPP and standard serial port. | ||
153 | The wancfg calls the pppconfig to configure | ||
154 | the pppd. | ||
155 | |||
156 | o Fixed the PCI autodetect feature. | ||
157 | The SLOT 0 was used as an autodetect option | ||
158 | however, some high end PC's slot numbers start | ||
159 | from 0. | ||
160 | |||
161 | o This release has been tested with the new backupd | ||
162 | daemon release. | ||
163 | |||
164 | |||
165 | PRODUCT COMPONENTS AND RELATED FILES | ||
166 | |||
167 | /etc: (or user defined) | ||
168 | wanpipe1.conf default router configuration file | ||
169 | |||
170 | /lib/modules/X.Y.Z/misc: | ||
171 | wanrouter.o router kernel loadable module | ||
172 | af_wanpipe.o wanpipe api socket module | ||
173 | |||
174 | /lib/modules/X.Y.Z/net: | ||
175 | sdladrv.o Sangoma SDLA support module | ||
176 | wanpipe.o Sangoma WANPIPE(tm) driver module | ||
177 | |||
178 | /proc/net/wanrouter | ||
179 | Config reads current router configuration | ||
180 | Status reads current router status | ||
181 | {name} reads WAN driver statistics | ||
182 | |||
183 | /usr/sbin: | ||
184 | wanrouter wanrouter start-up script | ||
185 | wanconfig wanrouter configuration utility | ||
186 | sdladump WANPIPE adapter memory dump utility | ||
187 | fpipemon Monitor for Frame Relay | ||
188 | cpipemon Monitor for Cisco HDLC | ||
189 | ppipemon Monitor for PPP | ||
190 | xpipemon Monitor for X25 | ||
191 | wpkbdmon WANPIPE keyboard led monitor/debugger | ||
192 | |||
193 | /usr/local/wanrouter: | ||
194 | README this file | ||
195 | COPYING GNU General Public License | ||
196 | Setup installation script | ||
197 | Filelist distribution definition file | ||
198 | wanrouter.rc meta-configuration file | ||
199 | (used by the Setup and wanrouter script) | ||
200 | |||
201 | /usr/local/wanrouter/doc: | ||
202 | wanpipeForLinux.pdf WAN Router User's Manual | ||
203 | |||
204 | /usr/local/wanrouter/patches: | ||
205 | wanrouter-v2213.gz patch for Linux kernels 2.2.11 up to 2.2.13. | ||
206 | wanrouter-v2214.gz patch for Linux kernel 2.2.14. | ||
207 | wanrouter-v2215.gz patch for Linux kernels 2.2.15 to 2.2.17. | ||
208 | wanrouter-v2218.gz patch for Linux kernels 2.2.18 and up. | ||
209 | wanrouter-v240.gz patch for Linux kernel 2.4.0. | ||
210 | wanrouter-v242.gz patch for Linux kernel 2.4.2 and up. | ||
211 | wanrouter-v2034.gz patch for Linux kernel 2.0.34 | ||
212 | wanrouter-v2036.gz patch for Linux kernel 2.0.36 and up. | ||
213 | |||
214 | /usr/local/wanrouter/patches/kdrivers: | ||
215 | Sources of the latest WANPIPE device drivers. | ||
216 | These are used to UPGRADE the linux kernel to the newest | ||
217 | version if the kernel source has already been pathced with | ||
218 | WANPIPE drivers. | ||
219 | |||
220 | /usr/local/wanrouter/samples: | ||
221 | interface sample interface configuration file | ||
222 | wanpipe1.cpri CHDLC primary port | ||
223 | wanpipe2.csec CHDLC secondary port | ||
224 | wanpipe1.fr Frame Relay protocol | ||
225 | wanpipe1.ppp PPP protocol ) | ||
226 | wanpipe1.asy CHDLC ASYNC protocol | ||
227 | wanpipe1.x25 X25 protocol | ||
228 | wanpipe1.stty Sync TTY driver (Used by Kernel PPPD daemon) | ||
229 | wanpipe1.atty Async TTY driver (Used by Kernel PPPD daemon) | ||
230 | wanrouter.rc sample meta-configuration file | ||
231 | |||
232 | /usr/local/wanrouter/util: | ||
233 | * wan-tools utilities source code | ||
234 | |||
235 | /usr/local/wanrouter/api/x25: | ||
236 | * x25 api sample programs. | ||
237 | /usr/local/wanrouter/api/chdlc: | ||
238 | * chdlc api sample programs. | ||
239 | /usr/local/wanrouter/api/fr: | ||
240 | * fr api sample programs. | ||
241 | /usr/local/wanrouter/config/wancfg: | ||
242 | wancfg WANPIPE GUI configuration program. | ||
243 | Creates wanpipe#.conf files. | ||
244 | /usr/local/wanrouter/config/cfgft1: | ||
245 | cfgft1 GUI CSU/DSU configuration program. | ||
246 | |||
247 | /usr/include/linux: | ||
248 | wanrouter.h router API definitions | ||
249 | wanpipe.h WANPIPE API definitions | ||
250 | sdladrv.h SDLA support module API definitions | ||
251 | sdlasfm.h SDLA firmware module definitions | ||
252 | if_wanpipe.h WANPIPE Socket definitions | ||
253 | if_wanpipe_common.h WANPIPE Socket/Driver common definitions. | ||
254 | sdlapci.h WANPIPE PCI definitions | ||
255 | |||
256 | |||
257 | /usr/src/linux/net/wanrouter: | ||
258 | * wanrouter source code | ||
259 | |||
260 | /var/log: | ||
261 | wanrouter wanrouter start-up log (created by the Setup script) | ||
262 | |||
263 | /var/lock: (or /var/lock/subsys for RedHat) | ||
264 | wanrouter wanrouter lock file (created by the Setup script) | ||
265 | |||
266 | /usr/local/wanrouter/firmware: | ||
267 | fr514.sfm Frame relay firmware for Sangoma S508/S514 card | ||
268 | cdual514.sfm Dual Port Cisco HDLC firmware for Sangoma S508/S514 card | ||
269 | ppp514.sfm PPP Firmware for Sangoma S508 and S514 cards | ||
270 | x25_508.sfm X25 Firmware for Sangoma S508 card. | ||
271 | |||
272 | |||
273 | REVISION HISTORY | ||
274 | |||
275 | 1.0.0 December 31, 1996 Initial version | ||
276 | |||
277 | 1.0.1 January 30, 1997 Status and statistics can be read via /proc | ||
278 | filesystem entries. | ||
279 | |||
280 | 1.0.2 April 30, 1997 Added UDP management via monitors. | ||
281 | |||
282 | 1.0.3 June 3, 1997 UDP management for multiple boards using Frame | ||
283 | Relay and PPP | ||
284 | Enabled continuous transmission of Configure | ||
285 | Request Packet for PPP (for 508 only) | ||
286 | Connection Timeout for PPP changed from 900 to 0 | ||
287 | Flow Control Problem fixed for Frame Relay | ||
288 | |||
289 | 1.0.4 July 10, 1997 S508/FT1 monitoring capability in fpipemon and | ||
290 | ppipemon utilities. | ||
291 | Configurable TTL for UDP packets. | ||
292 | Multicast and Broadcast IP source addresses are | ||
293 | silently discarded. | ||
294 | |||
295 | 1.0.5 July 28, 1997 Configurable T391,T392,N391,N392,N393 for Frame | ||
296 | Relay in router.conf. | ||
297 | Configurable Memory Address through router.conf | ||
298 | for Frame Relay, PPP and X.25. (commenting this | ||
299 | out enables auto-detection). | ||
300 | Fixed freeing up received buffers using kfree() | ||
301 | for Frame Relay and X.25. | ||
302 | Protect sdla_peek() by calling save_flags(), | ||
303 | cli() and restore_flags(). | ||
304 | Changed number of Trace elements from 32 to 20 | ||
305 | Added DLCI specific data monitoring in FPIPEMON. | ||
306 | 2.0.0 Nov 07, 1997 Implemented protection of RACE conditions by | ||
307 | critical flags for FRAME RELAY and PPP. | ||
308 | DLCI List interrupt mode implemented. | ||
309 | IPX support in FRAME RELAY and PPP. | ||
310 | IPX Server Support (MARS) | ||
311 | More driver specific stats included in FPIPEMON | ||
312 | and PIPEMON. | ||
313 | |||
314 | 2.0.1 Nov 28, 1997 Bug Fixes for version 2.0.0. | ||
315 | Protection of "enable_irq()" while | ||
316 | "disable_irq()" has been enabled from any other | ||
317 | routine (for Frame Relay, PPP and X25). | ||
318 | Added additional Stats for Fpipemon and Ppipemon | ||
319 | Improved Load Sharing for multiple boards | ||
320 | |||
321 | 2.0.2 Dec 09, 1997 Support for PAP and CHAP for ppp has been | ||
322 | implemented. | ||
323 | |||
324 | 2.0.3 Aug 15, 1998 New release supporting Cisco HDLC, CIR for Frame | ||
325 | relay, Dynamic IP assignment for PPP and Inverse | ||
326 | Arp support for Frame-relay. Man Pages are | ||
327 | included for better support and a new utility | ||
328 | for configuring FT1 cards. | ||
329 | |||
330 | 2.0.4 Dec 09, 1998 Dual Port support for Cisco HDLC. | ||
331 | Support for HDLC (LAPB) API. | ||
332 | Supports BiSync Streaming code for S502E | ||
333 | and S503 cards. | ||
334 | Support for Streaming HDLC API. | ||
335 | Provides a BSD socket interface for | ||
336 | creating applications using BiSync | ||
337 | streaming. | ||
338 | |||
339 | 2.0.5 Aug 04, 1999 CHDLC initializatin bug fix. | ||
340 | PPP interrupt driven driver: | ||
341 | Fix to the PPP line hangup problem. | ||
342 | New PPP firmware | ||
343 | Added comments to the startup SYSTEM ERROR messages | ||
344 | Xpipemon debugging application for the X25 protocol | ||
345 | New USER_MANUAL.txt | ||
346 | Fixed the odd boundary 4byte writes to the board. | ||
347 | BiSync Streaming code has been taken out. | ||
348 | Available as a patch. | ||
349 | Streaming HDLC API has been taken out. | ||
350 | Available as a patch. | ||
351 | |||
352 | 2.0.6 Aug 17, 1999 Increased debugging in statup scripts | ||
353 | Fixed insallation bugs from 2.0.5 | ||
354 | Kernel patch works for both 2.2.10 and 2.2.11 kernels. | ||
355 | There is no functional difference between the two packages | ||
356 | |||
357 | 2.0.7 Aug 26, 1999 o Merged X25API code into WANPIPE. | ||
358 | o Fixed a memeory leak for X25API | ||
359 | o Updated the X25API code for 2.2.X kernels. | ||
360 | o Improved NEM handling. | ||
361 | |||
362 | 2.1.0 Oct 25, 1999 o New code for S514 PCI Card | ||
363 | o New CHDLC and Frame Relay drivers | ||
364 | o PPP and X25 are not supported in this release | ||
365 | |||
366 | 2.1.1 Nov 30, 1999 o PPP support for S514 PCI Cards | ||
367 | |||
368 | 2.1.3 Apr 06, 2000 o Socket based x25api | ||
369 | o Socket based chdlc api | ||
370 | o Socket based fr api | ||
371 | o Dual Port Receive only CHDLC support. | ||
372 | o Asynchronous CHDLC support (Secondary Port) | ||
373 | o cfgft1 GUI csu/dsu configurator | ||
374 | o wancfg GUI configuration file | ||
375 | configurator. | ||
376 | o Architectual directory changes. | ||
377 | |||
378 | beta-2.1.4 Jul 2000 o Dynamic interface configuration: | ||
379 | Network interfaces reflect the state | ||
380 | of protocol layer. If the protocol becomes | ||
381 | disconnected, driver will bring down | ||
382 | the interface. Once the protocol reconnects | ||
383 | the interface will be brought up. | ||
384 | |||
385 | Note: This option is turned off by default. | ||
386 | |||
387 | o Dynamic wanrouter setup using 'wanconfig': | ||
388 | wanconfig utility can be used to | ||
389 | shutdown,restart,start or reconfigure | ||
390 | a virtual circuit dynamically. | ||
391 | |||
392 | Frame Relay: Each DLCI can be: | ||
393 | created,stopped,restarted and reconfigured | ||
394 | dynamically using wanconfig. | ||
395 | |||
396 | ex: wanconfig card wanpipe1 dev wp1_fr16 up | ||
397 | |||
398 | o Wanrouter startup via command line arguments: | ||
399 | wanconfig also supports wanrouter startup via command line | ||
400 | arguments. Thus, there is no need to create a wanpipe#.conf | ||
401 | configuration file. | ||
402 | |||
403 | o Socket based x25api update/bug fixes. | ||
404 | Added support for LCN numbers greater than 255. | ||
405 | Option to pass up modem messages. | ||
406 | Provided a PCI IRQ check, so a single S514 | ||
407 | card is guaranteed to have a non-sharing interrupt. | ||
408 | |||
409 | o Fixes to the wancfg utility. | ||
410 | o New FT1 debugging support via *pipemon utilities. | ||
411 | o Frame Relay ARP support Enabled. | ||
412 | |||
413 | beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix. | ||
414 | o Added the Multi-Port PPP | ||
415 | Updated utilites for the Multi-Port PPP. | ||
416 | |||
417 | 2.1.4 Aut 2000 | ||
418 | o In X25API: | ||
419 | Maximum packet an application can send | ||
420 | to the driver has been extended to 4096 bytes. | ||
421 | |||
422 | Fixed the x25 startup bug. Enable | ||
423 | communications only after all interfaces | ||
424 | come up. HIGH SVC/PVC is used to calculate | ||
425 | the number of channels. | ||
426 | Enable protocol only after all interfaces | ||
427 | are enabled. | ||
428 | |||
429 | o Added an extra state to the FT1 config, kernel module. | ||
430 | o Updated the pipemon debuggers. | ||
431 | |||
432 | o Blocked the Multi-Port PPP from running on kernels | ||
433 | 2.2.16 or greater, due to syncppp kernel module | ||
434 | change. | ||
435 | |||
436 | beta1-2.1.5 Nov 15 2000 | ||
437 | o Fixed the MulitPort PPP Support for kernels 2.2.16 and above. | ||
438 | 2.2.X kernels only | ||
439 | |||
440 | o Secured the driver UDP debugging calls | ||
441 | - All illegal netowrk debugging calls are reported to | ||
442 | the log. | ||
443 | - Defined a set of allowed commands, all other denied. | ||
444 | |||
445 | o Cpipemon | ||
446 | - Added set FT1 commands to the cpipemon. Thus CSU/DSU | ||
447 | configuraiton can be performed using cpipemon. | ||
448 | All systems that cannot run cfgft1 GUI utility should | ||
449 | use cpipemon to configure the on board CSU/DSU. | ||
450 | |||
451 | |||
452 | o Keyboard Led Monitor/Debugger | ||
453 | - A new utilty /usr/sbin/wpkbdmon uses keyboard leds | ||
454 | to convey operatinal statistic information of the | ||
455 | Sangoma WANPIPE cards. | ||
456 | NUM_LOCK = Line State (On=connected, Off=disconnected) | ||
457 | CAPS_LOCK = Tx data (On=transmitting, Off=no tx data) | ||
458 | SCROLL_LOCK = Rx data (On=receiving, Off=no rx data | ||
459 | |||
460 | o Hardware probe on module load and dynamic device allocation | ||
461 | - During WANPIPE module load, all Sangoma cards are probed | ||
462 | and found information is printed in the /var/log/messages. | ||
463 | - If no cards are found, the module load fails. | ||
464 | - Appropriate number of devices are dynamically loaded | ||
465 | based on the number of Sangoma cards found. | ||
466 | |||
467 | Note: The kernel configuraiton option | ||
468 | CONFIG_WANPIPE_CARDS has been taken out. | ||
469 | |||
470 | o Fixed the Frame Relay and Chdlc network interfaces so they are | ||
471 | compatible with libpcap libraries. Meaning, tcpdump, snort, | ||
472 | ethereal, and all other packet sniffers and debuggers work on | ||
473 | all WANPIPE netowrk interfaces. | ||
474 | - Set the network interface encoding type to ARPHRD_PPP. | ||
475 | This tell the sniffers that data obtained from the | ||
476 | network interface is in pure IP format. | ||
477 | Fix for 2.2.X kernels only. | ||
478 | |||
479 | o True interface encoding option for Frame Relay and CHDLC | ||
480 | - The above fix sets the network interface encoding | ||
481 | type to ARPHRD_PPP, however some customers use | ||
482 | the encoding interface type to determine the | ||
483 | protocol running. Therefore, the TURE ENCODING | ||
484 | option will set the interface type back to the | ||
485 | original value. | ||
486 | |||
487 | NOTE: If this option is used with Frame Relay and CHDLC | ||
488 | libpcap library support will be broken. | ||
489 | i.e. tcpdump will not work. | ||
490 | Fix for 2.2.x Kernels only. | ||
491 | |||
492 | o Ethernet Bridgind over Frame Relay | ||
493 | - The Frame Relay bridging has been developed by | ||
494 | Kristian Hoffmann and Mark Wells. | ||
495 | - The Linux kernel bridge is used to send ethernet | ||
496 | data over the frame relay links. | ||
497 | For 2.2.X Kernels only. | ||
498 | |||
499 | o Added extensive 2.0.X support. Most new features of | ||
500 | 2.1.5 for protocols Frame Relay, PPP and CHDLC are | ||
501 | supported under 2.0.X kernels. | ||
502 | |||
503 | beta1-2.2.0 Dec 30 2000 | ||
504 | o Updated drivers for 2.4.X kernels. | ||
505 | o Updated drivers for SMP support. | ||
506 | o X25API is now able to share PCI interrupts. | ||
507 | o Took out a general polling routine that was used | ||
508 | only by X25API. | ||
509 | o Added appropriate locks to the dynamic reconfiguration | ||
510 | code. | ||
511 | o Fixed a bug in the keyboard debug monitor. | ||
512 | |||
513 | beta2-2.2.0 Jan 8 2001 | ||
514 | o Patches for 2.4.0 kernel | ||
515 | o Patches for 2.2.18 kernel | ||
516 | o Minor updates to PPP and CHLDC drivers. | ||
517 | Note: No functinal difference. | ||
518 | |||
519 | beta3-2.2.9 Jan 10 2001 | ||
520 | o I missed the 2.2.18 kernel patches in beta2-2.2.0 | ||
521 | release. They are included in this release. | ||
522 | |||
523 | Stable Release | ||
524 | 2.2.0 Feb 01 2001 | ||
525 | o Bug fix in wancfg GUI configurator. | ||
526 | The edit function didn't work properly. | ||
527 | |||
528 | |||
529 | bata1-2.2.1 Feb 09 2001 | ||
530 | o WANPIPE TTY Driver emulation. | ||
531 | Two modes of operation Sync and Async. | ||
532 | Sync: Using the PPPD daemon, kernel SyncPPP layer | ||
533 | and the Wanpipe sync TTY driver: a PPP protocol | ||
534 | connection can be established via Sangoma adapter, over | ||
535 | a T1 leased line. | ||
536 | |||
537 | The 2.4.0 kernel PPP layer supports MULTILINK | ||
538 | protocol, that can be used to bundle any number of Sangoma | ||
539 | adapters (T1 lines) into one, under a single IP address. | ||
540 | Thus, efficiently obtaining multiple T1 throughput. | ||
541 | |||
542 | NOTE: The remote side must also implement MULTILINK PPP | ||
543 | protocol. | ||
544 | |||
545 | Async:Using the PPPD daemon, kernel AsyncPPP layer | ||
546 | and the WANPIPE async TTY driver: a PPP protocol | ||
547 | connection can be established via Sangoma adapter and | ||
548 | a modem, over a telephone line. | ||
549 | |||
550 | Thus, the WANPIPE async TTY driver simulates a serial | ||
551 | TTY driver that would normally be used to interface the | ||
552 | MODEM to the linux kernel. | ||
553 | |||
554 | o WANPIPE PPP Backup Utility | ||
555 | This utility will monitor the state of the PPP T1 line. | ||
556 | In case of failure, a dial up connection will be established | ||
557 | via pppd daemon, ether via a serial tty driver (serial port), | ||
558 | or a WANPIPE async TTY driver (in case serial port is unavailable). | ||
559 | |||
560 | Furthermore, while in dial up mode, the primary PPP T1 link | ||
561 | will be monitored for signs of life. | ||
562 | |||
563 | If the PPP T1 link comes back to life, the dial up connection | ||
564 | will be shutdown and T1 line re-established. | ||
565 | |||
566 | |||
567 | o New Setup installation script. | ||
568 | Option to UPGRADE device drivers if the kernel source has | ||
569 | already been patched with WANPIPE. | ||
570 | |||
571 | Option to COMPILE WANPIPE modules against the currently | ||
572 | running kernel, thus no need for manual kernel and module | ||
573 | re-compilatin. | ||
574 | |||
575 | o Updates and Bug Fixes to wancfg utility. | ||
576 | |||
577 | bata2-2.2.1 Feb 20 2001 | ||
578 | |||
579 | o Bug fixes to the CHDLC device drivers. | ||
580 | The driver had compilation problems under kernels | ||
581 | 2.2.14 or lower. | ||
582 | |||
583 | o Bug fixes to the Setup installation script. | ||
584 | The device drivers compilation options didn't work | ||
585 | properly. | ||
586 | |||
587 | o Update to the wpbackupd daemon. | ||
588 | Optimized the cross-over times, between the primary | ||
589 | link and the backup dialup. | ||
590 | |||
591 | beta3-2.2.1 Mar 02 2001 | ||
592 | o Patches for 2.4.2 kernel. | ||
593 | |||
594 | o Bug fixes to util/ make files. | ||
595 | o Bug fixes to the Setup installation script. | ||
596 | |||
597 | o Took out the backupd support and made it into | ||
598 | as separate package. | ||
599 | |||
600 | beta4-2.2.1 Mar 12 2001 | ||
601 | |||
602 | o Fix to the Frame Relay Device driver. | ||
603 | IPSAC sends a packet of zero length | ||
604 | header to the frame relay driver. The | ||
605 | driver tries to push its own 2 byte header | ||
606 | into the packet, which causes the driver to | ||
607 | crash. | ||
608 | |||
609 | o Fix the WANPIPE re-configuration code. | ||
610 | Bug was found by trying to run the cfgft1 while the | ||
611 | interface was already running. | ||
612 | |||
613 | o Updates to cfgft1. | ||
614 | Writes a wanpipe#.cfgft1 configuration file | ||
615 | once the CSU/DSU is configured. This file can | ||
616 | holds the current CSU/DSU configuration. | ||
617 | |||
618 | |||
619 | |||
620 | >>>>>> END OF README <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
621 | |||
622 | |||
diff --git a/Documentation/networking/wavelan.txt b/Documentation/networking/wavelan.txt new file mode 100644 index 000000000000..c1acf5eb3712 --- /dev/null +++ b/Documentation/networking/wavelan.txt | |||
@@ -0,0 +1,73 @@ | |||
1 | The Wavelan drivers saga | ||
2 | ------------------------ | ||
3 | |||
4 | By Jean Tourrilhes <jt@hpl.hp.com> | ||
5 | |||
6 | The Wavelan is a Radio network adapter designed by | ||
7 | Lucent. Under this generic name is hidden quite a variety of hardware, | ||
8 | and many Linux driver to support it. | ||
9 | The get the full story on Wireless LANs, please consult : | ||
10 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ | ||
11 | |||
12 | "wavelan" driver (old ISA Wavelan) | ||
13 | ---------------- | ||
14 | o Config : Network device -> Wireless LAN -> AT&T WaveLAN | ||
15 | o Location : .../drivers/net/wavelan* | ||
16 | o in-line doc : .../drivers/net/wavelan.p.h | ||
17 | o on-line doc : | ||
18 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html | ||
19 | |||
20 | This is the driver for the ISA version of the first generation | ||
21 | of the Wavelan, now discontinued. The device is 2 Mb/s, composed of a | ||
22 | Intel 82586 controller and a Lucent Modem, and is NOT 802.11 compliant. | ||
23 | The driver has been tested with the following hardware : | ||
24 | o Wavelan ISA 915 MHz (full length ISA card) | ||
25 | o Wavelan ISA 915 MHz 2.0 (half length ISA card) | ||
26 | o Wavelan ISA 2.4 GHz (full length ISA card, fixed frequency) | ||
27 | o Wavelan ISA 2.4 GHz 2.0 (half length ISA card, frequency selectable) | ||
28 | o Above cards with the optional DES encryption feature | ||
29 | |||
30 | "wavelan_cs" driver (old Pcmcia Wavelan) | ||
31 | ------------------- | ||
32 | o Config : Network device -> PCMCIA network -> | ||
33 | Pcmcia Wireless LAN -> AT&T/Lucent WaveLAN | ||
34 | o Location : .../drivers/net/pcmcia/wavelan* | ||
35 | o in-line doc : .../drivers/net/pcmcia/wavelan_cs.h | ||
36 | o on-line doc : | ||
37 | http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html | ||
38 | |||
39 | This is the driver for the PCMCIA version of the first | ||
40 | generation of the Wavelan, now discontinued. The device is 2 Mb/s, | ||
41 | composed of a Intel 82593 controller (totally different from the 82586) | ||
42 | and a Lucent Modem, and NOT 802.11 compatible. | ||
43 | The driver has been tested with the following hardware : | ||
44 | o Wavelan Pcmcia 915 MHz 2.0 (Pcmcia card + separate | ||
45 | modem/antenna block) | ||
46 | o Wavelan Pcmcia 2.4 GHz 2.0 (Pcmcia card + separate | ||
47 | modem/antenna block) | ||
48 | |||
49 | "wvlan_cs" driver (Wavelan IEEE, GPL) | ||
50 | ----------------- | ||
51 | o Config : Not yet in kernel | ||
52 | o Location : Pcmcia package 3.1.10+ | ||
53 | o on-line doc : http://www.fasta.fh-dortmund.de/users/andy/wvlan/ | ||
54 | |||
55 | This is the driver for the current generation of Wavelan IEEE, | ||
56 | which is 802.11 compatible. Depending on version, it is 2 Mb/s or 11 | ||
57 | Mb/s, with or without encryption, all implemented in Lucent specific | ||
58 | DSP (the Hermes). | ||
59 | This is a GPL full source PCMCIA driver (ISA is just a Pcmcia | ||
60 | card with ISA-Pcmcia bridge). | ||
61 | |||
62 | "wavelan2_cs" driver (Wavelan IEEE, binary) | ||
63 | -------------------- | ||
64 | o Config : Not yet in kernel | ||
65 | o Location : ftp://sourceforge.org/pcmcia/contrib/ | ||
66 | |||
67 | This driver support exactly the same hardware as the previous | ||
68 | driver, the main difference is that it is based on a binary library | ||
69 | and supported by Lucent. | ||
70 | |||
71 | I hope it clears the confusion ;-) | ||
72 | |||
73 | Jean | ||
diff --git a/Documentation/networking/x25-iface.txt b/Documentation/networking/x25-iface.txt new file mode 100644 index 000000000000..975cc87ebdd1 --- /dev/null +++ b/Documentation/networking/x25-iface.txt | |||
@@ -0,0 +1,123 @@ | |||
1 | X.25 Device Driver Interface 1.1 | ||
2 | |||
3 | Jonathan Naylor 26.12.96 | ||
4 | |||
5 | This is a description of the messages to be passed between the X.25 Packet | ||
6 | Layer and the X.25 device driver. They are designed to allow for the easy | ||
7 | setting of the LAPB mode from within the Packet Layer. | ||
8 | |||
9 | The X.25 device driver will be coded normally as per the Linux device driver | ||
10 | standards. Most X.25 device drivers will be moderately similar to the | ||
11 | already existing Ethernet device drivers. However unlike those drivers, the | ||
12 | X.25 device driver has a state associated with it, and this information | ||
13 | needs to be passed to and from the Packet Layer for proper operation. | ||
14 | |||
15 | All messages are held in sk_buff's just like real data to be transmitted | ||
16 | over the LAPB link. The first byte of the skbuff indicates the meaning of | ||
17 | the rest of the skbuff, if any more information does exist. | ||
18 | |||
19 | |||
20 | Packet Layer to Device Driver | ||
21 | ----------------------------- | ||
22 | |||
23 | First Byte = 0x00 | ||
24 | |||
25 | This indicates that the rest of the skbuff contains data to be transmitted | ||
26 | over the LAPB link. The LAPB link should already exist before any data is | ||
27 | passed down. | ||
28 | |||
29 | First Byte = 0x01 | ||
30 | |||
31 | Establish the LAPB link. If the link is already established then the connect | ||
32 | confirmation message should be returned as soon as possible. | ||
33 | |||
34 | First Byte = 0x02 | ||
35 | |||
36 | Terminate the LAPB link. If it is already disconnected then the disconnect | ||
37 | confirmation message should be returned as soon as possible. | ||
38 | |||
39 | First Byte = 0x03 | ||
40 | |||
41 | LAPB parameters. To be defined. | ||
42 | |||
43 | |||
44 | Device Driver to Packet Layer | ||
45 | ----------------------------- | ||
46 | |||
47 | First Byte = 0x00 | ||
48 | |||
49 | This indicates that the rest of the skbuff contains data that has been | ||
50 | received over the LAPB link. | ||
51 | |||
52 | First Byte = 0x01 | ||
53 | |||
54 | LAPB link has been established. The same message is used for both a LAPB | ||
55 | link connect_confirmation and a connect_indication. | ||
56 | |||
57 | First Byte = 0x02 | ||
58 | |||
59 | LAPB link has been terminated. This same message is used for both a LAPB | ||
60 | link disconnect_confirmation and a disconnect_indication. | ||
61 | |||
62 | First Byte = 0x03 | ||
63 | |||
64 | LAPB parameters. To be defined. | ||
65 | |||
66 | |||
67 | |||
68 | Possible Problems | ||
69 | ================= | ||
70 | |||
71 | (Henner Eisen, 2000-10-28) | ||
72 | |||
73 | The X.25 packet layer protocol depends on a reliable datalink service. | ||
74 | The LAPB protocol provides such reliable service. But this reliability | ||
75 | is not preserved by the Linux network device driver interface: | ||
76 | |||
77 | - With Linux 2.4.x (and above) SMP kernels, packet ordering is not | ||
78 | preserved. Even if a device driver calls netif_rx(skb1) and later | ||
79 | netif_rx(skb2), skb2 might be delivered to the network layer | ||
80 | earlier that skb1. | ||
81 | - Data passed upstream by means of netif_rx() might be dropped by the | ||
82 | kernel if the backlog queue is congested. | ||
83 | |||
84 | The X.25 packet layer protocol will detect this and reset the virtual | ||
85 | call in question. But many upper layer protocols are not designed to | ||
86 | handle such N-Reset events gracefully. And frequent N-Reset events | ||
87 | will always degrade performance. | ||
88 | |||
89 | Thus, driver authors should make netif_rx() as reliable as possible: | ||
90 | |||
91 | SMP re-ordering will not occur if the driver's interrupt handler is | ||
92 | always executed on the same CPU. Thus, | ||
93 | |||
94 | - Driver authors should use irq affinity for the interrupt handler. | ||
95 | |||
96 | The probability of packet loss due to backlog congestion can be | ||
97 | reduced by the following measures or a combination thereof: | ||
98 | |||
99 | (1) Drivers for kernel versions 2.4.x and above should always check the | ||
100 | return value of netif_rx(). If it returns NET_RX_DROP, the | ||
101 | driver's LAPB protocol must not confirm reception of the frame | ||
102 | to the peer. | ||
103 | This will reliably suppress packet loss. The LAPB protocol will | ||
104 | automatically cause the peer to re-transmit the dropped packet | ||
105 | later. | ||
106 | The lapb module interface was modified to support this. Its | ||
107 | data_indication() method should now transparently pass the | ||
108 | netif_rx() return value to the (lapb mopdule) caller. | ||
109 | (2) Drivers for kernel versions 2.2.x should always check the global | ||
110 | variable netdev_dropping when a new frame is received. The driver | ||
111 | should only call netif_rx() if netdev_dropping is zero. Otherwise | ||
112 | the driver should not confirm delivery of the frame and drop it. | ||
113 | Alternatively, the driver can queue the frame internally and call | ||
114 | netif_rx() later when netif_dropping is 0 again. In that case, delivery | ||
115 | confirmation should also be deferred such that the internal queue | ||
116 | cannot grow to much. | ||
117 | This will not reliably avoid packet loss, but the probability | ||
118 | of packet loss in netif_rx() path will be significantly reduced. | ||
119 | (3) Additionally, driver authors might consider to support | ||
120 | CONFIG_NET_HW_FLOWCONTROL. This allows the driver to be woken up | ||
121 | when a previously congested backlog queue becomes empty again. | ||
122 | The driver could uses this for flow-controlling the peer by means | ||
123 | of the LAPB protocol's flow-control service. | ||
diff --git a/Documentation/networking/x25.txt b/Documentation/networking/x25.txt new file mode 100644 index 000000000000..c91c6d7159ff --- /dev/null +++ b/Documentation/networking/x25.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | Linux X.25 Project | ||
2 | |||
3 | As my third year dissertation at University I have taken it upon myself to | ||
4 | write an X.25 implementation for Linux. My aim is to provide a complete X.25 | ||
5 | Packet Layer and a LAPB module to allow for "normal" X.25 to be run using | ||
6 | Linux. There are two sorts of X.25 cards available, intelligent ones that | ||
7 | implement LAPB on the card itself, and unintelligent ones that simply do | ||
8 | framing, bit-stuffing and checksumming. These both need to be handled by the | ||
9 | system. | ||
10 | |||
11 | I therefore decided to write the implementation such that as far as the | ||
12 | Packet Layer is concerned, the link layer was being performed by a lower | ||
13 | layer of the Linux kernel and therefore it did not concern itself with | ||
14 | implementation of LAPB. Therefore the LAPB modules would be called by | ||
15 | unintelligent X.25 card drivers and not by intelligent ones, this would | ||
16 | provide a uniform device driver interface, and simplify configuration. | ||
17 | |||
18 | To confuse matters a little, an 802.2 LLC implementation for Linux is being | ||
19 | written which will allow X.25 to be run over an Ethernet (or Token Ring) and | ||
20 | conform with the JNT "Pink Book", this will have a different interface to | ||
21 | the Packet Layer but there will be no confusion since the class of device | ||
22 | being served by the LLC will be completely separate from LAPB. The LLC | ||
23 | implementation is being done as part of another protocol project (SNA) and | ||
24 | by a different author. | ||
25 | |||
26 | Just when you thought that it could not become more confusing, another | ||
27 | option appeared, XOT. This allows X.25 Packet Layer frames to operate over | ||
28 | the Internet using TCP/IP as a reliable link layer. RFC1613 specifies the | ||
29 | format and behaviour of the protocol. If time permits this option will also | ||
30 | be actively considered. | ||
31 | |||
32 | A linux-x25 mailing list has been created at vger.kernel.org to support the | ||
33 | development and use of Linux X.25. It is early days yet, but interested | ||
34 | parties are welcome to subscribe to it. Just send a message to | ||
35 | majordomo@vger.kernel.org with the following in the message body: | ||
36 | |||
37 | subscribe linux-x25 | ||
38 | end | ||
39 | |||
40 | The contents of the Subject line are ignored. | ||
41 | |||
42 | Jonathan | ||
43 | |||
44 | g4klx@g4klx.demon.co.uk | ||
diff --git a/Documentation/networking/z8530drv.txt b/Documentation/networking/z8530drv.txt new file mode 100644 index 000000000000..2206abbc3e1b --- /dev/null +++ b/Documentation/networking/z8530drv.txt | |||
@@ -0,0 +1,657 @@ | |||
1 | This is a subset of the documentation. To use this driver you MUST have the | ||
2 | full package from: | ||
3 | |||
4 | Internet: | ||
5 | ========= | ||
6 | |||
7 | 1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz | ||
8 | |||
9 | 2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz | ||
10 | |||
11 | Please note that the information in this document may be hopelessly outdated. | ||
12 | A new version of the documentation, along with links to other important | ||
13 | Linux Kernel AX.25 documentation and programs, is available on | ||
14 | http://yaina.de/jreuter | ||
15 | |||
16 | ----------------------------------------------------------------------------- | ||
17 | |||
18 | |||
19 | SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 | ||
20 | |||
21 | ******************************************************************** | ||
22 | |||
23 | (c) 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de> | ||
24 | |||
25 | portions (c) 1993 Guido ten Dolle PE1NNZ | ||
26 | |||
27 | for the complete copyright notice see >> Copying.Z8530DRV << | ||
28 | |||
29 | ******************************************************************** | ||
30 | |||
31 | |||
32 | 1. Initialization of the driver | ||
33 | =============================== | ||
34 | |||
35 | To use the driver, 3 steps must be performed: | ||
36 | |||
37 | 1. if compiled as module: loading the module | ||
38 | 2. Setup of hardware, MODEM and KISS parameters with sccinit | ||
39 | 3. Attach each channel to the Linux kernel AX.25 with "ifconfig" | ||
40 | |||
41 | Unlike the versions below 2.4 this driver is a real network device | ||
42 | driver. If you want to run xNOS instead of our fine kernel AX.25 | ||
43 | use a 2.x version (available from above sites) or read the | ||
44 | AX.25-HOWTO on how to emulate a KISS TNC on network device drivers. | ||
45 | |||
46 | |||
47 | 1.1 Loading the module | ||
48 | ====================== | ||
49 | |||
50 | (If you're going to compile the driver as a part of the kernel image, | ||
51 | skip this chapter and continue with 1.2) | ||
52 | |||
53 | Before you can use a module, you'll have to load it with | ||
54 | |||
55 | insmod scc.o | ||
56 | |||
57 | please read 'man insmod' that comes with module-init-tools. | ||
58 | |||
59 | You should include the insmod in one of the /etc/rc.d/rc.* files, | ||
60 | and don't forget to insert a call of sccinit after that. It | ||
61 | will read your /etc/z8530drv.conf. | ||
62 | |||
63 | 1.2. /etc/z8530drv.conf | ||
64 | ======================= | ||
65 | |||
66 | To setup all parameters you must run /sbin/sccinit from one | ||
67 | of your rc.*-files. This has to be done BEFORE you can | ||
68 | "ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf | ||
69 | and sets the hardware, MODEM and KISS parameters. A sample file is | ||
70 | delivered with this package. Change it to your needs. | ||
71 | |||
72 | The file itself consists of two main sections. | ||
73 | |||
74 | 1.2.1 configuration of hardware parameters | ||
75 | ========================================== | ||
76 | |||
77 | The hardware setup section defines the following parameters for each | ||
78 | Z8530: | ||
79 | |||
80 | chip 1 | ||
81 | data_a 0x300 # data port A | ||
82 | ctrl_a 0x304 # control port A | ||
83 | data_b 0x301 # data port B | ||
84 | ctrl_b 0x305 # control port B | ||
85 | irq 5 # IRQ No. 5 | ||
86 | pclock 4915200 # clock | ||
87 | board BAYCOM # hardware type | ||
88 | escc no # enhanced SCC chip? (8580/85180/85280) | ||
89 | vector 0 # latch for interrupt vector | ||
90 | special no # address of special function register | ||
91 | option 0 # option to set via sfr | ||
92 | |||
93 | |||
94 | chip - this is just a delimiter to make sccinit a bit simpler to | ||
95 | program. A parameter has no effect. | ||
96 | |||
97 | data_a - the address of the data port A of this Z8530 (needed) | ||
98 | ctrl_a - the address of the control port A (needed) | ||
99 | data_b - the address of the data port B (needed) | ||
100 | ctrl_b - the address of the control port B (needed) | ||
101 | |||
102 | irq - the used IRQ for this chip. Different chips can use different | ||
103 | IRQs or the same. If they share an interrupt, it needs to be | ||
104 | specified within one chip-definition only. | ||
105 | |||
106 | pclock - the clock at the PCLK pin of the Z8530 (option, 4915200 is | ||
107 | default), measured in Hertz | ||
108 | |||
109 | board - the "type" of the board: | ||
110 | |||
111 | SCC type value | ||
112 | --------------------------------- | ||
113 | PA0HZP SCC card PA0HZP | ||
114 | EAGLE card EAGLE | ||
115 | PC100 card PC100 | ||
116 | PRIMUS-PC (DG9BL) card PRIMUS | ||
117 | BayCom (U)SCC card BAYCOM | ||
118 | |||
119 | escc - if you want support for ESCC chips (8580, 85180, 85280), set | ||
120 | this to "yes" (option, defaults to "no") | ||
121 | |||
122 | vector - address of the vector latch (aka "intack port") for PA0HZP | ||
123 | cards. There can be only one vector latch for all chips! | ||
124 | (option, defaults to 0) | ||
125 | |||
126 | special - address of the special function register on several cards. | ||
127 | (option, defaults to 0) | ||
128 | |||
129 | option - The value you write into that register (option, default is 0) | ||
130 | |||
131 | You can specify up to four chips (8 channels). If this is not enough, | ||
132 | just change | ||
133 | |||
134 | #define MAXSCC 4 | ||
135 | |||
136 | to a higher value. | ||
137 | |||
138 | Example for the BAYCOM USCC: | ||
139 | ---------------------------- | ||
140 | |||
141 | chip 1 | ||
142 | data_a 0x300 # data port A | ||
143 | ctrl_a 0x304 # control port A | ||
144 | data_b 0x301 # data port B | ||
145 | ctrl_b 0x305 # control port B | ||
146 | irq 5 # IRQ No. 5 (#) | ||
147 | board BAYCOM # hardware type (*) | ||
148 | # | ||
149 | # SCC chip 2 | ||
150 | # | ||
151 | chip 2 | ||
152 | data_a 0x302 | ||
153 | ctrl_a 0x306 | ||
154 | data_b 0x303 | ||
155 | ctrl_b 0x307 | ||
156 | board BAYCOM | ||
157 | |||
158 | An example for a PA0HZP card: | ||
159 | ----------------------------- | ||
160 | |||
161 | chip 1 | ||
162 | data_a 0x153 | ||
163 | data_b 0x151 | ||
164 | ctrl_a 0x152 | ||
165 | ctrl_b 0x150 | ||
166 | irq 9 | ||
167 | pclock 4915200 | ||
168 | board PA0HZP | ||
169 | vector 0x168 | ||
170 | escc no | ||
171 | # | ||
172 | # | ||
173 | # | ||
174 | chip 2 | ||
175 | data_a 0x157 | ||
176 | data_b 0x155 | ||
177 | ctrl_a 0x156 | ||
178 | ctrl_b 0x154 | ||
179 | irq 9 | ||
180 | pclock 4915200 | ||
181 | board PA0HZP | ||
182 | vector 0x168 | ||
183 | escc no | ||
184 | |||
185 | A DRSI would should probably work with this: | ||
186 | -------------------------------------------- | ||
187 | (actually: two DRSI cards...) | ||
188 | |||
189 | chip 1 | ||
190 | data_a 0x303 | ||
191 | data_b 0x301 | ||
192 | ctrl_a 0x302 | ||
193 | ctrl_b 0x300 | ||
194 | irq 7 | ||
195 | pclock 4915200 | ||
196 | board DRSI | ||
197 | escc no | ||
198 | # | ||
199 | # | ||
200 | # | ||
201 | chip 2 | ||
202 | data_a 0x313 | ||
203 | data_b 0x311 | ||
204 | ctrl_a 0x312 | ||
205 | ctrl_b 0x310 | ||
206 | irq 7 | ||
207 | pclock 4915200 | ||
208 | board DRSI | ||
209 | escc no | ||
210 | |||
211 | Note that you cannot use the on-board baudrate generator off DRSI | ||
212 | cards. Use "mode dpll" for clock source (see below). | ||
213 | |||
214 | This is based on information provided by Mike Bilow (and verified | ||
215 | by Paul Helay) | ||
216 | |||
217 | The utility "gencfg" | ||
218 | -------------------- | ||
219 | |||
220 | If you only know the parameters for the PE1CHL driver for DOS, | ||
221 | run gencfg. It will generate the correct port addresses (I hope). | ||
222 | Its parameters are exactly the same as the ones you use with | ||
223 | the "attach scc" command in net, except that the string "init" must | ||
224 | not appear. Example: | ||
225 | |||
226 | gencfg 2 0x150 4 2 0 1 0x168 9 4915200 | ||
227 | |||
228 | will print a skeleton z8530drv.conf for the OptoSCC to stdout. | ||
229 | |||
230 | gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 | ||
231 | |||
232 | does the same for the BAYCOM USCC card. In my opinion it is much easier | ||
233 | to edit scc_config.h... | ||
234 | |||
235 | |||
236 | 1.2.2 channel configuration | ||
237 | =========================== | ||
238 | |||
239 | The channel definition is divided into three sub sections for each | ||
240 | channel: | ||
241 | |||
242 | An example for scc0: | ||
243 | |||
244 | # DEVICE | ||
245 | |||
246 | device scc0 # the device for the following params | ||
247 | |||
248 | # MODEM / BUFFERS | ||
249 | |||
250 | speed 1200 # the default baudrate | ||
251 | clock dpll # clock source: | ||
252 | # dpll = normal half duplex operation | ||
253 | # external = MODEM provides own Rx/Tx clock | ||
254 | # divider = use full duplex divider if | ||
255 | # installed (1) | ||
256 | mode nrzi # HDLC encoding mode | ||
257 | # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM | ||
258 | # nrz = DF9IC 9k6 MODEM | ||
259 | # | ||
260 | bufsize 384 # size of buffers. Note that this must include | ||
261 | # the AX.25 header, not only the data field! | ||
262 | # (optional, defaults to 384) | ||
263 | |||
264 | # KISS (Layer 1) | ||
265 | |||
266 | txdelay 36 # (see chapter 1.4) | ||
267 | persist 64 | ||
268 | slot 8 | ||
269 | tail 8 | ||
270 | fulldup 0 | ||
271 | wait 12 | ||
272 | min 3 | ||
273 | maxkey 7 | ||
274 | idle 3 | ||
275 | maxdef 120 | ||
276 | group 0 | ||
277 | txoff off | ||
278 | softdcd on | ||
279 | slip off | ||
280 | |||
281 | The order WITHIN these sections is unimportant. The order OF these | ||
282 | sections IS important. The MODEM parameters are set with the first | ||
283 | recognized KISS parameter... | ||
284 | |||
285 | Please note that you can initialize the board only once after boot | ||
286 | (or insmod). You can change all parameters but "mode" and "clock" | ||
287 | later with the Sccparam program or through KISS. Just to avoid | ||
288 | security holes... | ||
289 | |||
290 | (1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not | ||
291 | present at all (BayCom). It feeds back the output of the DPLL | ||
292 | (digital pll) as transmit clock. Using this mode without a divider | ||
293 | installed will normally result in keying the transceiver until | ||
294 | maxkey expires --- of course without sending anything (useful). | ||
295 | |||
296 | 2. Attachment of a channel by your AX.25 software | ||
297 | ================================================= | ||
298 | |||
299 | 2.1 Kernel AX.25 | ||
300 | ================ | ||
301 | |||
302 | To set up an AX.25 device you can simply type: | ||
303 | |||
304 | ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7 | ||
305 | |||
306 | This will create a network interface with the IP number 44.128.20.107 | ||
307 | and the callsign "dl0tha". If you do not have any IP number (yet) you | ||
308 | can use any of the 44.128.0.0 network. Note that you do not need | ||
309 | axattach. The purpose of axattach (like slattach) is to create a KISS | ||
310 | network device linked to a TTY. Please read the documentation of the | ||
311 | ax25-utils and the AX.25-HOWTO to learn how to set the parameters of | ||
312 | the kernel AX.25. | ||
313 | |||
314 | 2.2 NOS, NET and TFKISS | ||
315 | ======================= | ||
316 | |||
317 | Since the TTY driver (aka KISS TNC emulation) is gone you need | ||
318 | to emulate the old behaviour. The cost of using these programs is | ||
319 | that you probably need to compile the kernel AX.25, regardless of whether | ||
320 | you actually use it or not. First setup your /etc/ax25/axports, | ||
321 | for example: | ||
322 | |||
323 | 9k6 dl0tha-9 9600 255 4 9600 baud port (scc3) | ||
324 | axlink dl0tha-15 38400 255 4 Link to NOS | ||
325 | |||
326 | Now "ifconfig" the scc device: | ||
327 | |||
328 | ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9 | ||
329 | |||
330 | You can now axattach a pseudo-TTY: | ||
331 | |||
332 | axattach /dev/ptys0 axlink | ||
333 | |||
334 | and start your NOS and attach /dev/ptys0 there. The problem is that | ||
335 | NOS is reachable only via digipeating through the kernel AX.25 | ||
336 | (disastrous on a DAMA controlled channel). To solve this problem, | ||
337 | configure "rxecho" to echo the incoming frames from "9k6" to "axlink" | ||
338 | and outgoing frames from "axlink" to "9k6" and start: | ||
339 | |||
340 | rxecho | ||
341 | |||
342 | Or simply use "kissbridge" coming with z8530drv-utils: | ||
343 | |||
344 | ifconfig scc3 hw ax25 dl0tha-9 | ||
345 | kissbridge scc3 /dev/ptys0 | ||
346 | |||
347 | |||
348 | 3. Adjustment and Display of parameters | ||
349 | ======================================= | ||
350 | |||
351 | 3.1 Displaying SCC Parameters: | ||
352 | ============================== | ||
353 | |||
354 | Once a SCC channel has been attached, the parameter settings and | ||
355 | some statistic information can be shown using the param program: | ||
356 | |||
357 | dl1bke-u:~$ sccstat scc0 | ||
358 | |||
359 | Parameters: | ||
360 | |||
361 | speed : 1200 baud | ||
362 | txdelay : 36 | ||
363 | persist : 255 | ||
364 | slottime : 0 | ||
365 | txtail : 8 | ||
366 | fulldup : 1 | ||
367 | waittime : 12 | ||
368 | mintime : 3 sec | ||
369 | maxkeyup : 7 sec | ||
370 | idletime : 3 sec | ||
371 | maxdefer : 120 sec | ||
372 | group : 0x00 | ||
373 | txoff : off | ||
374 | softdcd : on | ||
375 | SLIP : off | ||
376 | |||
377 | Status: | ||
378 | |||
379 | HDLC Z8530 Interrupts Buffers | ||
380 | ----------------------------------------------------------------------- | ||
381 | Sent : 273 RxOver : 0 RxInts : 125074 Size : 384 | ||
382 | Received : 1095 TxUnder: 0 TxInts : 4684 NoSpace : 0 | ||
383 | RxErrors : 1591 ExInts : 11776 | ||
384 | TxErrors : 0 SpInts : 1503 | ||
385 | Tx State : idle | ||
386 | |||
387 | |||
388 | The status info shown is: | ||
389 | |||
390 | Sent - number of frames transmitted | ||
391 | Received - number of frames received | ||
392 | RxErrors - number of receive errors (CRC, ABORT) | ||
393 | TxErrors - number of discarded Tx frames (due to various reasons) | ||
394 | Tx State - status of the Tx interrupt handler: idle/busy/active/tail (2) | ||
395 | RxOver - number of receiver overruns | ||
396 | TxUnder - number of transmitter underruns | ||
397 | RxInts - number of receiver interrupts | ||
398 | TxInts - number of transmitter interrupts | ||
399 | EpInts - number of receiver special condition interrupts | ||
400 | SpInts - number of external/status interrupts | ||
401 | Size - maximum size of an AX.25 frame (*with* AX.25 headers!) | ||
402 | NoSpace - number of times a buffer could not get allocated | ||
403 | |||
404 | An overrun is abnormal. If lots of these occur, the product of | ||
405 | baudrate and number of interfaces is too high for the processing | ||
406 | power of your computer. NoSpace errors are unlikely to be caused by the | ||
407 | driver or the kernel AX.25. | ||
408 | |||
409 | |||
410 | 3.2 Setting Parameters | ||
411 | ====================== | ||
412 | |||
413 | |||
414 | The setting of parameters of the emulated KISS TNC is done in the | ||
415 | same way in the SCC driver. You can change parameters by using | ||
416 | the kissparms program from the ax25-utils package or use the program | ||
417 | "sccparam": | ||
418 | |||
419 | sccparam <device> <paramname> <decimal-|hexadecimal value> | ||
420 | |||
421 | You can change the following parameters: | ||
422 | |||
423 | param : value | ||
424 | ------------------------ | ||
425 | speed : 1200 | ||
426 | txdelay : 36 | ||
427 | persist : 255 | ||
428 | slottime : 0 | ||
429 | txtail : 8 | ||
430 | fulldup : 1 | ||
431 | waittime : 12 | ||
432 | mintime : 3 | ||
433 | maxkeyup : 7 | ||
434 | idletime : 3 | ||
435 | maxdefer : 120 | ||
436 | group : 0x00 | ||
437 | txoff : off | ||
438 | softdcd : on | ||
439 | SLIP : off | ||
440 | |||
441 | |||
442 | The parameters have the following meaning: | ||
443 | |||
444 | speed: | ||
445 | The baudrate on this channel in bits/sec | ||
446 | |||
447 | Example: sccparam /dev/scc3 speed 9600 | ||
448 | |||
449 | txdelay: | ||
450 | The delay (in units of 10 ms) after keying of the | ||
451 | transmitter, until the first byte is sent. This is usually | ||
452 | called "TXDELAY" in a TNC. When 0 is specified, the driver | ||
453 | will just wait until the CTS signal is asserted. This | ||
454 | assumes the presence of a timer or other circuitry in the | ||
455 | MODEM and/or transmitter, that asserts CTS when the | ||
456 | transmitter is ready for data. | ||
457 | A normal value of this parameter is 30-36. | ||
458 | |||
459 | Example: sccparam /dev/scc0 txd 20 | ||
460 | |||
461 | persist: | ||
462 | This is the probability that the transmitter will be keyed | ||
463 | when the channel is found to be free. It is a value from 0 | ||
464 | to 255, and the probability is (value+1)/256. The value | ||
465 | should be somewhere near 50-60, and should be lowered when | ||
466 | the channel is used more heavily. | ||
467 | |||
468 | Example: sccparam /dev/scc2 persist 20 | ||
469 | |||
470 | slottime: | ||
471 | This is the time between samples of the channel. It is | ||
472 | expressed in units of 10 ms. About 200-300 ms (value 20-30) | ||
473 | seems to be a good value. | ||
474 | |||
475 | Example: sccparam /dev/scc0 slot 20 | ||
476 | |||
477 | tail: | ||
478 | The time the transmitter will remain keyed after the last | ||
479 | byte of a packet has been transferred to the SCC. This is | ||
480 | necessary because the CRC and a flag still have to leave the | ||
481 | SCC before the transmitter is keyed down. The value depends | ||
482 | on the baudrate selected. A few character times should be | ||
483 | sufficient, e.g. 40ms at 1200 baud. (value 4) | ||
484 | The value of this parameter is in 10 ms units. | ||
485 | |||
486 | Example: sccparam /dev/scc2 4 | ||
487 | |||
488 | full: | ||
489 | The full-duplex mode switch. This can be one of the following | ||
490 | values: | ||
491 | |||
492 | 0: The interface will operate in CSMA mode (the normal | ||
493 | half-duplex packet radio operation) | ||
494 | 1: Fullduplex mode, i.e. the transmitter will be keyed at | ||
495 | any time, without checking the received carrier. It | ||
496 | will be unkeyed when there are no packets to be sent. | ||
497 | 2: Like 1, but the transmitter will remain keyed, also | ||
498 | when there are no packets to be sent. Flags will be | ||
499 | sent in that case, until a timeout (parameter 10) | ||
500 | occurs. | ||
501 | |||
502 | Example: sccparam /dev/scc0 fulldup off | ||
503 | |||
504 | wait: | ||
505 | The initial waittime before any transmit attempt, after the | ||
506 | frame has been queue for transmit. This is the length of | ||
507 | the first slot in CSMA mode. In full duplex modes it is | ||
508 | set to 0 for maximum performance. | ||
509 | The value of this parameter is in 10 ms units. | ||
510 | |||
511 | Example: sccparam /dev/scc1 wait 4 | ||
512 | |||
513 | maxkey: | ||
514 | The maximal time the transmitter will be keyed to send | ||
515 | packets, in seconds. This can be useful on busy CSMA | ||
516 | channels, to avoid "getting a bad reputation" when you are | ||
517 | generating a lot of traffic. After the specified time has | ||
518 | elapsed, no new frame will be started. Instead, the trans- | ||
519 | mitter will be switched off for a specified time (parameter | ||
520 | min), and then the selected algorithm for keyup will be | ||
521 | started again. | ||
522 | The value 0 as well as "off" will disable this feature, | ||
523 | and allow infinite transmission time. | ||
524 | |||
525 | Example: sccparam /dev/scc0 maxk 20 | ||
526 | |||
527 | min: | ||
528 | This is the time the transmitter will be switched off when | ||
529 | the maximum transmission time is exceeded. | ||
530 | |||
531 | Example: sccparam /dev/scc3 min 10 | ||
532 | |||
533 | idle | ||
534 | This parameter specifies the maximum idle time in full duplex | ||
535 | 2 mode, in seconds. When no frames have been sent for this | ||
536 | time, the transmitter will be keyed down. A value of 0 is | ||
537 | has same result as the fullduplex mode 1. This parameter | ||
538 | can be disabled. | ||
539 | |||
540 | Example: sccparam /dev/scc2 idle off # transmit forever | ||
541 | |||
542 | maxdefer | ||
543 | This is the maximum time (in seconds) to wait for a free channel | ||
544 | to send. When this timer expires the transmitter will be keyed | ||
545 | IMMEDIATELY. If you love to get trouble with other users you | ||
546 | should set this to a very low value ;-) | ||
547 | |||
548 | Example: sccparam /dev/scc0 maxdefer 240 # 2 minutes | ||
549 | |||
550 | |||
551 | txoff: | ||
552 | When this parameter has the value 0, the transmission of packets | ||
553 | is enable. Otherwise it is disabled. | ||
554 | |||
555 | Example: sccparam /dev/scc2 txoff on | ||
556 | |||
557 | group: | ||
558 | It is possible to build special radio equipment to use more than | ||
559 | one frequency on the same band, e.g. using several receivers and | ||
560 | only one transmitter that can be switched between frequencies. | ||
561 | Also, you can connect several radios that are active on the same | ||
562 | band. In these cases, it is not possible, or not a good idea, to | ||
563 | transmit on more than one frequency. The SCC driver provides a | ||
564 | method to lock transmitters on different interfaces, using the | ||
565 | "param <interface> group <x>" command. This will only work when | ||
566 | you are using CSMA mode (parameter full = 0). | ||
567 | The number <x> must be 0 if you want no group restrictions, and | ||
568 | can be computed as follows to create restricted groups: | ||
569 | <x> is the sum of some OCTAL numbers: | ||
570 | |||
571 | 200 This transmitter will only be keyed when all other | ||
572 | transmitters in the group are off. | ||
573 | 100 This transmitter will only be keyed when the carrier | ||
574 | detect of all other interfaces in the group is off. | ||
575 | 0xx A byte that can be used to define different groups. | ||
576 | Interfaces are in the same group, when the logical AND | ||
577 | between their xx values is nonzero. | ||
578 | |||
579 | Examples: | ||
580 | When 2 interfaces use group 201, their transmitters will never be | ||
581 | keyed at the same time. | ||
582 | When 2 interfaces use group 101, the transmitters will only key | ||
583 | when both channels are clear at the same time. When group 301, | ||
584 | the transmitters will not be keyed at the same time. | ||
585 | |||
586 | Don't forget to convert the octal numbers into decimal before | ||
587 | you set the parameter. | ||
588 | |||
589 | Example: (to be written) | ||
590 | |||
591 | softdcd: | ||
592 | use a software dcd instead of the real one... Useful for a very | ||
593 | slow squelch. | ||
594 | |||
595 | Example: sccparam /dev/scc0 soft on | ||
596 | |||
597 | |||
598 | 4. Problems | ||
599 | =========== | ||
600 | |||
601 | If you have tx-problems with your BayCom USCC card please check | ||
602 | the manufacturer of the 8530. SGS chips have a slightly | ||
603 | different timing. Try Zilog... A solution is to write to register 8 | ||
604 | instead to the data port, but this won't work with the ESCC chips. | ||
605 | *SIGH!* | ||
606 | |||
607 | A very common problem is that the PTT locks until the maxkeyup timer | ||
608 | expires, although interrupts and clock source are correct. In most | ||
609 | cases compiling the driver with CONFIG_SCC_DELAY (set with | ||
610 | make config) solves the problems. For more hints read the (pseudo) FAQ | ||
611 | and the documentation coming with z8530drv-utils. | ||
612 | |||
613 | I got reports that the driver has problems on some 386-based systems. | ||
614 | (i.e. Amstrad) Those systems have a bogus AT bus timing which will | ||
615 | lead to delayed answers on interrupts. You can recognize these | ||
616 | problems by looking at the output of Sccstat for the suspected | ||
617 | port. If it shows under- and overruns you own such a system. | ||
618 | |||
619 | Delayed processing of received data: This depends on | ||
620 | |||
621 | - the kernel version | ||
622 | |||
623 | - kernel profiling compiled or not | ||
624 | |||
625 | - a high interrupt load | ||
626 | |||
627 | - a high load of the machine --- running X, Xmorph, XV and Povray, | ||
628 | while compiling the kernel... hmm ... even with 32 MB RAM ... ;-) | ||
629 | Or running a named for the whole .ampr.org domain on an 8 MB | ||
630 | box... | ||
631 | |||
632 | - using information from rxecho or kissbridge. | ||
633 | |||
634 | Kernel panics: please read /linux/README and find out if it | ||
635 | really occurred within the scc driver. | ||
636 | |||
637 | If you cannot solve a problem, send me | ||
638 | |||
639 | - a description of the problem, | ||
640 | - information on your hardware (computer system, scc board, modem) | ||
641 | - your kernel version | ||
642 | - the output of cat /proc/net/z8530 | ||
643 | |||
644 | 4. Thor RLC100 | ||
645 | ============== | ||
646 | |||
647 | Mysteriously this board seems not to work with the driver. Anyone | ||
648 | got it up-and-running? | ||
649 | |||
650 | |||
651 | Many thanks to Linus Torvalds and Alan Cox for including the driver | ||
652 | in the Linux standard distribution and their support. | ||
653 | |||
654 | Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org | ||
655 | AX-25 : DL1BKE @ DB0ABH.#BAY.DEU.EU | ||
656 | Internet: jreuter@yaina.de | ||
657 | WWW : http://yaina.de/jreuter | ||