From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 8A06BB0C2 for ; Tue, 6 May 2014 13:04:29 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1WhdAm-0000WO-8y; Tue, 06 May 2014 07:04:34 -0400 Date: Tue, 6 May 2014 07:04:30 -0400 From: Neil Horman To: Stephen Hemminger Message-ID: <20140506110430.GA2858@hmsreliant.think-freely.org> References: <20140502234251.707598579@vyatta.com> <20140502234407.841791092@vyatta.com> <20140504122053.GA5012@localhost.localdomain> <20140504131750.45409335@nehalam.linuxnetplumber.net> <20140505105309.GD16114@hmsreliant.think-freely.org> <20140505185531.4dbd94d4@nehalam.linuxnetplumber.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140505185531.4dbd94d4@nehalam.linuxnetplumber.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 5/5] add FILE arguement to debug functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2014 11:04:30 -0000 On Mon, May 05, 2014 at 06:55:31PM -0700, Stephen Hemminger wrote: > On Mon, 5 May 2014 06:53:09 -0400 > Neil Horman wrote: > > > On Sun, May 04, 2014 at 01:17:50PM -0700, Stephen Hemminger wrote: > > > On Sun, 4 May 2014 08:20:54 -0400 > > > Neil Horman wrote: > > > > > > > On Fri, May 02, 2014 at 04:42:56PM -0700, Stephen Hemminger wrote: > > > > > The DPDK dump functions are useful for remote debugging of an > > > > > applications. But when application runs as a daemon, stdout > > > > > is typically routed to /dev/null. > > > > > > > > > > Instead change all these functions to take a stdio FILE * handle > > > > > instead. An application can then use open_memstream() to capture > > > > > the output. > > > > > > > > > > Signed-off-by: Stephen Hemminger > > > > > > > > > Why not convert these to rte_log calls? Seems like we already have the > > > > infrastrucutre here, we just need to use it. > > > > Neil > > > > > > > > > > Because it is useful to have remote console like functionatlity, > > > and dumping this to log doesn't work for that. > > > > > Why not? Looking at it it seems to me that you could get this exact same > > functionality by calling rte_openlog_stream(stdout); > > > > Neil > > > > If you have a remote console (per connection) and a thread handling > those requests you want to direct output of a command like 'show mempool' > to respond to that request. An existing file descriptor don't work they are global > no per thread. There is a difference between log and response to request. > ah, sorry, wasn't considering the multiuser case Neil >