From owner-svn-src-head@freebsd.org Wed Apr 5 16:57:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 574B1D304D5; Wed, 5 Apr 2017 16:57:14 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 294D2BA7; Wed, 5 Apr 2017 16:57:14 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v35GvDrW064606; Wed, 5 Apr 2017 16:57:13 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v35GvD5g064605; Wed, 5 Apr 2017 16:57:13 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201704051657.v35GvD5g064605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Wed, 5 Apr 2017 16:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316527 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 05 Apr 2017 16:57:14 -0000 Author: rstone Date: Wed Apr 5 16:57:13 2017 New Revision: 316527 URL: https://svnweb.freebsd.org/changeset/base/316527 Log: Revert the optimization from r304436 r304436 attempted to optimize the handling of incoming UDP packet by only making an expensive call to in_broadcast() if the mbuf was marked as an broadcast packet. Unfortunately, this cannot work in the case of point-to- point L2 protocols like PPP, which have no notion of "broadcast". The optimization has been disabled for several months now with no progress towards fixing it, so it needs to go. Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed Apr 5 16:56:04 2017 (r316526) +++ head/sys/netinet/udp_usrreq.c Wed Apr 5 16:57:13 2017 (r316527) @@ -123,12 +123,6 @@ SYSCTL_INT(_net_inet_udp, OID_AUTO, blac &VNET_NAME(udp_blackhole), 0, "Do not send port unreachables for refused connects"); -static VNET_DEFINE(int, udp_require_l2_bcast) = 0; -#define V_udp_require_l2_bcast VNET(udp_require_l2_bcast) -SYSCTL_INT(_net_inet_udp, OID_AUTO, require_l2_bcast, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(udp_require_l2_bcast), 0, - "Only treat packets sent to an L2 broadcast address as broadcast packets"); - u_long udp_sendspace = 9216; /* really max datagram size */ SYSCTL_ULONG(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW, &udp_sendspace, 0, "Maximum outgoing UDP datagram size"); @@ -529,8 +523,7 @@ udp_input(struct mbuf **mp, int *offp, i pcbinfo = udp_get_inpcbinfo(proto); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || - ((!V_udp_require_l2_bcast || m->m_flags & M_BCAST) && - in_broadcast(ip->ip_dst, ifp))) { + in_broadcast(ip->ip_dst, ifp)) { struct inpcb *last; struct inpcbhead *pcblist; struct ip_moptions *imo;