On Wed, Feb 19, 2014 at 04:57:28PM +0100, Vincenzo Maffione wrote: > 2014-02-19 16:30 GMT+01:00 Stefan Hajnoczi <stefa...@gmail.com>: > > > 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