Date: Mon, 27 Jun 2016 12:48:45 GMT From: vincenzo@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r305587 - soc2016/vincenzo/head/sys/dev/netmap Message-ID: <201606271248.u5RCmjoP081076@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vincenzo Date: Mon Jun 27 12:48:45 2016 New Revision: 305587 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=305587 Log: freebsd: ptnet_transmit: turn more device_printf() into RD() Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c ============================================================================== --- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jun 27 09:42:13 2016 (r305586) +++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jun 27 12:48:45 2016 (r305587) @@ -1193,9 +1193,10 @@ * by the taskqueue thread. */ err = drbr_enqueue(ifp, pq->bufring, m); m = NULL; /* just to stay safe */ - if (unlikely(err)) { - device_printf(sc->dev, "%s: drbr_enqueue() failed %d\n", - __func__, err); + if (err) { + /* ENOBUFS when the bufring is full */ + RD(1, "%s: drbr_enqueue() failed %d\n", + __func__, err); return err; } } @@ -1262,9 +1263,8 @@ /* Run out of slots while processing * a packet. Reset head to the previous * position and requeue the mbuf. */ - device_printf(sc->dev, "%s: Drop, " - " no free slots\n", - __func__); + RD(1, "%s: Drop, no free slots\n", + __func__); head = prev_head; drbr_putback(ifp, pq->bufring, m); goto escape;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606271248.u5RCmjoP081076>