From owner-freebsd-net@FreeBSD.ORG Thu Nov 29 04:35:48 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E7543DB for ; Thu, 29 Nov 2012 04:35:48 +0000 (UTC) (envelope-from ksramanujan@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 450448FC08 for ; Thu, 29 Nov 2012 04:35:48 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id n2so4349824dad.13 for ; Wed, 28 Nov 2012 20:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=58IGZcgLZURW0c0cuXub1fcSQBfOWwrY8YoMtFWT3qQ=; b=SsIIOezK1VBMhCduaXyrsDD2j1ZwBoEMaPaWoa3mdHtmDri8ndueaQOJKfm86eSu8o D9BNkel66HTa6HKe8449pcRrNgGKEg/gei/CSiVQDovfRV2fIcWRydC9NBUZS7GtzOgG YB/uQFqaAjQoTw+JTWJmBB7JLZej/zxOSc7UqubGJQJ9SYHcPO50hJZlse4kACptX1BD RTWwezX0eR1TEBD/5tzCxLa9IGLNB5WFAqQj6M8gsLYBW8kfn4dEO1+PbTHLWaM8e5g4 EyTgDVujt8QBjxPr32WC9a7m11uve0UsnnmnWcl67S/oXoug6bfmtJB6FkihA6UONKfK u/rQ== MIME-Version: 1.0 Received: by 10.68.224.8 with SMTP id qy8mr63818082pbc.88.1354163747844; Wed, 28 Nov 2012 20:35:47 -0800 (PST) Received: by 10.66.222.132 with HTTP; Wed, 28 Nov 2012 20:35:47 -0800 (PST) In-Reply-To: References: Date: Wed, 28 Nov 2012 23:35:47 -0500 Message-ID: Subject: Re: Ralink RT2860 Driver Code From: Ramanujan Seshadri To: PseudoCylon Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 04:35:48 -0000 Hello, Thanks for the reply. I just had one more doubt. In the counters to update the transmitted A-MPDU counter (Function Name: NICUpdateRawCounters), i saw these lines of codes pRalinkCounters->TransmittedAMPDUCount.u.LowPart += TxAggCnt0.field.AggSize1Count; pRalinkCounters->TransmittedAMPDUCount.u.LowPart += (TxAggCnt0.field.AggSize2Count >> 1); pRalinkCounters->TransmittedAMPDUCount.u.LowPart += (TxAggCnt0.field.AggSize3Count /3); . . . . pRalinkCounters->TransmittedAMPDUCount.u.LowPart += (TxAggCnt0.field.AggSize15Count/ 15); pRalinkCounters->TransmittedAMPDUCount.u.LowPart += (TxAggCnt0.field.AggSize16Count >> 4); Can you please explain the reason why the 'i'th counter is being divided by i, for example .TxAggCnt0.field.AggSize*15*Count is being divided by *15.* Also if these were little endian counters then i could not understand the reason why the four counters "TxAggCnt0.field.AggSize2Count, TxAggCnt0.field.AggSize4Count, TxAggCnt0.field.AggSize8Count and TxAggCnt0.field.AggSize16Count " are shifted right by some bits, which means that they are multiplying them (since it is little endian registers) and why they are dividing the others. Thanks for the help. -ram On Tue, Nov 27, 2012 at 6:07 PM, PseudoCylon wrote: > On Tue, Nov 27, 2012 at 1:23 PM, Ramanujan Seshadri > wrote: > > I want to know how many MPDU's are aggregated in each AMPDU transmission. > > You could use following statistic counters > RT2860_TX_AGG_CNT0 to 7 > > https://gitorious.org/run/run/blobs/11n_rc3/dev/usb/wlan/if_runreg.h#line186 > Each 32-bit little-endian read-on-clear register contains 2 16-bit > counters (total 16 16-bit counters). > counter at offset 0x1720 MPDU count 1 > counter at offset 0x1722 MPDU count 2 > ... > counter at offset 0x173c MPDU count 15 > counter at offset 0x173e MPDU count >= 16 > > These regs are identical on RT2800 and RT2700 (pci/usb). > > Example (see #if 0 part) > https://gitorious.org/run/run/blobs/11n_rc3/dev/usb/wlan/if_run.c#line2493 > > You can only find out statistical numbers (total Tx counts past X > sec). You cannot find out an MPDU count in a particular packet, i.e. > an aggregated packet just Tx'd, unless you read the counters on each > Tx. > > > AK > > > > > -ram > > > > > > On Tue, Nov 27, 2012 at 2:11 PM, PseudoCylon > > wrote: > >> > >> > ------------------------------ > >> > > >> > Message: 12 > >> > Date: Tue, 27 Nov 2012 04:33:37 -0500 > >> > From: Ramanujan Seshadri > >> > To: freebsd-net@freebsd.org > >> > Subject: Ralink RT2860 Driver Code > >> > Message-ID: > >> > > >> > > >> > Content-Type: text/plain; charset=ISO-8859-1 > >> > > >> > Hello, > >> > Can i know how to get the MPDU's aggregated in each AMPDU in a > ralink > >> > driver code for RT2860. I saw the existing counters of ralink and > tried > >> > to > >> > get some info, but was not very useful. > >> > Any help is greatly appreciated. > >> > > >> > >> https://gitorious.org/run/run/trees/11n_rc3/dev/usb/wlan > >> > >> What info are you trying to get? > >> > >> > >> AK > >> > >> > Thanks > >> > ram > >> > > >> > > >> > ------------------------------ > >> > > >> > _______________________________________________ > >> > freebsd-net@freebsd.org mailing list > >> > http://lists.freebsd.org/mailman/listinfo/freebsd-net > >> > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org > " > >> > > >> > End of freebsd-net Digest, Vol 504, Issue 2 > >> > ******************************************* > > > > >