Eliminate unnecessary checking for M_EXT on mbufs returned by m_getjcl().
Reviewed by: bz, glebius, yongari MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D938
This commit is contained in:
parent
ac48346d3f
commit
682c4797d8
@ -962,10 +962,6 @@ msk_jumbo_newbuf(struct msk_if_softc *sc_if, int idx)
|
|||||||
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
if ((m->m_flags & M_EXT) == 0) {
|
|
||||||
m_freem(m);
|
|
||||||
return (ENOBUFS);
|
|
||||||
}
|
|
||||||
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
|
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
|
||||||
if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0)
|
if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0)
|
||||||
m_adj(m, ETHER_ALIGN);
|
m_adj(m, ETHER_ALIGN);
|
||||||
|
@ -2063,10 +2063,6 @@ nfe_jnewbuf(struct nfe_softc *sc, int idx)
|
|||||||
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
if ((m->m_flags & M_EXT) == 0) {
|
|
||||||
m_freem(m);
|
|
||||||
return (ENOBUFS);
|
|
||||||
}
|
|
||||||
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
||||||
m_adj(m, ETHER_ALIGN);
|
m_adj(m, ETHER_ALIGN);
|
||||||
|
|
||||||
|
@ -1012,10 +1012,6 @@ sk_jumbo_newbuf(sc_if, idx)
|
|||||||
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUM9BYTES);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
if ((m->m_flags & M_EXT) == 0) {
|
|
||||||
m_freem(m);
|
|
||||||
return (ENOBUFS);
|
|
||||||
}
|
|
||||||
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
||||||
/*
|
/*
|
||||||
* Adjust alignment so packet payload begins on a
|
* Adjust alignment so packet payload begins on a
|
||||||
|
Loading…
Reference in New Issue
Block a user