svn commit: r304436 - in head: . sys/netinet

Bruce Simpson bms at fastmail.net
Sat Aug 20 23:31:59 UTC 2016


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. :-(


More information about the svn-src-head mailing list