diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2008-03-25 09:39:02 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2008-03-25 09:39:02 +0000 |
commit | ea26d587291046c59102b34124187e7f602ee07d (patch) | |
tree | cf0376c9359f2d1ca6e4e8e4ad4a4f722dba61a7 /sys/pci | |
parent | b2798e25738fc58f40da5f2fe18186b8efc3c2c6 (diff) | |
download | src-ea26d587291046c59102b34124187e7f602ee07d.tar.gz src-ea26d587291046c59102b34124187e7f602ee07d.zip |
Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.
Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true
since the advent of MBUMA.
Reviewed by: arch
There are ongoing disputes as to whether we want to switch to directly using
UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
Notes
Notes:
svn path=/head/; revision=177599
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_mn.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c index ebe421f18f2b..e8b3dc6730df 100644 --- a/sys/pci/if_mn.c +++ b/sys/pci/if_mn.c @@ -693,9 +693,7 @@ ngmn_connect(hook_p hook) /* Setup a transmit chain with one descriptor */ /* XXX: we actually send a 1 byte packet */ dp = mn_alloc_desc(); - MGETHDR(m, M_TRYWAIT, MT_DATA); - if (m == NULL) - return ENOBUFS; + MGETHDR(m, M_WAIT, MT_DATA); m->m_pkthdr.len = 0; dp->m = m; dp->flags = 0xc0000000 + (1 << 16); @@ -710,17 +708,8 @@ ngmn_connect(hook_p hook) dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_TRYWAIT, MT_DATA); - if (m == NULL) { - mn_free_desc(dp); - return (ENOBUFS); - } - MCLGET(m, M_TRYWAIT); - if ((m->m_flags & M_EXT) == 0) { - mn_free_desc(dp); - m_freem(m); - return (ENOBUFS); - } + MGETHDR(m, M_WAIT, MT_DATA); + MCLGET(m, M_WAIT); dp->m = m; dp->data = vtophys(m->m_data); dp->flags = 0x40000000; @@ -733,18 +722,8 @@ ngmn_connect(hook_p hook) dp2 = dp; dp = mn_alloc_desc(); m = NULL; - MGETHDR(m, M_TRYWAIT, MT_DATA); - if (m == NULL) { - mn_free_desc(dp); - m_freem(m); - return (ENOBUFS); - } - MCLGET(m, M_TRYWAIT); - if ((m->m_flags & M_EXT) == 0) { - mn_free_desc(dp); - m_freem(m); - return (ENOBUFS); - } + MGETHDR(m, M_WAIT, MT_DATA); + MCLGET(m, M_WAIT); dp->m = m; dp->data = vtophys(m->m_data); dp->flags = 0x00000000; |