From owner-svn-src-head@FreeBSD.ORG Wed Aug 8 19:15:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12DB9106564A; Wed, 8 Aug 2012 19:15:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAE1D8FC12; Wed, 8 Aug 2012 19:15:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q78JF1aX017952; Wed, 8 Aug 2012 19:15:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q78JF1ja017951; Wed, 8 Aug 2012 19:15:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208081915.q78JF1ja017951@svn.freebsd.org> From: Ed Maste Date: Wed, 8 Aug 2012 19:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239145 - head/tools/tools/netmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2012 19:15:02 -0000 Author: emaste Date: Wed Aug 8 19:15:01 2012 New Revision: 239145 URL: http://svn.freebsd.org/changeset/base/239145 Log: Be more descriptive about poll error / timeout when transmitting. Modified: head/tools/tools/netmap/pkt-gen.c Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Wed Aug 8 18:39:29 2012 (r239144) +++ head/tools/tools/netmap/pkt-gen.c Wed Aug 8 19:15:01 2012 (r239145) @@ -468,13 +468,14 @@ static void * sender_body(void *data) { struct targ *targ = (struct targ *) data; - struct pollfd fds[1]; struct netmap_if *nifp = targ->nifp; struct netmap_ring *txring; int i, pkts_per_td = targ->g->npackets / targ->g->nthreads, sent = 0; int continuous = 0; int options = targ->g->options | OPT_COPY; + int retval; + D("start"); if (pkts_per_td == 0) { continuous = 1; @@ -508,10 +509,14 @@ D("start"); /* * wait for available room in the send queue(s) */ - if (poll(fds, 1, 2000) <= 0) { + if ((retval = poll(fds, 1, 2000)) <= 0) { if (targ->cancel) break; - D("poll error/timeout on queue %d\n", targ->me); + if (retval == 0) + D("poll timeout on queue %d\n", targ->me); + else + D("poll error on queue %d: %s\n", targ->me, + strerror(errno)); goto quit; } /*