From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 15 21:25:01 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B57A16A416 for ; Fri, 15 Dec 2006 21:25:01 +0000 (UTC) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CAF143C9D for ; Fri, 15 Dec 2006 21:23:17 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 4F656C283; Fri, 15 Dec 2006 16:23:35 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 13B094AC2D; Fri, 15 Dec 2006 16:23:37 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17795.4696.998145.337454@canoe.dclg.ca> Date: Fri, 15 Dec 2006 16:23:36 -0500 To: freebsd-hackers@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid Subject: Detecting buffer space with UDP. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2006 21:25:01 -0000 I'm using kqueue() with a EVFILT_WRITE to send udp packets over a gigabit interface (the job here is to stress test DNS servers). I'd like to send packets at wire rates, but somehow the EVFILT_WRITE is always triggered and I'm dropping a lot of packets on the floor. Is there a way (preferably with kqueue()) to wait on the bandwidth available on the card? Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================