From owner-svn-src-stable@FreeBSD.ORG Thu Jun 3 13:35:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B0D11065674; Thu, 3 Jun 2010 13:35:26 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDD38FC1F; Thu, 3 Jun 2010 13:35:22 +0000 (UTC) Received: by wwb22 with SMTP id 22so102230wwb.13 for ; Thu, 03 Jun 2010 06:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=sL8E3UZ2jHO/1V4OBu+nKg9/Hi0f3LTdCCDp5hsEovc=; b=j66hGir3qm31IMcVX0s4EqrJQVhXCQCF+0Xpiu5+gOxSaD5RkcF/ndxhYe4D4V6meI ywKhuM/VTwLrp99YsSuR0OOfQTEo7rXWvK2nR+mviugeVa83ng/lQKFrTiTLQIrY+vzZ VLWkAkR5whu69jQFlv/iq3DsZf6843xlSjQUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=jrKtXKopvEOIn8Nb5xm+xLeCQm4LK48EzkWOJtdKUXgfPtpzm/1xoPAb4Fok1XMB2A o/96htvRIXPItKJX7TrQjbJeXFBWr04RSnyfxnFYQ2JiKxKbqPBhf2rWqKheDMuyP/aq Wsg5FRyEok7h0Ct8oJUqu24+XvByp9Kr7oJUo= Received: by 10.227.136.195 with SMTP id s3mr9464378wbt.1.1275570584549; Thu, 03 Jun 2010 06:09:44 -0700 (PDT) MIME-Version: 1.0 Sender: ermal.luci@gmail.com Received: by 10.216.8.68 with HTTP; Thu, 3 Jun 2010 06:09:21 -0700 (PDT) In-Reply-To: <201006030855.o538tjke024438@svn.freebsd.org> References: <201006030855.o538tjke024438@svn.freebsd.org> From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Date: Thu, 3 Jun 2010 15:09:21 +0200 X-Google-Sender-Auth: vy8XdFOzyzfVosZAxEbno_hO5HQ Message-ID: To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r208766 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 13:35:26 -0000 On Thu, Jun 3, 2010 at 10:55 AM, Robert Watson wrote: > Author: rwatson > Date: Thu Jun =A03 08:55:45 2010 > New Revision: 208766 > URL: http://svn.freebsd.org/changeset/base/208766 > > Log: > =A0Merge r204810 from head to stable/8: > > =A0 =A0Remove unnecessary locking of divcbinfo lock from div_output(): th= is has > =A0 =A0not been required since FreeBSD 7.0 when the so_pcb pointer leadin= g to inp > =A0 =A0was guaranteed to be stable when a valid socket reference is held = (as it > =A0 =A0is in the output path). > > =A0 =A0Reviewed by: =A0 =A0 =A0 =A0bz > =A0 =A0Sponsored by: =A0 =A0 =A0 Juniper Networks > > =A0Approved by: =A0re (kib) > > Modified: > =A0stable/8/sys/netinet/ip_divert.c > Directory Properties: > =A0stable/8/sys/ =A0 (props changed) > =A0stable/8/sys/amd64/include/xen/ =A0 (props changed) > =A0stable/8/sys/cddl/contrib/opensolaris/ =A0 (props changed) > =A0stable/8/sys/contrib/dev/acpica/ =A0 (props changed) > =A0stable/8/sys/contrib/pf/ =A0 (props changed) > =A0stable/8/sys/dev/xen/xenpci/ =A0 (props changed) > =A0stable/8/sys/geom/sched/ =A0 (props changed) > > Modified: stable/8/sys/netinet/ip_divert.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 > --- stable/8/sys/netinet/ip_divert.c =A0 =A0Thu Jun =A03 03:55:22 2010 = =A0 =A0 =A0 =A0(r208765) > +++ stable/8/sys/netinet/ip_divert.c =A0 =A0Thu Jun =A03 08:55:45 2010 = =A0 =A0 =A0 =A0(r208766) > @@ -392,7 +392,6 @@ div_output(struct socket *so, struct mbu > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct inpcb *inp; > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dt->info |=3D IPFW_IS_DIVERT | IPFW_INFO_O= UT; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 INP_INFO_WLOCK(&V_divcbinfo); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0inp =3D sotoinpcb(so); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0INP_RLOCK(inp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* > @@ -403,7 +402,6 @@ div_output(struct socket *so, struct mbu > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ((u_short)ntohs(ip->ip_len) > m->= m_pkthdr.len)) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0error =3D EINVAL; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0INP_RUNLOCK(inp); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 INP_INFO_WUNLOCK(&V_divcbin= fo); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* Convert fields to host = order for ip_output() */ > @@ -444,7 +442,6 @@ div_output(struct socket *so, struct mbu > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0error =3D ENOBUFS; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0INP_RUNLOCK(inp); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 INP_INFO_WUNLOCK(&V_divcbin= fo); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (error =3D=3D ENOBUFS) = { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_freem(m)= ; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (er= ror); > Would it make sense to remove even passing the interface name up and actually send the interface index? That is what we are doing at pfSense and it works quite ok. --=20 Ermal