From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 25 11:04:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09DD016A406 for ; Mon, 25 Feb 2008 11:04:20 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from mail.beenic.net (mail.beenic.net [83.246.72.40]) by mx1.freebsd.org (Postfix) with ESMTP id C12BE13C474 for ; Mon, 25 Feb 2008 11:04:19 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from [192.168.1.38] (a89-182-20-101.net-htp.de [89.182.20.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.beenic.net (Postfix) with ESMTP id 752A0A44529 for ; Mon, 25 Feb 2008 12:04:18 +0100 (CET) From: "Heiko Wundram (Beenic)" Organization: Beenic Networks GmbH To: freebsd-hackers@freebsd.org Date: Mon, 25 Feb 2008 12:04:42 +0100 User-Agent: KMail/1.9.7 References: <200802221558.42443.sharadc@in.niksun.com> <200802251039.59767.wundram@beenic.net> <200802251615.03040.sharadc@in.niksun.com> In-Reply-To: <200802251615.03040.sharadc@in.niksun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802251204.43070.wundram@beenic.net> Subject: Re: usleep 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: Mon, 25 Feb 2008 11:04:20 -0000 Am Montag, 25. Februar 2008 11:45:02 schrieb Sharad Chandra: > I got out-of-order captured packets on my starfire dual port card ie ack > get lower time-stamp than its corresponding seq in tcp traffic. I don't > have much nic card level knowledge, so decided to produce delay to send ack > and increase it till no out-of-order packet. delay in 1000 micro seconds or > above will not let me know the time difference figure. I am also searching > for what kind of scheduling this card do in picking the one of buffer by > time stamper and for what much time. Where should i look for these info? As I noted above: if it's just for a test program, try a busy loop calling gettimeofday (or I'd rather use clock_gettime(CLOCK_MONOTONIC), but checking clock_getres(CLOCK_MONOTONIC) if the resolution is actually high enough for your needs) repeatedly and comparing the times until the timeout is lower or equal to the current time. That should get you the timing resolution you need/want (mostly). Other than that, I'm not into NIC programming either, so I can't help you for the rest... -- Heiko Wundram Product & Application Development