Date: Thu, 3 Jun 2010 15:09:21 +0200 From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= <eri@freebsd.org> To: Robert Watson <rwatson@freebsd.org> 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 Message-ID: <AANLkTimEyii8eF05vgQRuSh5eQVwBceIcxwgFeUSu80b@mail.gmail.com> In-Reply-To: <201006030855.o538tjke024438@svn.freebsd.org> References: <201006030855.o538tjke024438@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 3, 2010 at 10:55 AM, Robert Watson <rwatson@freebsd.org> wrote: > Author: rwatson > Date: Thu Jun 3 08:55:45 2010 > New Revision: 208766 > URL: http://svn.freebsd.org/changeset/base/208766 > > Log: > Merge r204810 from head to stable/8: > > Remove unnecessary locking of divcbinfo lock from div_output(): this has > not been required since FreeBSD 7.0 when the so_pcb pointer leading to inp > was guaranteed to be stable when a valid socket reference is held (as it > is in the output path). > > Reviewed by: bz > Sponsored by: Juniper Networks > > Approved by: re (kib) > > Modified: > stable/8/sys/netinet/ip_divert.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) > stable/8/sys/geom/sched/ (props changed) > > Modified: stable/8/sys/netinet/ip_divert.c > ============================================================================== > --- stable/8/sys/netinet/ip_divert.c Thu Jun 3 03:55:22 2010 (r208765) > +++ stable/8/sys/netinet/ip_divert.c Thu Jun 3 08:55:45 2010 (r208766) > @@ -392,7 +392,6 @@ div_output(struct socket *so, struct mbu > struct inpcb *inp; > > dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT; > - INP_INFO_WLOCK(&V_divcbinfo); > inp = sotoinpcb(so); > INP_RLOCK(inp); > /* > @@ -403,7 +402,6 @@ div_output(struct socket *so, struct mbu > ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) { > error = EINVAL; > INP_RUNLOCK(inp); > - INP_INFO_WUNLOCK(&V_divcbinfo); > m_freem(m); > } else { > /* Convert fields to host order for ip_output() */ > @@ -444,7 +442,6 @@ div_output(struct socket *so, struct mbu > error = ENOBUFS; > } > INP_RUNLOCK(inp); > - INP_INFO_WUNLOCK(&V_divcbinfo); > if (error == ENOBUFS) { > m_freem(m); > return (error); > 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. -- Ermal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimEyii8eF05vgQRuSh5eQVwBceIcxwgFeUSu80b>
