From owner-svn-src-all@FreeBSD.ORG Thu Jul 19 10:47:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3900106564A; Thu, 19 Jul 2012 10:47:08 +0000 (UTC) (envelope-from ermal.luci@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7B38FC15; Thu, 19 Jul 2012 10:47:08 +0000 (UTC) Received: by qaat11 with SMTP id t11so1677669qaa.13 for ; Thu, 19 Jul 2012 03:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=C5njcXtDi2WzRLL6a8aD0zmh2VqRDMjKqfXKSux9DGU=; b=gsX4WyNP0aS8IvKOf3UFNrorFVXDu3a6HEvfAszpc2U+jE76W2uiDOIGvuuyrY6Md4 0V9J35Tli8ovlreoq49PsnCWCh6JE8/0X1jMgkj5fIl1s2ceht9fbFYNhtyXdmc632+b IGBmR6KxXp5vkUvxJxK35DdrzbGskAXH5sl9zg/bUieXMwlSXJoBBRo9suPmY0lz51NR vuikUE9macfCp9ej7wxmcerirZKPJL3FOUM02cGmJEfzWoFK71N2bky5FV9GhLrHqgsp j3/bdMXtJ/iWkzC5wc6M3dIm6zDb1+9AXb8ZyNIu/+jmxDHeRtDPt7xGfCD9YC9KSJng z9pQ== MIME-Version: 1.0 Received: by 10.224.213.74 with SMTP id gv10mr2836028qab.25.1342694827571; Thu, 19 Jul 2012 03:47:07 -0700 (PDT) Sender: ermal.luci@gmail.com Received: by 10.229.161.211 with HTTP; Thu, 19 Jul 2012 03:47:07 -0700 (PDT) In-Reply-To: <201207181613.q6IGD4gZ087600@svn.freebsd.org> References: <201207181613.q6IGD4gZ087600@svn.freebsd.org> Date: Thu, 19 Jul 2012 12:47:07 +0200 X-Google-Sender-Auth: mRLF3P4P2LYkhWGRgIbfQtiLzDM Message-ID: From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2012 10:47:09 -0000 I would prefer to be in CC for this or at least asked! On Wed, Jul 18, 2012 at 6:13 PM, Gleb Smirnoff 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