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. :-(
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to