From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:09:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D568DB; Mon, 12 Jan 2015 16:09:23 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7841FB6; Mon, 12 Jan 2015 16:09:22 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id n12so20191682wgh.8; Mon, 12 Jan 2015 08:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zCPESMgXVlyrOfGKDxk3N90Nb5WMcYJvXeuWaH0/iTc=; b=krCRb8gl2LQcg5GozWEjz9Xui5IkCQ5VvjIUF0ucsUWPPYdCKM9qrUBW9piANzKitQ JczTjbkPje44mFj4gs+OJQUTHYioK1BT/AfrZeYXoKBVegkVQspsJ7LynnoXsu7GvmZ5 i2y+8/i4hb5ZMnY6AFoC49iVcKCbRyAxhMLmr0cp89R34fx/9zfK9+c3M1FP9+rB5V/O olFdrse7qTftXW9fXV/NbzYJH6nNU7N3zi+c1A5B85DMlC/zM+tMkTiK4oHolYOvoyyt esUrsgMs7HiRGdjk5dtd7ohfk0tMgUGMub8Tnq2jigngp8toAQfzP4FYGEh97zTT3Yk7 WWQg== MIME-Version: 1.0 X-Received: by 10.180.87.36 with SMTP id u4mr31443290wiz.20.1421078958894; Mon, 12 Jan 2015 08:09:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:09:18 -0800 (PST) In-Reply-To: <54B3E3BE.7090302@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@FreeBSD.org> Date: Mon, 12 Jan 2015 08:09:18 -0800 X-Google-Sender-Auth: AnpK01hhGdr_dKGJAp-8yJ6EfjI Message-ID: Subject: Re: svn commit: r277072 - head/sys/netinet6 From: Adrian Chadd To: "Alexander V. Chernikov" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:09:23 -0000 On 12 January 2015 at 07:09, Alexander V. Chernikov 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. >> >> > >