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 E87AD7DF7 for ; Thu, 25 Dec 2014 18:30:46 +0100 (CET) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Y4CFH-0004JR-EN; Thu, 25 Dec 2014 12:30:45 -0500 Date: Thu, 25 Dec 2014 12:30:41 -0500 From: Neil Horman To: Ravi Kerur Message-ID: <20141225173041.GD3199@localhost.localdomain> References: <1419521597-31978-1-git-send-email-rkerur@gmail.com> <1419521597-31978-3-git-send-email-rkerur@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1419521597-31978-3-git-send-email-rkerur@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 2/7] Move EAL common 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: Thu, 25 Dec 2014 17:30:47 -0000 On Thu, Dec 25, 2014 at 10:33:12AM -0500, Ravi Kerur wrote: > eal_debug.c has no difference between Linux and BSD, move > into common directory. > Rename eal_debug.c to eal_common_debug.c > Makefile changes to reflect file move and name change. > Fix checkpatch warnings. > > Signed-off-by: Ravi Kerur > + > +/* not implemented in this environment */ > +void rte_dump_registers(void) > +{ > +} Clearly this function has no use, instead of keeping it around, can you please remove it until someone works up the gumption to make it do something. We're just wasting an extra call instruction here so someone doesn't have to write a prototype in the future. I don't see the value. > +/* > + * Like rte_panic this terminates the application. However, no traceback is > + * provided and no core-dump is generated. > + */ > +void > +rte_exit(int exit_code, const char *format, ...) > +{ > + va_list ap; > + > + /* disable history */ > + rte_log_set_history(0); > + > + if (exit_code != 0) > + RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\n" > + " Cause: ", exit_code); > + > + va_start(ap, format); > + rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); > + va_end(ap); > + > +#ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR > + exit(exit_code); > +#else > + rte_dump_stack(); > + rte_dump_registers(); > + abort(); > +#endif This doesn't match with the commentary above. If rte_exit isn't meant to provide a traceback, it shouldn't do so. If an application wants that to happen, then they need to use rte_panic.