From owner-freebsd-net Wed Feb 7 12: 9:28 2001 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 7F62337B503 for ; Wed, 7 Feb 2001 12:09:05 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id PAA46020; Wed, 7 Feb 2001 15:09:03 -0500 (EST) (envelope-from wollman) Date: Wed, 7 Feb 2001 15:09:03 -0500 (EST) From: Garrett Wollman Message-Id: <200102072009.PAA46020@khavrinen.lcs.mit.edu> To: Luigi Rizzo Cc: wollman@khavrinen.lcs.mit.edu (Garrett Wollman), bright@wintelcom.net, net@FreeBSD.ORG Subject: Re: send problem on udp socket... In-Reply-To: <200102071923.f17JNmH77765@iguana.aciri.org> References: <200102071919.OAA45590@khavrinen.lcs.mit.edu> <200102071923.f17JNmH77765@iguana.aciri.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > on a similar subject (UDP sockets), i notice that > socket buffers do not have a pointer to the end of > the queued mbufs, so sbappend*() routines have to scan the > list of queued bufs. As you can imagine this is > causing some nasty effect when a receiver is slow. I've thought about this problem before, in the context of a TCP sender, where the best solution is both (a) hard and (b) significantly different. I had not thought about it in the case of UDP, but yes, that could be a significant issue, particularly since UDP packets on the receive queue can never be coalesced (so there's DoS potential). I think adding a (sort of) tail pointer to the socket buffer might be helpful. I think you want it to point to the mbuf before the last *record* in the socket buffer, in order for sbcompress() to do its work, which means that you may still have to traverse a chain of mbufs (hopefully just not as many). -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message