From owner-svn-src-all@FreeBSD.ORG Fri Sep 19 05:23:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54388847; Fri, 19 Sep 2014 05:23:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2698599E; Fri, 19 Sep 2014 05:23:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8J5NmWH097841; Fri, 19 Sep 2014 05:23:48 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8J5NmXI097840; Fri, 19 Sep 2014 05:23:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409190523.s8J5NmXI097840@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 19 Sep 2014 05:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271852 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2014 05:23:48 -0000 Author: glebius Date: Fri Sep 19 05:23:47 2014 New Revision: 271852 URL: http://svnweb.freebsd.org/changeset/base/271852 Log: Remove disabled code, that is very unlikely to be ever enabled again, as well as the comment that explains why is it disabled. Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Sep 19 05:03:11 2014 (r271851) +++ head/sys/netinet/ip_output.c Fri Sep 19 05:23:47 2014 (r271852) @@ -446,43 +446,6 @@ again: } /* - * Both in the SMP world, pre-emption world if_transmit() world, - * the following code doesn't really function as intended any further. - * - * + There can and will be multiple CPUs running this code path - * in parallel, and we do no lock holding when checking the - * queue depth; - * + And since other threads can be running concurrently, even if - * we do pass this check, another thread may queue some frames - * before this thread does and it will end up partially or fully - * failing to send anyway; - * + if_transmit() based drivers don't necessarily set ifq_len - * at all. - * - * This should be replaced with a method of pushing an entire list - * of fragment frames to the driver and have the driver decide - * whether it can queue or not queue the entire set. - */ -#if 0 - /* - * Verify that we have any chance at all of being able to queue the - * packet or packet fragments, unless ALTQ is enabled on the given - * interface in which case packetdrop should be done by queueing. - */ - n = ip_len / mtu + 1; /* how many fragments ? */ - if ( -#ifdef ALTQ - (!ALTQ_IS_ENABLED(&ifp->if_snd)) && -#endif /* ALTQ */ - (ifp->if_snd.ifq_len + n) >= ifp->if_snd.ifq_maxlen ) { - error = ENOBUFS; - IPSTAT_INC(ips_odropped); - ifp->if_snd.ifq_drops += n; - goto bad; - } -#endif - - /* * Look for broadcast address and * verify user is allowed to send * such a packet.