From owner-freebsd-net@FreeBSD.ORG Tue Mar 21 08:12:14 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 8077F16A400 for ; Tue, 21 Mar 2006 08:12:14 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C54DA43D45 for ; Tue, 21 Mar 2006 08:12:13 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 48227 invoked from network); 21 Mar 2006 08:08:25 -0000 Received: from c00l3r.networx.ch (HELO freebsd.org) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 21 Mar 2006 08:08:25 -0000 Message-ID: <441FB565.BA3628B3@freebsd.org> Date: Tue, 21 Mar 2006 09:12:21 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= References: <441F6FE0.80108@wm-access.no> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 08:12:14 -0000 Sten Daniel Sørsdal wrote: > > I am currently working on a udp multicast application written in C for > FreeBSD (6.x) > > For our test cases in many different network types we found that > fragmentation poses as a significant problem for quality and reliability. > Packets that get fragmented are more likely to get dropped than > packets that do not get fragmented and since our application needs high > bulk performance without retransmissions we believe our application and > the network would benefit from this. > 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 > network. > Are there any way i can read whether a message's packet was fragmented > into smaller pieces and preferably how large the largest fragment was? > Are there any feasible way to do this? No. There is no way to know from userland if a packet was fragmented. In theory you can infere this from the size of the rcvmsg() you do. If it is larger than your local MTU it must have been fragemented. This doesn't allow you to find out if the path from source to receiver has a lower MTU somewhere however. There you can only do path MTU discovery. -- Andre