aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ce
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2014-09-10 09:57:32 +0000
committerRobert Watson <rwatson@FreeBSD.org>2014-09-10 09:57:32 +0000
commit620dbb4ed12553d321e7a960129b6191ee75f698 (patch)
tree9737243e31cc5720a8d26c0e5d45824e5475aa02 /sys/dev/ce
parenteb4e5b0ad50942e24674194ebdd623f6929303c5 (diff)
downloadsrc-620dbb4ed12553d321e7a960129b6191ee75f698.tar.gz
src-620dbb4ed12553d321e7a960129b6191ee75f698.zip
Replace local copy-and-paste implementations of printmbuf() in several
device drivers with calls to the centralised m_print() implementation. While the formatting and output details differ a little, the content is essentially the same, and it is unlikely anyone has used this debugging output in some time. This change reduces awareness of mbuf cluster allocation (and, especially, the M_EXT flag) outside of the mbuf allocator, which will make it easier to refine the external storage mechanism without disrupting drivers in the future. Style bugs are preserved. Reviewed by: bz, glebius MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=271373
Diffstat (limited to 'sys/dev/ce')
-rw-r--r--sys/dev/ce/if_ce.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/dev/ce/if_ce.c b/sys/dev/ce/if_ce.c
index 899f33f38dc5..6d77a1cd6d0d 100644
--- a/sys/dev/ce/if_ce.c
+++ b/sys/dev/ce/if_ce.c
@@ -298,22 +298,6 @@ static struct cdevsw ce_cdevsw = {
#endif
/*
- * Print the mbuf chain, for debug purposes only.
- */
-static void printmbuf (struct mbuf *m)
-{
- printf ("mbuf:");
- for (; m; m=m->m_next) {
- if (m->m_flags & M_PKTHDR)
- printf (" HDR %d:", m->m_pkthdr.len);
- if (m->m_flags & M_EXT)
- printf (" EXT:");
- printf (" %d", m->m_len);
- }
- printf ("\n");
-}
-
-/*
* Make an mbuf from data.
*/
static struct mbuf *makembuf (void *buf, unsigned len)
@@ -1140,7 +1124,7 @@ static void ce_receive (ce_chan_t *c, unsigned char *data, int len)
return;
}
if (c->debug > 1)
- printmbuf (m);
+ m_print (m, 0);
#ifdef NETGRAPH
m->m_pkthdr.rcvif = 0;
IF_ENQUEUE(&d->rqueue, m);