Date: Thu, 19 Jul 2012 12:47:07 +0200 From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= <eri@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r238600 - stable/9/sys/contrib/pf/net Message-ID: <CAPBZQG3NrWbEn5FsppKg1h1Ht8F=wXfKW9xexHzcGA_1sz%2BRFQ@mail.gmail.com> In-Reply-To: <201207181613.q6IGD4gZ087600@svn.freebsd.org> References: <201207181613.q6IGD4gZ087600@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I would prefer to be in CC for this or at least asked! On Wed, Jul 18, 2012 at 6:13 PM, Gleb Smirnoff <glebius@freebsd.org> wrote: > Author: glebius > Date: Wed Jul 18 16:13:03 2012 > New Revision: 238600 > URL: http://svn.freebsd.org/changeset/base/238600 > > Log: > Merge r230119, r238498 from head: > > -----------------------------------------------------------------------= - > r230119 | csjp | 2012-01-15 02:51:34 +0400 (=D0=B2=D1=81, 15 =D1=8F=D0= =BD=D0=B2 2012) | 9 lines > > Revert to the old behavior of allocating table/table entries using > M_NOWAIT. Currently, the code allows for sleeping in the ioctl path > to guarantee allocation. However code also handles ENOMEM gracefully, = so > propagate this error back to user-space, rather than sleeping while > holding the global pf mutex. > > Reviewed by: glebius > Discussed with: bz > > -----------------------------------------------------------------------= - > r238498 | glebius | 2012-07-15 23:10:00 +0400 (=D0=B2=D1=81, 15 =D0=B8= =D1=8E=D0=BB 2012) | 2 lines > > Use M_NOWAIT while holding the pf giant lock. > > Approved by: re (kib) > > Modified: > stable/9/sys/contrib/pf/net/pf_if.c > stable/9/sys/contrib/pf/net/pf_table.c > Directory Properties: > stable/9/sys/ (props changed) > stable/9/sys/contrib/pf/ (props changed) > > Modified: stable/9/sys/contrib/pf/net/pf_if.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/9/sys/contrib/pf/net/pf_if.c Wed Jul 18 15:52:09 2012 (= r238599) > +++ stable/9/sys/contrib/pf/net/pf_if.c Wed Jul 18 16:13:03 2012 (= r238600) > @@ -506,8 +506,7 @@ pfi_dynaddr_setup(struct pf_addr_wrap *a > if (aw->type !=3D PF_ADDR_DYNIFTL) > return (0); > #ifdef __FreeBSD__ > - /* XXX: revisit! */ > - if ((dyn =3D pool_get(&V_pfi_addr_pl, PR_WAITOK | PR_ZERO)) > + if ((dyn =3D pool_get(&V_pfi_addr_pl, PR_NOWAIT | PR_ZERO)) > #else > if ((dyn =3D pool_get(&pfi_addr_pl, PR_WAITOK | PR_LIMITFAIL | PR= _ZERO)) > #endif > > Modified: stable/9/sys/contrib/pf/net/pf_table.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/9/sys/contrib/pf/net/pf_table.c Wed Jul 18 15:52:09 2012 = (r238599) > +++ stable/9/sys/contrib/pf/net/pf_table.c Wed Jul 18 16:13:03 2012 = (r238600) > @@ -926,16 +926,12 @@ pfr_create_kentry(struct pfr_addr *ad, i > { > struct pfr_kentry *ke; > > - if (intr) > #ifdef __FreeBSD__ > - ke =3D pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO); > + ke =3D pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO); > #else > + if (intr) > ke =3D pool_get(&pfr_kentry_pl, PR_NOWAIT | PR_ZERO); > -#endif > else > -#ifdef __FreeBSD__ > - ke =3D pool_get(&V_pfr_kentry_pl, PR_WAITOK|PR_ZERO); > -#else > ke =3D pool_get(&pfr_kentry_pl, PR_WAITOK|PR_ZERO|PR_LIMI= TFAIL); > #endif > if (ke =3D=3D NULL) > @@ -2080,16 +2076,12 @@ pfr_create_ktable(struct pfr_table *tbl, > struct pfr_ktable *kt; > struct pf_ruleset *rs; > > - if (intr) > #ifdef __FreeBSD__ > - kt =3D pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO); > + kt =3D pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO); > #else > + if (intr) > kt =3D pool_get(&pfr_ktable_pl, PR_NOWAIT|PR_ZERO|PR_LIMI= TFAIL); > -#endif > else > -#ifdef __FreeBSD__ > - kt =3D pool_get(&V_pfr_ktable_pl, PR_WAITOK|PR_ZERO); > -#else > kt =3D pool_get(&pfr_ktable_pl, PR_WAITOK|PR_ZERO|PR_LIMI= TFAIL); > #endif > if (kt =3D=3D NULL) --=20 Ermal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPBZQG3NrWbEn5FsppKg1h1Ht8F=wXfKW9xexHzcGA_1sz%2BRFQ>