From owner-freebsd-net@FreeBSD.ORG Tue Apr 22 10:22:27 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AFFE37B401; Tue, 22 Apr 2003 10:22:27 -0700 (PDT) Received: from relay.macomnet.ru (relay.macomnet.ru [195.128.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A757443F75; Tue, 22 Apr 2003 10:22:25 -0700 (PDT) (envelope-from maxim@macomnet.ru) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay.macomnet.ru (8.11.6/8.11.6) with ESMTP id h3MHMOR3932529; Tue, 22 Apr 2003 21:22:24 +0400 (MSD) Date: Tue, 22 Apr 2003 21:22:24 +0400 (MSD) From: Maxim Konovalov To: Don Lewis In-Reply-To: <200304221712.h3MHCTXB027263@gw.catspoiler.org> Message-ID: <20030422211839.D75980@news1.macomnet.ru> References: <200304221712.h3MHCTXB027263@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: IP fragmentation disagreement between current and stable X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2003 17:22:27 -0000 On 10:12-0700, Apr 22, 2003, Don Lewis wrote: > On 22 Apr, To: freebsd-net@freebsd.org wrote: > > > # ping -c 1 -s 3176 192.168.101.3 > > > If I increase the packet size by any multiple of 1480 bytes (which > > results in the same final fragment size), I see the same symptoms. > > Interestingly, I don't see any problems if I decrease the packet size by > > 1480 bytes to 1696, everything works just fine. > > I explored the vicinity of 3176 and found that 3174 works, 3175 through > 3177 don't work, and 3178 works. I'm smelling a packet length > calculation error. In the case of a 3176 byte ping, the final fragment > will contain 222 bytes of data. With a 14 byte Ethernet header and a 20 > byte IP header, that just fits into one 256 byte mbuf. I wonder if > there is a divide by 4 to calculate the number of words, and the > remainder is being discarded instead of being rounded up? And why does > this problem only occur if there are three or more fragments? > > Could this be a driver problem instead of a problem in the stack itself? > Both ends are fxp cards. can't reproduce with ref5.freebsd.org: stable# ping -c 1 -s 3176 ref5.freebsd.org PING ref5.freebsd.org (216.136.204.102): 3176 data bytes 3184 bytes from 216.136.204.102: icmp_seq=0 ttl=46 time=194.385 ms ref5$ netstat -s -p ip | grep frag 7496159 fragments received 0 fragments dropped (dup or out of space) 0 fragments dropped after timeout 38994 output datagrams fragmented 231719 fragments created 0 datagrams that can't be fragmented ref5$ netstat -s -p ip | grep frag 7496162 fragments received 0 fragments dropped (dup or out of space) 0 fragments dropped after timeout 38995 output datagrams fragmented 231722 fragments created 0 datagrams that can't be fragmented It got three fragments, defragmented them, sent icmp echo reply in three fragments. -- Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org