From owner-svn-src-head@freebsd.org Sat Aug 20 23:31:59 2016 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 1B3DDBC06EF; Sat, 20 Aug 2016 23:31:59 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 DA96F13A9; Sat, 20 Aug 2016 23:31:58 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8EBF0205B0; Sat, 20 Aug 2016 19:31:57 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 20 Aug 2016 19:31:57 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=iMpxhCqsV5FAagN/y0xbnI4kdqY=; b=Q0vVJe lERh0CZIOgtnXQt+rW0FEJZvitckzy7EYvdNz5iesv0B4Ki/ODKJ+nkrr/KQrGxD Faem6TPdcT0bYVOegJM7nNeC0PS1bkbDELEhV5mNhHRLAnxH3KrSmAFq5Eh/mxMr JqAJ8FingLMEu/m9EWxm05qDK3cRRRHCs5jTo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=iMpxhCqsV5FAagN /y0xbnI4kdqY=; b=t1gTXdx6lI3GjyG9j2ned8PktUVNYNGrKIR2wrz9h6WHpS5 FRRTeYQwKrxwww8E/WC8WykXaMsSQbFYQsctn3/iOd6STWkhIjYsUjK/8R8SbGvx JPSSBu7u6PVmRngHnOkoDT6eVauK/CEqrk1/9xhsYoPGdNfSGjT/dJNNORwQ= X-Sasl-enc: ydkpiFx6+H6ogYnBec9ba1o4yuR5jKcKCj4wprcXZfSw 1471735917 Received: from pion.local (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 8903BCCDC7; Sat, 20 Aug 2016 19:31:56 -0400 (EDT) Subject: Re: svn commit: r304436 - in head: . sys/netinet To: Slawa Olhovchenkov References: <6f4449f2-d145-8b49-c3f0-433e8ff4d2a2@fastmail.net> <20160820173050.GQ22212@zxy.spb.ru> <20160820184506.GV8192@zxy.spb.ru> <0f42c5fb-f930-c6e3-75d6-df97f67c201d@fastmail.net> <20160820204106.GW8192@zxy.spb.ru> <0acba141-4701-d9c2-0ddb-46d1f60ff55b@fastmail.net> <20160820220510.GX8192@zxy.spb.ru> <8ac23bd1-dcb3-7c64-f195-5039f9af0eaf@fastmail.net> Cc: Ryan Stone , "svn-src-head@freebsd.org" , Ryan Stone , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Adrian Chadd From: Bruce Simpson Message-ID: <6edd84f0-6bbc-d080-3763-fddb3df609fb@fastmail.net> Date: Sun, 21 Aug 2016 00:31:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <8ac23bd1-dcb3-7c64-f195-5039f9af0eaf@fastmail.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Sat, 20 Aug 2016 23:31:59 -0000 On 21/08/16 00:25, Bruce Simpson wrote: [Use a predicted branch in favour of Ethernet to optimize common case comments snipped] > ...we ensure that M_BCAST is cleared at all times before possible > re-entry, and use a separate M_BCASTL3 bit. Let the ethernet protocols > decide themselves if re-entered about M_BCAST based on DMAC. Better still, rename it to M_IPBCAST, because that is exactly what that flag would be. Treat it like M_PROMISC, hands off, use THAT test instead of M_BCAST in the code (but predictive branch the original in_broadcast() call), make sure M_BCAST is cleared before possible Netgraph handoff, but leave M_IPBCAST set. That way, anyone can tell IP set the M_BCAST bit - not Ethernet - just by XORing them together. I'd code this, but I don't have a -CURRENT box. :-(