Date: Sat, 27 Oct 2001 00:51:04 +0100 From: Alex Bligh Reply-To: Alex Bligh To: linux-wlan-user@lists.linux-wlan.com cc: Alex Bligh Subject: TX MTU problems Prism2: >1492 byte packets not transmitted, on IBM T23 built in Prism 2.5 WLAN Bug summary: Inability to transmit packets > 1492 bytes on Prism 3873, wlan-ng-0.1.10, kernel 2.4.12-ac5 Bug details: Firstly I hope this bug report is less bogus than the last one. I have an IBM T23 laptop running linux 2.4.12-ac5 plus wlan-ng-0.1.10. I have several other machines on the LAN working fine. Attached to the aironet base station is a Cisco 2501. This fault appears when the 2501 communicates with the IBM /ONLY/ and not (for instance) other Linux machines with Aironet drivers, or Windows machines, all over the same LAN. The IBM seems to have a Harris/Intersil 3873 chipset, and indeed the Prism driver seems to find it correctly, via modprobe prism2_pci. The problem appears to be that the card/driver will not TRANSMIT packets between 1493 and 1500 (inclusive) bytes in length. This is not sensible as its default MTU is 1500 bytes. As packets > 1500 bytes are fragmented, with all but the last fragment having length 1500, this means that packets larger than 1492 bytes are never transmitted, fragmented or otherwise. I tested this by setting up a sweep ping from the cisco router (dump attached). In essence, I first did a sweep to a working machine, first with DF (don't fragment) set, then without, in order to verify that the ICMP packet size reported was indeed the true payload size. As expected, with DF set, the sweep stopped 52 packets in (I was sweeping from 1450 to 1550 bytes), indicating that packets of size 1501 could not be sent (remember packet 1 is 1450), but packets of size 1500 could be sent. Without DF set, of course, all packets got through as they were fragmented. I then reran the sweep test against the wlan-ng / Prism combination on the IBM. When running with DF set, the sweep stopped 44 packets in, i.e. the packet of length 1492 was the last successful size sent, and 1493 byte packets were not sent successfully. No other packets arrived. Without DF set, the sweep stopped in the same place. This leaves 2 possibilities: firstly that the Prism card was not receiving packets > 1492 bytes in length, or secondly that it was not transmitting them. Analysis of the ethernet segment showed that, on the non-DF test, the Cisco router was receiving ONLY the second fragment of the ICMP reply from the prism box (which was small) and not the 1500 byte first segment (this implies of course that the prism was receiving the entire echo response packet). This was verified as the Cisco correctly generated fragment reassembly ICMP errors which were passed back and received by the Linux box. Therefore I conclude that the Prism card or driver cannot transmit >1492 byte packets. To test this theory, I reduced the mtu on wlan0 (ifconfig wlan0 mtu 1492) without changing the MTU on the Cisco. This means that the Cisco will blindly send packets >1492 bytes (up to 1500) to the prism unit, but the prism unit will fragment above this. Under these circumstances the sweep was successfull at all ping sizes with DF not set. I have read through the code as much as much as I can understand, and I am slightly confused by the following line in p80211knetdev_hard_start_xmit pb->ethbuflen = skb->len > 1514 ? 1514 : skb->len; Where does the magical figure 14 come from? I enclose details such I expect may be useful Alex Bligh lspci shows: 02:02.0 Network controller: Harris Semiconductor: Unknown device 3873 (rev 01) Subsystem: Action Tec Electronics Inc: Unknown device 0406 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- 1492 bytes] Ping to a failing host (prism2) from router, fragmentation IS allowed amb#ping Protocol [ip]: Target IP address: 195.224.237.76 Repeat count [5]: Datagram size [100]: 1450 Timeout in seconds [2]: Extended commands [n]: y Source address or interface: Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: yes Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: y Sweep min size [36]: 1450 Sweep max size [18024]: 1550 Sweep interval [1]: Type escape sequence to abort. Sending 505, [1450..1550]-byte ICMP Echos to 195.224.237.76, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!........................... ......... Success rate is 54 percent (43/79), round-trip min/avg/max = 12/12/16 ms amb# Ping to a failing host, fragmentation allowed, source host (router) still configured to normal MTU, failing host (prism) configured down from MTU 1500 to MTU 1492 amb#ping Protocol [ip]: Target IP address: 195.224.237.76 Repeat count [5]: Datagram size [100]: 1450 Timeout in seconds [2]: Extended commands [n]: Sweep range of sizes [n]: y Sweep min size [36]: 1450 Sweep max size [18024]: 1550 Sweep interval [1]: Type escape sequence to abort. Sending 505, [1450..1550]-byte ICMP Echos to 195.224.237.76, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!! Success rate is 100 percent (505/505), round-trip min/avg/max = 8/14/20 ms amb# This rather suggests that the prism card is incapable of sending large packets.