Received: from eggs.gnu.org ([2001:4830:134:3::10]:39935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGQGa-00009j-UG for qemu-devel@nongnu.org; Thu, 20 Feb 2014 04:50:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGQGS-0002dW-5G for qemu-devel@nongnu.org; Thu, 20 Feb 2014 04:50:04 -0500 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:46650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGQGR-0002dL-Tw for qemu-devel@nongnu.org; Thu, 20 Feb 2014 04:49:56 -0500 Received: by mail-wi0-f177.google.com with SMTP id e4so1578277wiv.4 for ; Thu, 20 Feb 2014 01:49:55 -0800 (PST) Date: Thu, 20 Feb 2014 10:49:52 +0100 From: Stefan Hajnoczi Message-ID: <20140220094952.GB1272@stefanha-thinkpad.redhat.com> References: <1392396024-32420-1-git-send-email-v.maffione@gmail.com> <20140219153028.GA6495@stefanha-thinkpad.muc.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] net: Disable netmap backend when not supported List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione Cc: Peter Maydell , Anthony Liguori , qemu-devel , Stefan Hajnoczi , Paolo Bonzini , Giuseppe Lettieri , Luigi Rizzo , rth@twiddle.net On Wed, Feb 19, 2014 at 04:57:28PM +0100, Vincenzo Maffione wrote: > 2014-02-19 16:30 GMT+01:00 Stefan Hajnoczi : > > > On Fri, Feb 14, 2014 at 05:40:24PM +0100, Vincenzo Maffione wrote: > > > @@ -56,31 +58,6 @@ typedef struct NetmapState { > > > struct iovec iov[IOV_MAX]; > > > } NetmapState; > > > > > > -#define D(format, ...) \ > > > - do { \ > > > - struct timeval __xxts; \ > > > - gettimeofday(&__xxts, NULL); \ > > > - printf("%03d.%06d %s [%d] " format "\n", \ > > > - (int)__xxts.tv_sec % 1000, (int)__xxts.tv_usec, \ > > > - __func__, __LINE__, ##__VA_ARGS__); \ > > > - } while (0) > > > - > > > -/* Rate limited version of "D", lps indicates how many per second */ > > > -#define RD(lps, format, ...) \ > > > - do { \ > > > - static int t0, __cnt; \ > > > - struct timeval __xxts; \ > > > - gettimeofday(&__xxts, NULL); \ > > > - if (t0 != __xxts.tv_sec) { \ > > > - t0 = __xxts.tv_sec; \ > > > - __cnt = 0; \ > > > - } \ > > > - if (__cnt++ < lps) { \ > > > - D(format, ##__VA_ARGS__); \ > > > - } \ > > > - } while (0) > > > - > > > - > > > #ifndef __FreeBSD__ > > > #define pkt_copy bcopy > > > #else > > > > Why are you deleting this? > > > Because now equivalent code is contained by "netmap_user.h" Please mention that in the commit description. (I guess it's too late to give them a NETMAP_* prefix since defining D() and RD() in a system header has a fair chance of causing namespace conflicts.) Stefan