From owner-freebsd-pf@FreeBSD.ORG Mon Jan 23 11:50:07 2012 Return-Path: Delivered-To: freebsd-pf@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCC69106566B for ; Mon, 23 Jan 2012 11:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CA5A98FC12 for ; Mon, 23 Jan 2012 11:50:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0NBo7Gu024555 for ; Mon, 23 Jan 2012 11:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0NBo7gH024552; Mon, 23 Jan 2012 11:50:07 GMT (envelope-from gnats) Date: Mon, 23 Jan 2012 11:50:07 GMT Message-Id: <201201231150.q0NBo7gH024552@freefall.freebsd.org> To: freebsd-pf@FreeBSD.org From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= Cc: Subject: Re: kern/163208: [pf] PF state key linking mismatch X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?ISO-8859-1?Q?Ermal_Lu=E7i?= List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 11:50:07 -0000 The following reply was made to PR kern/163208; it has been noted by GNATS. From: =?ISO-8859-1?Q?Ermal_Lu=E7i?= To: =?ISO-8859-1?Q?Tilman_Keskin=F6z?= Cc: bug-followup@freebsd.org, freebsd-pf@freebsd.org Subject: Re: kern/163208: [pf] PF state key linking mismatch Date: Mon, 23 Jan 2012 12:16:38 +0100 --90e6ba6e89dc108bd804b7302abd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sun, Jan 22, 2012 at 11:41 AM, Tilman Keskin=F6z wro= te: > * Bjoern A. Zeeb [Sat, 21 Jan 2012 21:01:41 +0000]: > > > > On 21. Jan 2012, at 20:52 , Tilman Keskin=F6z wrote: > > > >> > >> On Jan 21, 2012, at 21:01 , Fabian Keil wrote: > >> > >>> Tilman Keskin=F6z wrote: > >>> > >>>> Same here. > >>>> > >>>> Also Fabian Keil reported this in > >>>> > http://lists.freebsd.org/pipermail/freebsd-current/2011-July/025696.html > >>> > >>> This has been fixed in CURRENT shortly thereafter: > >>> http://lists.freebsd.org/pipermail/freebsd-pf/2011-July/006199.html > >>> > >>> Maybe the fix hasn't been MFC'd. > >> > >> Hm, r223765 happend before the RELENG_9 Branchpoint. > >> So maybe the Fix was not complete? > > > > See thread from earlier this month on freebsd-pf > > > > The Thread suggests: > > * Matt Lager [Thu, 12 Jan 2012 15:48:23 -0700]: > > So it looks likeI can comment out this code in > > /usr/src/sys/contrib/pf/net/pf.c: > > > > /* mismatch. must not happen. */ > > printf("pf: state key linking mismatch! dir=3D%s, " > > "if=3D%s, stored af=3D%u, a0: ", > > dir =3D=3D PF_OUT ? "OUT" : "IN", kif->pfik_name, a= ->af); > > > > When this error occurs, I guess for valid reasons, does PF drop packets > > or do something else with them, or is this purely an information notic= e? > > I can confirm that removing this printf, brings back the performance for > me. > > Probably a sysctl to disable this should be provided. There might be unexpected consequences from this and the better fix is to find the section where the mbuf is being reused. > Please fix :) > > _______________________________________________ > freebsd-pf@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-pf > To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" > --=20 Ermal --90e6ba6e89dc108bd804b7302abd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Sun, Jan 22, 2012 at 11:41 AM, Tilman Keskin= =F6z <arved@freeb= sd.org> wrote:
* Bjoern A. Zeeb [Sat, 21 Jan 2012 21:01:41 +0000]:
&g= t;
> On 21. Jan 2012, at 20:52 , Tilman Keskin=F6z wrote:=
>
>>
>> On Jan 21, 2012, at 21:01 , Fabian Keil wr= ote:
>>
>>> Tilman Keskin=F6z <arved@FreeBSD.org>= ; wrote:
>>>
>>>> Same here.
>>>>
>>= >> Also Fabian Keil reported this in
>>>> http://lists.freebsd.org/pipermail/freebsd-current/2011-Jul= y/025696.html
>>>
>>> This has been fixed in CURRENT shortly thereaf= ter:
>>> http://lists.freebsd.org/piperm= ail/freebsd-pf/2011-July/006199.html
>>>
>>> Maybe the fix hasn't been MFC'd.
&g= t;>
>> Hm, r223765 happend before the RELENG_9 Branchpoint.
= >> So maybe the Fix was not complete?
>
> See thread from= earlier this month on freebsd-pf
>

The Thread suggests:

* Matt Lager [Thu, 12 Jan 201= 2 15:48:23 -0700]:
> So it looks likeI can comment out this code in> /usr/src/sys/contrib/pf/net/pf.c:
>
> =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* mismatch. must not happen. */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("pf: state key linking mis= match! dir=3D%s, "
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &qu= ot;if=3D%s, stored af=3D%u, a0: ",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 dir =3D=3D PF_OUT ? "OUT" : "IN", kif->= pfik_name, a->af);
>
> When this error occurs, I guess for valid reasons, does PF dro= p packets
> or do something else with them, or is this purely an info= rmation =A0notice?

I can confirm that removing this printf, brings b= ack the performance for me.

=A0
=A0
Probably a sysctl to disable this should be provided.
There might be unexpected consequences from this and the better fix is= to find the section where the mbuf is being reused.
=A0
Please fix :)

_______________________________________________
freebsd-pf@freebsd.org mailing list=
http://lists.freebsd.org/mailman/listinfo/freebsd-pf
To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org"



--
Ermal
--90e6ba6e89dc108bd804b7302abd--