Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Oct 2014 13:57:29 +0400
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato <hrs@FreeBSD.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r272391 - in head/sys: netinet netinet6
Message-ID:  <542E7309.8080602@FreeBSD.org>
In-Reply-To: <20141002103222.GG73266@FreeBSD.org>
References:  <201410020025.s920PvEW008958@svn.freebsd.org> <542D09CF.5000803@FreeBSD.org> <20141002103222.GG73266@FreeBSD.org>

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

>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?542E7309.8080602>