From owner-svn-src-head@FreeBSD.ORG Tue Jun 12 13:19:10 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36264106564A; Tue, 12 Jun 2012 13:19:10 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (lakerest.net [70.155.160.98]) by mx1.freebsd.org (Postfix) with ESMTP id AB7968FC08; Tue, 12 Jun 2012 13:19:09 +0000 (UTC) Received: from [10.1.1.141] (bsd3.lakerest.net [70.155.160.101]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id q5CDHkLD003720 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 12 Jun 2012 09:17:47 -0400 (EDT) (envelope-from rrs@lakerest.net) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=windows-1252 From: Randall Stewart In-Reply-To: <70EDDE72-B9FE-45AB-B3C5-248B95E1E960@lists.zabbadoz.net> Date: Tue, 12 Jun 2012 09:17:46 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <3F5E6768-BC5D-4405-A160-0D5CC172B45C@lakerest.net> References: <201206121244.q5CCiH4i053940@svn.freebsd.org> <70EDDE72-B9FE-45AB-B3C5-248B95E1E960@lists.zabbadoz.net> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, Randall Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r236955 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 12 Jun 2012 13:19:10 -0000 That actually will not effect things. Since the packet is on the way out. If the csum_data field gets set on the way in (not out)=85 so reusing it here I think is safe. R On Jun 12, 2012, at 8:53 AM, Bjoern A. Zeeb wrote: >=20 > On 12. Jun 2012, at 12:44 , Randall Stewart wrote: >=20 >> Author: rrs >> Date: Tue Jun 12 12:44:17 2012 >> New Revision: 236955 >> URL: http://svn.freebsd.org/changeset/base/236955 >>=20 >> Log: >> Note to self. Have morning coffee *before* committing things. >> There is no mac_addr in the mbuf for BSD.. cheat like >> we are supposed to and use the csum field since our friend >> the gif tunnel itself will never use offload. >=20 > There are cards that can do checksums for IPIP... with drivers in out = tree. >=20 >=20 >>=20 >> Modified: >> head/sys/net/if_gif.c >>=20 >> Modified: head/sys/net/if_gif.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 >> --- head/sys/net/if_gif.c Tue Jun 12 12:40:15 2012 = (r236954) >> +++ head/sys/net/if_gif.c Tue Jun 12 12:44:17 2012 = (r236955) >> @@ -388,7 +388,8 @@ keep_going: >> /* Now pull back the af in packet that >> * was saved in the address location. >> */ >> - bcopy(m->m_pkthdr.src_mac_addr, &af, sizeof(af)); >> + af =3D m->m_pkthdr.csum_data; >> + =09 >> if (ifp->if_bridge) >> af =3D AF_LINK; >>=20 >> @@ -503,10 +504,11 @@ gif_output(ifp, m, dst, ro) >> dst->sa_family =3D af; >> } >> af =3D dst->sa_family; >> - /* Now save the af in the inbound pkt mac >> - * address location. >> + /* Now save the af in the inbound pkt csum >> + * data, this is a cheat since really >> + * gif tunnels don't do offload. >> */ >> - bcopy(&af, m->m_pkthdr.src_mac_addr, sizeof(af)); >> + m->m_pkthdr.csum_data =3D af; >> if (!(ifp->if_flags & IFF_UP) || >> sc->gif_psrc =3D=3D NULL || sc->gif_pdst =3D=3D NULL) { >> m_freem(m); >=20 > --=20 > Bjoern A. Zeeb You have to have = visions! > It does not matter how good you are. It matters what good you do! >=20 >=20 ------------------------------ Randall Stewart 803-317-4952 (cell)