mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Garbage collect unused arguments of m_init().
This commit is contained in:
parent
ed6877ef4b
commit
b4b12e52fb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295482
@ -795,12 +795,10 @@ free_rx_bufs(adapter_t *sc, struct sge_fl *q)
|
||||
bus_dmamap_unload(q->entry_tag, d->map);
|
||||
bus_dmamap_destroy(q->entry_tag, d->map);
|
||||
if (q->zone == zone_pack) {
|
||||
m_init(d->m, zone_pack, MCLBYTES,
|
||||
M_NOWAIT, MT_DATA, M_EXT);
|
||||
m_init(d->m, M_NOWAIT, MT_DATA, M_EXT);
|
||||
uma_zfree(zone_pack, d->m);
|
||||
} else {
|
||||
m_init(d->m, zone_mbuf, MLEN,
|
||||
M_NOWAIT, MT_DATA, 0);
|
||||
m_init(d->m, M_NOWAIT, MT_DATA, 0);
|
||||
uma_zfree(zone_mbuf, d->m);
|
||||
uma_zfree(q->zone, d->rxsd_cl);
|
||||
}
|
||||
@ -2725,7 +2723,7 @@ get_packet(adapter_t *adap, unsigned int drop_thres, struct sge_qset *qs,
|
||||
if ((sopeop == RSPQ_SOP_EOP) ||
|
||||
(sopeop == RSPQ_SOP))
|
||||
flags |= M_PKTHDR;
|
||||
m_init(m, fl->zone, fl->buf_size, M_NOWAIT, MT_DATA, flags);
|
||||
m_init(m, M_NOWAIT, MT_DATA, flags);
|
||||
if (fl->zone == zone_pack) {
|
||||
/*
|
||||
* restore clobbered data pointer
|
||||
|
@ -1570,7 +1570,7 @@ get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int fr_offset,
|
||||
MPASS(clm != NULL);
|
||||
m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE);
|
||||
/* No bzero required */
|
||||
if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA,
|
||||
if (m_init(m, M_NOWAIT, MT_DATA,
|
||||
fr_offset == 0 ? M_PKTHDR | M_NOFREE : M_NOFREE))
|
||||
return (NULL);
|
||||
fl->mbuf_inlined++;
|
||||
|
@ -435,7 +435,7 @@ mb_ctor_mbuf(void *mem, int size, void *arg, int how)
|
||||
m = (struct mbuf *)mem;
|
||||
flags = args->flags;
|
||||
|
||||
error = m_init(m, NULL, size, how, type, flags);
|
||||
error = m_init(m, how, type, flags);
|
||||
|
||||
return (error);
|
||||
}
|
||||
@ -635,7 +635,7 @@ mb_ctor_pack(void *mem, int size, void *arg, int how)
|
||||
trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how);
|
||||
#endif
|
||||
|
||||
error = m_init(m, NULL, size, how, type, flags);
|
||||
error = m_init(m, how, type, flags);
|
||||
|
||||
/* m_ext is already initialized. */
|
||||
m->m_data = m->m_ext.ext_buf;
|
||||
|
@ -341,7 +341,7 @@ tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct mbufq *queue)
|
||||
|
||||
n = mhead;
|
||||
tcp_pcap_m_freem(n->m_next);
|
||||
m_init(n, NULL, 0, M_NOWAIT, MT_DATA, 0);
|
||||
m_init(n, M_NOWAIT, MT_DATA, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -618,8 +618,7 @@ m_getzone(int size)
|
||||
* should go away with constant propagation for !MGETHDR.
|
||||
*/
|
||||
static __inline int
|
||||
m_init(struct mbuf *m, uma_zone_t zone __unused, int size __unused, int how,
|
||||
short type, int flags)
|
||||
m_init(struct mbuf *m, int how, short type, int flags)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user