From owner-svn-src-all@FreeBSD.ORG Fri May 17 07:38:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2D6702E9; Fri, 17 May 2013 07:38:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 95BA9AD2; Fri, 17 May 2013 07:38:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r4H7cDsd044734; Fri, 17 May 2013 11:38:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r4H7cDdM044733; Fri, 17 May 2013 11:38:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 17 May 2013 11:38:13 +0400 From: Gleb Smirnoff To: Julian Elischer Subject: Re: svn commit: r250700 - in head/sys: conf net netinet6 sys Message-ID: <20130517073813.GY17164@FreeBSD.org> References: <201305161620.r4GGKIFI012296@svn.freebsd.org> <20130517073721.GX17164@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130517073721.GX17164@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 May 2013 07:38:15 -0000 Sorry, I am slowpoke. Everything had already been noticed by other reviewers. On Fri, May 17, 2013 at 11:37:21AM +0400, Gleb Smirnoff wrote: T> On Thu, May 16, 2013 at 04:20:18PM +0000, Julian Elischer wrote: T> J> Modified: head/sys/sys/mbuf.h T> J> ============================================================================== T> J> --- head/sys/sys/mbuf.h Thu May 16 15:28:38 2013 (r250699) T> J> +++ head/sys/sys/mbuf.h Thu May 16 16:20:17 2013 (r250700) T> J> @@ -129,6 +129,8 @@ struct pkthdr { T> J> u_int16_t vt_vtag; /* Ethernet 802.1p+q vlan tag */ T> J> u_int16_t vt_nrecs; /* # of IGMPv3 records in this chain */ T> J> } PH_vt; T> J> + u_int16_t fibnum; /* this packet should use this fib */ T> J> + u_int16_t pad2; /* align to 32 bits */ T> J> SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ T> J> }; T> J> #define ether_vtag PH_vt.vt_vtag T> J> @@ -171,6 +173,7 @@ struct mbuf { T> J> #define m_type m_hdr.mh_type T> J> #define m_flags m_hdr.mh_flags T> J> #define m_nextpkt m_hdr.mh_nextpkt T> J> +#define m_fibnum m_hdr.mh_nextpkt T> J> #define m_act m_nextpkt T> J> #define m_pkthdr M_dat.MH.MH_pkthdr T> J> #define m_ext M_dat.MH.MH_dat.MH_ext T> T> The define definitely looks incorrect. T> T> J> +static int inline T> J> +rt_m_getfib(struct mbuf *m) T> J> +{ T> J> + KASSERT(m->m_flags & M_EXT , ("attempt to set FIB on non header mbuf")); T> J> + return (m->m_pkthdr.fibnum); T> J> +} T> T> The KASSERT looks incorrect. Text doesn't match the test. IMO, text is T> correct, but the test is not. T> T> J> #define M_SETFIB(_m, _fib) do { \ T> J> - _m->m_flags &= ~M_FIB; \ T> J> - _m->m_flags |= (((_fib) << M_FIBSHIFT) & M_FIB); \ T> J> + KASSERT((_m)->m_flags & M_EXT, ("No FIB on non header mbuf")); \ T> J> + ((_m)->m_pkthdr.fibnum) = (_fib); \ T> J> } while (0) T> T> Same for this KASSERT. T> T> IMO, any change to struct mbuf should be announced and posted for review T> prior to committing. T> T> -- T> Totus tuus, Glebius. -- Totus tuus, Glebius.