Date: Wed, 10 Feb 2016 18:54:18 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295482 - in head/sys: dev/cxgb dev/cxgbe kern netinet sys Message-ID: <201602101854.u1AIsINp051128@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Feb 10 18:54:18 2016 New Revision: 295482 URL: https://svnweb.freebsd.org/changeset/base/295482 Log: Garbage collect unused arguments of m_init(). Modified: head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgbe/t4_sge.c head/sys/kern/kern_mbuf.c head/sys/netinet/tcp_pcap.c head/sys/sys/mbuf.h Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Wed Feb 10 18:36:51 2016 (r295481) +++ head/sys/dev/cxgb/cxgb_sge.c Wed Feb 10 18:54:18 2016 (r295482) @@ -795,12 +795,10 @@ free_rx_bufs(adapter_t *sc, struct sge_f 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 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 Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Feb 10 18:36:51 2016 (r295481) +++ head/sys/dev/cxgbe/t4_sge.c Wed Feb 10 18:54:18 2016 (r295482) @@ -1570,7 +1570,7 @@ get_scatter_segment(struct adapter *sc, 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++; Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Wed Feb 10 18:36:51 2016 (r295481) +++ head/sys/kern/kern_mbuf.c Wed Feb 10 18:54:18 2016 (r295482) @@ -435,7 +435,7 @@ mb_ctor_mbuf(void *mem, int size, void * 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 * 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; Modified: head/sys/netinet/tcp_pcap.c ============================================================================== --- head/sys/netinet/tcp_pcap.c Wed Feb 10 18:36:51 2016 (r295481) +++ head/sys/netinet/tcp_pcap.c Wed Feb 10 18:54:18 2016 (r295482) @@ -341,7 +341,7 @@ tcp_pcap_add(struct tcphdr *th, struct m 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); } } Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Feb 10 18:36:51 2016 (r295481) +++ head/sys/sys/mbuf.h Wed Feb 10 18:54:18 2016 (r295482) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602101854.u1AIsINp051128>