mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 19:03:48 +01:00
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
3f52cae506
commit
6ad1954bcb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273028
@ -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);
|
||||
if (m == NULL)
|
||||
return (ENOBUFS);
|
||||
if ((m->m_flags & M_EXT) == 0) {
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
m->m_len = m->m_pkthdr.len = MJUM9BYTES;
|
||||
if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0)
|
||||
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);
|
||||
if (m == NULL)
|
||||
return (ENOBUFS);
|
||||
if ((m->m_flags & M_EXT) == 0) {
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
||||
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);
|
||||
if (m == NULL)
|
||||
return (ENOBUFS);
|
||||
if ((m->m_flags & M_EXT) == 0) {
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
m->m_pkthdr.len = m->m_len = MJUM9BYTES;
|
||||
/*
|
||||
* Adjust alignment so packet payload begins on a
|
||||
|
Loading…
Reference in New Issue
Block a user