From owner-svn-src-user@FreeBSD.ORG Thu Jun 4 01:12:18 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 981B4106564A; Thu, 4 Jun 2009 01:12:18 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 278188FC17; Thu, 4 Jun 2009 01:12:18 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so209122ana.13 for ; Wed, 03 Jun 2009 18:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=OeNwXWkFNJRZljzO3LSEn+7Xgh2wy5UkOZDWLy97UbU=; b=cO8rM954kcwbynt1cxbTOfrLAeG4V5cbCB535Lwy2LJo9OR3YOHDIyGyym39RobYUD ck68z9NmPXBAmz5uhzzctFmOHAzOn4NRhsINkZc8MlatXSyPTULuPiiBc9Z5AmQhtR2L CEcYzGjIqbFE5OuqE7rKac8ndkLkk++XMVm2c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=BnrR1lw7tJ6JRry9bqkvlc+1rgzd+87SYM5krGRhhA3XsrfbGKTOb+Nbn3SC1/5K+W tKP0QeHIC27BUrJTXtGI9j/WsMzDkPuBfujagClWPsQl9X0aCNOX0eAHVGbAuN32Iaz0 YHLf8PM4qvLT1OrJPJzhz0WHG6nw8//iIx9JA= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.100.126.15 with SMTP id y15mr1906792anc.71.1244077937489; Wed, 03 Jun 2009 18:12:17 -0700 (PDT) In-Reply-To: References: <200906030206.n5326nlY035216@svn.freebsd.org> Date: Wed, 3 Jun 2009 18:12:17 -0700 X-Google-Sender-Auth: 6c138ab3dd3c3db0 Message-ID: <3c1674c90906031812r3d5940ffybc1144257359b18d@mail.gmail.com> From: Kip Macy To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r193363 - user/kmacy/releng_7_2_fcs/sys/dev/cxgb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 01:12:18 -0000 On Wed, Jun 3, 2009 at 12:30 AM, Robert Watson wrote: > On Wed, 3 Jun 2009, Kip Macy wrote: > >> =A0clear next pointers and set M_PKTHDR when needed > > Without looking at the context in detail, in general, you need to allocat= e > mbufs intended to be headers as that from inception, or use M_MOVE_PKTHDR= (). > MAC, for example, allocates an mbuf tag with each PKTHDR mbuf so that > there's always storage for the MAC label on a packet, and if you hand ass= ign > the M_PKTHDR flag to mbufs, that alloation will be missed. =A0This is onl= y a > problem if you later inject that header into the stack, but that's usuall= y > the point of adding headers so I'm guessing that can happen here? :-) The problem is that by doing that I end up taking cache misses on the mbuf twice. How does MAC support deferred initialization? I can just defer the actual mbuf allocation if need be. -Kip -Kip > > Robert N M Watson > Computer Laboratory > University of Cambridge > >> >> Modified: >> =A0user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c >> >> Modified: user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c =A0 Wed Jun =A03 >> 01:59:42 2009 =A0 =A0 =A0 =A0(r193362) >> +++ user/kmacy/releng_7_2_fcs/sys/dev/cxgb/cxgb_sge.c =A0 Wed Jun =A03 >> 02:06:49 2009 =A0 =A0 =A0 =A0(r193363) >> @@ -2678,6 +2678,8 @@ get_packet(adapter_t *adap, unsigned int >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0flags =3D M_PKTHDR; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (fl->zone !=3D zone_pack) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_cljset(m0, cl, fl->type= ); >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 m0->m_flags |=3D flags; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 m0->m_next =3D m0->m_nextpkt =3D NULL; >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m0->m_pkthdr.len =3D m0->m_len =3D len; >> =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0switch(sopeop) { >> > --=20 When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle. Edmund Burke