From owner-cvs-src@FreeBSD.ORG Sat Aug 23 02:34:13 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425E8106566B for ; Sat, 23 Aug 2008 02:34:13 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.239]) by mx1.freebsd.org (Postfix) with ESMTP id 096398FC0C for ; Sat, 23 Aug 2008 02:34:12 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1239200rvf.43 for ; Fri, 22 Aug 2008 19:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ncqJ0ur3Wgb1DeLxBUIDQzg2N8IRD/otLarD0AP+6Sk=; b=O0YJiSjD676cSPXFd1l9cQIoaJpcBJq1zdAS8W2/wx+H1Dn5WbLiMyQXPyRAVoRdc8 XUPeHuD/cs60JtOupLEiJNciEGbSRiJvhhWjnJqXyTbBCDLiQO8k6Ifhvcly9lRSm0uU cY5p95FsCFJVlAdcSNR3bQkNoZQXu4p58qb0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=vm7V8dZ7Zv0zjY/FHGhb0mHs0ejlH3Q1KvY2WrPp8tH7sVgZnT8rZz1/eCBciBjwgy M7sbcMb/ZNyYeYqC0gukYB1FCljZ27aWa8jjn5cYNFfD/k1gAJanby9H8V+dnSsB9T1D jRESrFiSfEDTizPeg9PXPCqeuWq0yWRWPmbjQ= Received: by 10.140.133.10 with SMTP id g10mr873518rvd.170.1219458852317; Fri, 22 Aug 2008 19:34:12 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id b8sm2930924rvf.4.2008.08.22.19.34.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Aug 2008 19:34:11 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m7N2Y6l8010057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Aug 2008 11:34:06 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m7N2Y6oN010056; Sat, 23 Aug 2008 11:34:06 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Sat, 23 Aug 2008 11:34:06 +0900 From: Pyun YongHyeon To: John Baldwin Message-ID: <20080823023406.GC9758@cdnetworks.co.kr> References: <200808220647.m7M6lAeL097786@repoman.freebsd.org> <200808221420.28017.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808221420.28017.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Pyun YongHyeon Subject: Re: cvs commit: src/sys/dev/bfe if_bfe.c if_bfereg.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 02:34:13 -0000 On Fri, Aug 22, 2008 at 02:20:27PM -0400, John Baldwin wrote: > On Friday 22 August 2008 02:46:55 am Pyun YongHyeon wrote: > > yongari 2008-08-22 06:46:55 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/dev/bfe if_bfe.c if_bfereg.h > > Log: > > SVN rev 181994 on 2008-08-22 06:46:55Z by yongari > > > > Add a new sysctl node 'dev.bfe.N.stats' that shows various MAC > > counters for Rx/Tx statistics. Various counters in ifnet is also > > updated with these hardware counters. > > > > Tested by: kib, Gleb Kurtsou gleb.kurtsou at gmail dot com > > Ulrich Spoerlein uspoerlein at gmail dot com > > I think it's kind of wrong to have sysctl's that print stats in dmesg. You > can either have a sysctl that returns a string and uses sbuf's (e.g. > vm.phys_free) if you want formatting or even better, you can give each stat > it's own sysctl. This is more friendly for people to use when they aren't on > the console (e.g. when you ssh into a box). > I fully agree. Spewing lots of message in dmesg would be wong, especially on slow serial link. I thought these counters would be just used to analyze driver bug or odd driver behavior. It was just for debugging. For long time I wanted a architectural way to add these kind of counters in ethernet drivers. Adding a sysctl node for each counter looked like overkilling at that time and we still don't have a generic tool to dump the stats. I'll think about it again. -- Regards, Pyun YongHyeon