Date: Fri, 15 Mar 2013 17:46:57 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Andre Oppermann <andre@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r248323 - head/sys/netinet Message-ID: <20130315134657.GL48089@FreeBSD.org> In-Reply-To: <51431B89.5010501@freebsd.org> References: <201303151253.r2FCrsSs016150@svn.freebsd.org> <51431B89.5010501@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 15, 2013 at 02:00:57PM +0100, Andre Oppermann wrote: A> On 15.03.2013 13:53, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Fri Mar 15 12:53:53 2013 A> > New Revision: 248323 A> > URL: http://svnweb.freebsd.org/changeset/base/248323 A> > A> > Log: A> > - Use m_getcl() instead of hand allocating. A> > A> > Sponsored by: Nginx, Inc. A> > A> > Modified: A> > head/sys/netinet/tcp_output.c A> > A> > Modified: head/sys/netinet/tcp_output.c A> > ============================================================================== A> > --- head/sys/netinet/tcp_output.c Fri Mar 15 12:52:59 2013 (r248322) A> > +++ head/sys/netinet/tcp_output.c Fri Mar 15 12:53:53 2013 (r248323) A> > @@ -842,23 +842,19 @@ send: A> > TCPSTAT_INC(tcps_sndpack); A> > TCPSTAT_ADD(tcps_sndbyte, len); A> > } A> > - MGETHDR(m, M_NOWAIT, MT_DATA); A> > +#ifdef INET6 A> > + if (MHLEN < hdrlen + max_linkhdr) A> > + m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); A> > + else A> > +#endif A> > + m = m_gethdr(M_NOWAIT, MT_DATA); A> > + A> A> m = m_getm2(hdrlen + max_linkhdr, M_NOWAIT, MT_DATA, M_PKTHDR); A> A> would be even more compact. Since max_linkhdr could be large as well, A> the possibility of a cluster applies to IPv4 too. m_getm2() may return chain. According to argument list, you probably meant m_get2(). Yes, that would be more compat. But, again, I am not sure that using pagesized cluster won't break anything. If you are sure, feel free to change that. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130315134657.GL48089>