mbuf: add m_free_raw to be used instead of directly calling uma_zfree
The intent is to remove all direct zone_mbuf consumers so that ctor/dtor from that zone can be reimplemented as wrappers around uma, avoiding an indirect function call. Reviewed by: kbowling Discussed with: gallatin Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30959
This commit is contained in:
parent
fb32c8dbeb
commit
05462babd4
@ -1526,6 +1526,16 @@ m_freem(struct mbuf *mb)
|
||||
mb = m_free(mb);
|
||||
}
|
||||
|
||||
/*
|
||||
* Temporary primitive to allow freeing without going through m_free.
|
||||
*/
|
||||
void
|
||||
m_free_raw(struct mbuf *mb)
|
||||
{
|
||||
|
||||
uma_zfree(zone_mbuf, mb);
|
||||
}
|
||||
|
||||
int
|
||||
m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params,
|
||||
struct m_snd_tag **mstp)
|
||||
|
@ -825,6 +825,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t,
|
||||
u_int m_fixhdr(struct mbuf *);
|
||||
struct mbuf *m_fragment(struct mbuf *, int, int);
|
||||
void m_freem(struct mbuf *);
|
||||
void m_free_raw(struct mbuf *);
|
||||
struct mbuf *m_get2(int, int, short, int);
|
||||
struct mbuf *m_getjcl(int, short, int, int);
|
||||
struct mbuf *m_getm2(struct mbuf *, int, int, short, int);
|
||||
|
Loading…
Reference in New Issue
Block a user