svn commit: r244387 - head/sys/netinet
Andre Oppermann
andre at freebsd.org
Tue Dec 18 12:37:53 UTC 2012
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
>
More information about the svn-src-all
mailing list