On Tue, Jan 17, 2012 at 11:38:12PM +0100, Ermal Lu?i wrote: E> > On Tue, Jan 17, 2012 at 05:48:10PM +0100, Ermal Lu?i wrote: E> > E> Maybe it does not hurt in general to keep the V_ E> > E> Some work was done to add it, no?! E> > E> > The V_ has been left under __FreeBSD__. E> > E> > E> On Tue, Jan 17, 2012 at 1:14 PM, Gleb Smirnoff <gleb...@freebsd.org> E> > wrote: E> > E> E> > E> > Author: glebius E> > E> > Date: Tue Jan 17 12:14:26 2012 E> > E> > New Revision: 230265 E> > E> > URL: http://svn.freebsd.org/changeset/base/230265 E> > E> > E> > E> > Log: E> > E> > Allocate our mbuf with m_get2(). E> > E> > E> > E> > Modified: E> > E> > head/sys/contrib/pf/net/if_pfsync.c E> > E> > E> > E> > Modified: head/sys/contrib/pf/net/if_pfsync.c E> > E> > E> > E> > E> > ============================================================================== E> > E> > --- head/sys/contrib/pf/net/if_pfsync.c Tue Jan 17 12:13:36 2012 E> > E> > (r230264) E> > E> > +++ head/sys/contrib/pf/net/if_pfsync.c Tue Jan 17 12:14:26 2012 E> > E> > (r230265) E> > E> > @@ -2121,9 +2121,6 @@ pfsync_sendout(void) E> > E> > #ifdef notyet E> > E> > struct tdb *t; E> > E> > #endif E> > E> > -#ifdef __FreeBSD__ E> > E> > - size_t pktlen; E> > E> > -#endif E> > E> > int offset; E> > E> > int q, count = 0; E> > E> > E> > E> > @@ -2145,44 +2142,33 @@ pfsync_sendout(void) E> > E> > return; E> > E> > } E> > E> > E> > E> > - MGETHDR(m, M_DONTWAIT, MT_DATA); E> > E> > - if (m == NULL) { E> > E> > #ifdef __FreeBSD__ E> > E> > + m = m_get2(M_NOWAIT, MT_DATA, M_PKTHDR, max_linkhdr + E> > sc->sc_len); E> > E> > + if (m == NULL) { E> > E> > sc->sc_ifp->if_oerrors++; E> > E> > + V_pfsyncstats.pfsyncs_onomem++; E> > E> > + return; E> > E> > + } E> > E> > #else E> > E> > + MGETHDR(m, M_DONTWAIT, MT_DATA); E> > E> > + if (m == NULL) { E> > E> > sc->sc_if.if_oerrors++; E> > E> > -#endif E> > E> > - V_pfsyncstats.pfsyncs_onomem++; E> > E> > + pfsyncstats.pfsyncs_onomem++; E> > E> ^^^^^^^^^^^^^^^^^^ E> What about this? E> E> E> > E> > pfsync_drop(sc); E> > E> > return; E> > E> > } E> > E> > E> > E> > -#ifdef __FreeBSD__ E> > E> > - pktlen = max_linkhdr + sc->sc_len; E> > E> > - if (pktlen > MHLEN) { E> > E> > - /* Find the right pool to allocate from. */ E> > E> > - /* XXX: This is ugly. */ E> > E> > - m_cljget(m, M_DONTWAIT, pktlen <= MCLBYTES ? MCLBYTES E> > : E> > E> > -#if MJUMPAGESIZE != MCLBYTES E> > E> > - pktlen <= MJUMPAGESIZE ? MJUMPAGESIZE : E> > E> > -#endif E> > E> > - pktlen <= MJUM9BYTES ? MJUM9BYTES : E> > MJUM16BYTES); E> > E> > -#else E> > E> > if (max_linkhdr + sc->sc_len > MHLEN) { E> > E> > MCLGETI(m, M_DONTWAIT, NULL, max_linkhdr + sc->sc_len); E> > E> > -#endif E> > E> > if (!ISSET(m->m_flags, M_EXT)) { E> > E> > m_free(m); E> > E> > -#ifdef __FreeBSD__ E> > E> > - sc->sc_ifp->if_oerrors++; E> > E> > -#else E> > E> > sc->sc_if.if_oerrors++; E> > E> > -#endif E> > E> > - V_pfsyncstats.pfsyncs_onomem++; E> > E> > + pfsyncstats.pfsyncs_onomem++; E> > E> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E> What about this? E> E> E> > E> > pfsync_drop(sc); E> > E> > return; E> > E> > } E> > E> > } E> > E> > +#endif E> > E> > m->m_data += max_linkhdr; E> > E> > m->m_len = m->m_pkthdr.len = sc->sc_len; E> > E> > E> > E> >
These are not under __FreeBSD__. -- Totus tuus, Glebius. _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"