From owner-freebsd-net@FreeBSD.ORG Tue Mar 21 17:36:19 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 987D516A422 for ; Tue, 21 Mar 2006 17:36:19 +0000 (UTC) (envelope-from bms@spc.org) Received: from mindfull.spc.org (mindfull.spc.org [83.167.185.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C8CA43D45 for ; Tue, 21 Mar 2006 17:36:15 +0000 (GMT) (envelope-from bms@spc.org) Received: from arginine.spc.org ([83.167.185.2]) by mindfull.spc.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52) id 1FLkmA-0008CZ-Tc; Tue, 21 Mar 2006 17:36:10 +0000 Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id D70CA65499; Tue, 21 Mar 2006 17:36:08 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 79192-03-2; Tue, 21 Mar 2006 17:36:08 +0000 (GMT) Received: by arginine.spc.org (Postfix, from userid 1078) id DFCB9653F9; Tue, 21 Mar 2006 17:36:07 +0000 (GMT) Date: Tue, 21 Mar 2006 17:36:07 +0000 From: Bruce M Simpson To: Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= Message-ID: <20060321173607.GS37590@spc.org> Mail-Followup-To: Bruce M Simpson , Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= , freebsd-net@freebsd.org References: <441F6FE0.80108@wm-access.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <441F6FE0.80108@wm-access.no> User-Agent: Mutt/1.4.1i Organization: Incunabulum Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - mindfull.spc.org X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - spc.org X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-net@freebsd.org Subject: Re: How can i detect if a received UDP got fragmented from userland? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Mar 2006 17:36:19 -0000 On Tue, Mar 21, 2006 at 04:15:44AM +0100, Sten Daniel S=F8rsdal wrote: > Our first assumption was that adding DF to UDP would solve it, and it > does in our small tests, but it has a noticable negative effect on the=20 > network. Sounds like you need to implement Path MTU Discovery in userland for your application. In FreeBSD, PMTU-D only happens in the kernel for TCP traffi= c. So you would need to implement it yourself to avoid fragmentation along the path. > Are there any way i can read whether a message's packet was fragmented=20 > into smaller pieces and preferably how large the largest fragment was? I think the MSG_TRUNC flag can tell you about this (data discarded before delivery). You'd have to experiment to see if UDP will set this flag, I'm not sure if it will. > Are there any feasible way to do this? I don't think it would be feasible to report this per datagram. Take a look at Ping Pan's paper on PF_IPOPTION if you wish to explore further. Regards, BMS