socsvn commit: r305587 - soc2016/vincenzo/head/sys/dev/netmap
vincenzo at FreeBSD.org
vincenzo at FreeBSD.org
Mon Jun 27 12:48:46 UTC 2016
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;
More information about the svn-soc-all
mailing list