Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2016 00:31:48 +0100
From:      Bruce Simpson <bms@fastmail.net>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        Ryan Stone <rysto32@gmail.com>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, Ryan Stone <rstone@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Adrian Chadd <adrian@freebsd.org>
Subject:   Re: svn commit: r304436 - in head: . sys/netinet
Message-ID:  <6edd84f0-6bbc-d080-3763-fddb3df609fb@fastmail.net>
In-Reply-To: <8ac23bd1-dcb3-7c64-f195-5039f9af0eaf@fastmail.net>
References:  <6f4449f2-d145-8b49-c3f0-433e8ff4d2a2@fastmail.net> <CAFMmRNypgJc00XH277oB3EEGje4xq%2B8_qcJfZu4jjBfTfa7GGQ@mail.gmail.com> <20160820173050.GQ22212@zxy.spb.ru> <CAFMmRNx=2v=M8GCBQ_cN4pnuZ4VnyzncwAgsqMUE=ebz7pkp2A@mail.gmail.com> <20160820184506.GV8192@zxy.spb.ru> <CAFMmRNy-e1uzdtz2cb5DAa9kRd%2BkHg%2BmWbf=HNDWVdGGjOPUWA@mail.gmail.com> <eb4c228e-8efe-b519-e85b-87800b3ec7a1@fastmail.net> <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>

next in thread | previous in thread | raw e-mail | index | archive | help
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. :-(



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6edd84f0-6bbc-d080-3763-fddb3df609fb>