summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mbuf.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2007-10-26 16:33:47 +0000
committerobrien <obrien@FreeBSD.org>2007-10-26 16:33:47 +0000
commit2fc050a9c24dcbc475e480fed4e1c9c23cf3450c (patch)
tree4ffc1762515d84b1c2eb8b1b7b276289b6bdae2c /sys/kern/kern_mbuf.c
parentb98fc71fe78928faff112bd8940e02ec680c424e (diff)
downloadFreeBSD-src-2fc050a9c24dcbc475e480fed4e1c9c23cf3450c.zip
FreeBSD-src-2fc050a9c24dcbc475e480fed4e1c9c23cf3450c.tar.gz
style(9)
Diffstat (limited to 'sys/kern/kern_mbuf.c')
-rw-r--r--sys/kern/kern_mbuf.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c
index 97f4075..1577305 100644
--- a/sys/kern/kern_mbuf.c
+++ b/sys/kern/kern_mbuf.c
@@ -343,11 +343,11 @@ mb_dtor_mbuf(void *mem, int size, void *arg)
m = (struct mbuf *)mem;
flags = (unsigned long)arg;
-
+
if ((flags & MB_NOTAGS) == 0 && (m->m_flags & M_PKTHDR) != 0)
m_tag_delete_chain(m, NULL);
KASSERT((m->m_flags & M_EXT) == 0, ("%s: M_EXT set", __func__));
- KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
+ KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__));
#ifdef INVARIANTS
trash_dtor(mem, size, arg);
#endif
@@ -377,13 +377,15 @@ mb_dtor_pack(void *mem, int size, void *arg)
trash_dtor(m->m_ext.ext_buf, MCLBYTES, arg);
#endif
/*
- * If there are processes blocked on zone_clust, waiting for pages to be freed up,
- * cause them to be woken up by draining the packet zone. We are exposed to a race here
- * (in the check for the UMA_ZFLAG_FULL) where we might miss the flag set, but that is
- * deliberate. We don't want to acquire the zone lock for every mbuf free.
+ * If there are processes blocked on zone_clust, waiting for pages
+ * to be freed up, * cause them to be woken up by draining the
+ * packet zone. We are exposed to a race here * (in the check for
+ * the UMA_ZFLAG_FULL) where we might miss the flag set, but that
+ * is deliberate. We don't want to acquire the zone lock for every
+ * mbuf free.
*/
- if (uma_zone_exhausted_nolock(zone_clust))
- zone_drain(zone_pack);
+ if (uma_zone_exhausted_nolock(zone_clust))
+ zone_drain(zone_pack);
}
/*
@@ -401,7 +403,7 @@ mb_ctor_clust(void *mem, int size, void *arg, int how)
u_int *refcnt;
int type;
uma_zone_t zone;
-
+
#ifdef INVARIANTS
trash_ctor(mem, size, arg, how);
#endif
@@ -431,7 +433,7 @@ mb_ctor_clust(void *mem, int size, void *arg, int how)
m = (struct mbuf *)arg;
refcnt = uma_find_refcnt(zone, mem);
- *refcnt = 1;
+ *refcnt = 1;
if (m != NULL) {
m->m_ext.ext_buf = (caddr_t)mem;
m->m_data = m->m_ext.ext_buf;
@@ -531,7 +533,7 @@ mb_ctor_pack(void *mem, int size, void *arg, int how)
m->m_len = 0;
m->m_flags = (flags | M_EXT);
m->m_type = type;
-
+
if (flags & M_PKTHDR) {
m->m_pkthdr.rcvif = NULL;
m->m_pkthdr.len = 0;
OpenPOWER on IntegriCloud