Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Dec 2012 13:31:09 +0100
From:      Andre Oppermann <andre@freebsd.org>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, ae@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r244387 - head/sys/netinet
Message-ID:  <50D0620D.7080808@freebsd.org>
In-Reply-To: <20121218082438.GJ94420@FreeBSD.org>
References:  <201212180814.qBI8EGfe092798@svn.freebsd.org> <20121218082438.GJ94420@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 18.12.2012 09:24, Gleb Smirnoff wrote:
>    Andrey,
>
> On Tue, Dec 18, 2012 at 08:14:16AM +0000, Gleb Smirnoff wrote:
> T> Author: glebius
> T> Date: Tue Dec 18 08:14:16 2012
> T> New Revision: 244387
> T> URL: http://svnweb.freebsd.org/changeset/base/244387
> T>
> T> Log:
> T>   Fix !INET6 build after r244365.
> T>
> T> Modified:
> T>   head/sys/netinet/tcp_input.c
> T>
>
>    At review stage of the r242079 I have noted, that more effort should
> be put into mbuf flags prior to this change:
>
>    - cleanse deprecated mbuf flags (at least M_FREELIST)
>    - move 90% of mbuf flags to pkthdr flags

Please do not commit these two steps immediately to HEAD.  Ask for
review first.

>    - not utilize protocol specific flag, but use a global one
>      to mark packet as having forward tag

Nope, please don't.  It's protocol specific and should stay there.

-- 
Andre

>    Several of the fallouts from r242079 could be avoided.
>
>    IMHO, if anyone is hacking on a new feature or optimisation and
> encounters a "bad code" (tm), he/she should remove the bad code from
> his/her way and not leave it to be worked on sometime later, which
> usually ends up in never. This approach adds more work before the
> feature/optimisation is commited, but reduces probability of problems
> after commit and thus amount of urgent work after commit.
>
>    P.S. Please do not take above ranting paragraph as personal critics
> of yourself, this is just thinking out loud on how things should be
> done :)
>
> T> Modified: head/sys/netinet/tcp_input.c
> T> ==============================================================================
> T> --- head/sys/netinet/tcp_input.c	Tue Dec 18 08:09:44 2012	(r244386)
> T> +++ head/sys/netinet/tcp_input.c	Tue Dec 18 08:14:16 2012	(r244387)
> T> @@ -780,8 +780,17 @@ findpcb:
> T>  	/*
> T>  	 * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain.
> T>  	 */
> T> -	if ((isipv6 && (m->m_flags & M_IP6_NEXTHOP)) ||
> T> -	    (!isipv6 && (m->m_flags & M_IP_NEXTHOP)))
> T> +        if (
> T> +#ifdef INET6
> T> +	    (isipv6 && (m->m_flags & M_IP6_NEXTHOP))
> T> +#ifdef INET
> T> +	    || (!isipv6 && (m->m_flags & M_IP_NEXTHOP))
> T> +#endif
> T> +#endif
> T> +#if defined(INET) && !defined(INET6)
> T> +	    (m->m_flags & M_IP_NEXTHOP)
> T> +#endif
> T> +	    )
> T>  		fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL);
> T>
> T>  #ifdef INET6
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50D0620D.7080808>