From owner-svn-src-all@FreeBSD.ORG Mon Feb 11 02:48:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5BEF1882; Mon, 11 Feb 2013 02:48:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 44B5913B; Mon, 11 Feb 2013 02:48:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1B2mowl013302; Mon, 11 Feb 2013 02:48:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1B2mnlE013297; Mon, 11 Feb 2013 02:48:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201302110248.r1B2mnlE013297@svn.freebsd.org> From: Adrian Chadd Date: Mon, 11 Feb 2013 02:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246648 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 02:48:50 -0000 Author: adrian Date: Mon Feb 11 02:48:49 2013 New Revision: 246648 URL: http://svnweb.freebsd.org/changeset/base/246648 Log: Extend the timestamp to be a timeval, rather than ticks. This makes it easier to see TX and RX buffer latencies. Modified: head/sys/dev/ath/if_ath_alq.c head/sys/dev/ath/if_ath_alq.h Modified: head/sys/dev/ath/if_ath_alq.c ============================================================================== --- head/sys/dev/ath/if_ath_alq.c Mon Feb 11 02:15:26 2013 (r246647) +++ head/sys/dev/ath/if_ath_alq.c Mon Feb 11 02:48:49 2013 (r246648) @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -153,10 +154,13 @@ if_ath_alq_post(struct if_ath_alq *alq, { struct if_ath_alq_hdr *ap; struct ale *ale; + struct timeval tv; if (! if_ath_alq_checkdebug(alq, op)) return; + microtime(&tv); + /* * Enforce some semblence of sanity on 'len'. * Although strictly speaking, any length is possible - @@ -172,7 +176,8 @@ if_ath_alq_post(struct if_ath_alq *alq, ap = (struct if_ath_alq_hdr *) ale->ae_data; ap->threadid = htobe64((uint64_t) curthread->td_tid); - ap->tstamp = htobe32((uint32_t) ticks); + ap->tstamp_sec = htobe32((uint32_t) tv.tv_sec); + ap->tstamp_usec = htobe32((uint32_t) tv.tv_usec); ap->op = htobe16(op); ap->len = htobe16(len); Modified: head/sys/dev/ath/if_ath_alq.h ============================================================================== --- head/sys/dev/ath/if_ath_alq.h Mon Feb 11 02:15:26 2013 (r246647) +++ head/sys/dev/ath/if_ath_alq.h Mon Feb 11 02:48:49 2013 (r246648) @@ -116,7 +116,8 @@ struct if_ath_alq { struct if_ath_alq_hdr { uint64_t threadid; - uint32_t tstamp; + uint32_t tstamp_sec; + uint32_t tstamp_usec; uint16_t op; uint16_t len; /* Length of (optional) payload */ };