From owner-svn-src-head@FreeBSD.ORG Tue Dec 18 12:37:53 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6E8FE98 for ; Tue, 18 Dec 2012 12:37:53 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id EECAA8FC15 for ; Tue, 18 Dec 2012 12:37:52 +0000 (UTC) Received: (qmail 23539 invoked from network); 18 Dec 2012 13:59:01 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 18 Dec 2012 13:59:01 -0000 Message-ID: <50D0620D.7080808@freebsd.org> Date: Tue, 18 Dec 2012 13:31:09 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r244387 - head/sys/netinet References: <201212180814.qBI8EGfe092798@svn.freebsd.org> <20121218082438.GJ94420@FreeBSD.org> In-Reply-To: <20121218082438.GJ94420@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, ae@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 12:37:53 -0000 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 >