Date: Mon, 12 Jan 2015 08:09:18 -0800 From: Adrian Chadd <adrian@freebsd.org> To: "Alexander V. Chernikov" <melifaro@freebsd.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r277072 - head/sys/netinet6 Message-ID: <CAJ-VmomiG8kZEVjEupqT61nHijPkOBZ21fqz6KqumyVH3vi3WQ@mail.gmail.com> In-Reply-To: <54B3E3BE.7090302@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12 January 2015 at 07:09, Alexander V. Chernikov <melifaro@freebsd.org> wrote: > On 12.01.2015 17:52, Gleb Smirnoff wrote: >> Author: glebius >> Date: Mon Jan 12 14:52:43 2015 >> New Revision: 277072 >> URL: https://svnweb.freebsd.org/changeset/base/277072 >> >> Log: >> Do not go one layer down to check ifqueue length. First, not all drivers >> use ifqueue at all. Second, there is no point in this lockless check. >> Either positive or negative result of the check could be incorrect after >> a tick. > Finally, no useless ifq_maxlen check! Yeah, I killed it in the ipv4 world. Well, commented it out. It's been bogus ever since kernels became re-entrant and SMP. :( -adrian > Thanks! >> >> Sponsored by: Nginx, Inc. >> >> Modified: >> head/sys/netinet6/ip6_output.c >> >> Modified: head/sys/netinet6/ip6_output.c >> ============================================================================== >> --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) >> +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) >> @@ -905,8 +905,6 @@ passout: >> u_int32_t id = htonl(ip6_randomid()); >> u_char nextproto; >> >> - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; >> - >> /* >> * Too large for the destination or interface; >> * fragment if possible. >> @@ -924,18 +922,6 @@ passout: >> } >> >> /* >> - * Verify that we have any chance at all of being able to queue >> - * the packet or packet fragments >> - */ >> - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) >> - < tlen /* - hlen */)) { >> - error = ENOBUFS; >> - IP6STAT_INC(ip6s_odropped); >> - goto bad; >> - } >> - >> - >> - /* >> * If the interface will not calculate checksums on >> * fragmented packets, then do it here. >> * XXX-BZ handle the hw offloading case. Need flags. >> >> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomiG8kZEVjEupqT61nHijPkOBZ21fqz6KqumyVH3vi3WQ>