diff options
author | ru <ru@FreeBSD.org> | 2008-03-25 09:39:02 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-03-25 09:39:02 +0000 |
commit | 3b1bf8c2e9222b7d27e8b9084e637a84005de7ba (patch) | |
tree | cf0376c9359f2d1ca6e4e8e4ad4a4f722dba61a7 /sys/net/if_ef.c | |
parent | 0655a583e2ccba8b534e710284a730a0d6af1375 (diff) | |
download | FreeBSD-src-3b1bf8c2e9222b7d27e8b9084e637a84005de7ba.zip FreeBSD-src-3b1bf8c2e9222b7d27e8b9084e637a84005de7ba.tar.gz |
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.
Diffstat (limited to 'sys/net/if_ef.c')
-rw-r--r-- | sys/net/if_ef.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/net/if_ef.c b/sys/net/if_ef.c index 19c1687..cf12fab 100644 --- a/sys/net/if_ef.c +++ b/sys/net/if_ef.c @@ -415,11 +415,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp, type = htons(m->m_pkthdr.len); break; case ETHER_FT_8022: - M_PREPEND(m, ETHER_HDR_LEN + 3, M_TRYWAIT); - if (m == NULL) { - *mp = NULL; - return ENOBUFS; - } + M_PREPEND(m, ETHER_HDR_LEN + 3, M_WAIT); /* * Ensure that ethernet header and next three bytes * will fit into single mbuf @@ -438,11 +434,7 @@ ef_output(struct ifnet *ifp, struct mbuf **mp, struct sockaddr *dst, short *tp, *hlen += 3; break; case ETHER_FT_SNAP: - M_PREPEND(m, 8, M_TRYWAIT); - if (m == NULL) { - *mp = NULL; - return ENOBUFS; - } + M_PREPEND(m, 8, M_WAIT); type = htons(m->m_pkthdr.len); cp = mtod(m, u_char *); bcopy("\xAA\xAA\x03\x00\x00\x00\x81\x37", cp, 8); |