On 02.10.2014 14:32, Gleb Smirnoff wrote:
On Thu, Oct 02, 2014 at 12:16:15PM +0400, Alexander V. Chernikov wrote:
A> On 02.10.2014 04:25, Hiroki Sato wrote:
A> > Author: hrs
A> > Date: Thu Oct 2 00:25:57 2014
A> > New Revision: 272391
A> > URL: https://svnweb.freebsd.org/changeset/base/272391
A> >
A> > Log:
A> > Add an additional routing table lookup when m->m_pkthdr.fibnum is
changed
A> > at a PFIL hook in ip{,6}_output(). IPFW setfib rule did not perform
A> > a routing table lookup when the destination address was not changed.
A> >
A> > CR: D805
A> >
A> > Modified:
A> > head/sys/netinet/ip_output.c
A> > head/sys/netinet6/ip6_output.c
A> I'm not very happy with this.
A> We already have large conditional for checking if dst has changed, how
A> you have added another conditional for fib..
A> This idea is quite weird: why should we try to check all this stuff for
A> every packet instead of asking pfil consumers
A> to provide information they already know?
A>
A> We'd better discuss something like M_DSTCHANGED flag instead of doing
A> these hacks.
And here you suggest to abuse mbuf flags to merely carry return value of
a pfil hook :)
Why not? We have some M_PROTOX flags for exactly the same:
store some state inside particular subsystem being set internally and
cleared on return.
We can use alternative approach like making last PFIL argument being pointer
to some unsigned value representing flags and check it on return.
The problem here is that we will make PFIL batching implementation harder..
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"