From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [PATCH 4/5] ib/core: add support for extended performance counters in sysfs Date: Tue, 20 Dec 2011 14:03:31 +0200 Message-ID: <4EF07993.2090900@mellanox.com> References: <20111101162218.GA10710@obsidianresearch.com> <20111101173625.GH26974@obsidianresearch.com> <20111101183730.GI26974@obsidianresearch.com> <4EB17AF9.3000608@mellanox.com> <20111108010952.GC4934@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111108010952.GC4934-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe Cc: Roland Dreier , linux-rdma List-Id: linux-rdma@vger.kernel.org On 11/8/2011 3:09 AM, Jason Gunthorpe wrote: > Roland Dreier wrote: >> >> Let's make sure we learn from our mistakes. Let's say we create a >> new "ext_counters" directory. What should the format of those files >> be? Should they be assumed to be 64-bit quantities? Do we want to >> allow some way of indicating the number of bits (ie 0-padded hex >> entries?)? > > That is a good idea. Let's require counters_ext to be sane: > > 1 Hex quantity of unspecified size > 2 Prefixed with 0x and leading zeros to fill out to size and allow > userspace discovery of size > 3 Size must be a multiple of 4 bits. > 4 Counters do not saturate > 5 Counters wrap around at all F's back to 0. > 6 If the counter is resettable it is only via a local operation > through netlink or sysfs or something. Not PMA reset. > > Certainly, aside from some minor details and different string > formatting, the 64 bit counters Or proposes to add meet these > requirements when the port is used in Ethernet mode. Jason, in an earlier post of yours you mentioned the netdev counters as something we should be following, well, I took a look - the counters are read-only (see /sys/class/net/$DEV/statistics/*) they are displayed in decimal/non-padded manner (see /sys/class/net/$DEV/statistics/* or /proc/net/dev or ifconfig and friends) Roland, I'd like to re-format these patches for 3.3, will be glad to hear what you would like to see here, > How do you feel about having counters_ext appear in ethernet mode and > disappear in IB mode? I think I'm fine with that, IB has its own MAD based means to query these counters. Or. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html