From owner-freebsd-pf@FreeBSD.ORG Tue Aug 28 20:53:50 2007 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 348E216A46B for ; Tue, 28 Aug 2007 20:53:50 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by mx1.freebsd.org (Postfix) with ESMTP id A6A5E13C4A5 for ; Tue, 28 Aug 2007 20:53:49 +0000 (UTC) (envelope-from max@love2party.net) Received: from dslb-088-066-017-000.pools.arcor-ip.net [88.66.17.0] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1IQ84K0nAP-0008Hy; Tue, 28 Aug 2007 22:53:48 +0200 From: Max Laier Organization: FreeBSD To: "Bill Marquette" Date: Tue, 28 Aug 2007 22:53:38 +0200 User-Agent: KMail/1.9.7 References: <55e8a96c0708221242h2d5e7d15q847e6fac7cf60554@mail.gmail.com> <55e8a96c0708272114n42c0d9e7h675d1a9043bf3d80@mail.gmail.com> <55e8a96c0708281344y62bbb152k3f2a7e9d375a2acd@mail.gmail.com> In-Reply-To: <55e8a96c0708281344y62bbb152k3f2a7e9d375a2acd@mail.gmail.com> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8114292.2W39dtXNfE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200708282253.46740.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19cNpV5f1ayQQMNuf0rs58vASj/xiY5ZzrssXh UihMx/KScld3QE8EtXBIsWJys9hdyBEF4IL+nrr3WXMv9Aia1A Tc4sQxS/NdBgIGhpuNIQNvzq3UhMZ02GauNoYc6B7A= Cc: freebsd-pf@freebsd.org Subject: Re: pfsync errors X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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: Tue, 28 Aug 2007 20:53:50 -0000 --nextPart8114292.2W39dtXNfE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 28 August 2007, Bill Marquette wrote: > On 8/27/07, Bill Marquette wrote: > > > > Here's what we get with the patch: > > > > pfsync_senddef: ip_output 64 > > > > > > that's EHOSTDOWN ... that's strange. Are you using syncpeer? > > After converting both sides to using syncpeer, I now got this in my > dmesg after reboot: > > Trying to mount root from ufs:/dev/da0s2a > pfsync_senddef: ip_output 65 > pfsync_senddef: ip_output 65 > > $ netstat -s -ppfsync && sleep 1 && netstat -s -ppfsync > pfsync: > 699811 packets received (IPv4) > 0 packets received (IPv6) > 0 packets discarded for bad interface > 0 packets discarded for bad ttl > 0 packets shorter than header > 0 packets discarded for bad version > 0 packets discarded for bad HMAC > 0 packets discarded for bad action > 0 packets discarded for short packet > 0 states discarded for bad values > 0 stale states > 61740 failed state lookup/inserts > 46728 packets sent (IPv4) > 0 packets sent (IPv6) > 0 send failed due to mbuf memory error > 23020 send error > pfsync: > 704677 packets received (IPv4) > 0 packets received (IPv6) > 0 packets discarded for bad interface > 0 packets discarded for bad ttl > 0 packets shorter than header > 0 packets discarded for bad version > 0 packets discarded for bad HMAC > 0 packets discarded for bad action > 0 packets discarded for short packet > 0 states discarded for bad values > 0 stale states > 62032 failed state lookup/inserts > 47070 packets sent (IPv4) > 0 packets sent (IPv6) > 0 send failed due to mbuf memory error > 23221 send error > > The other pfsyncstats.pfsyncs_oerrors++ is after a IF_HANDOFF macro, I > traced it back to if_handoff() in if.c, but I'm not sure how to track > it down any further as it look like it's _IF_QFULL(ifq) that's > triggering the return 0. > > I'm going to toy with some settings for the em(4) driver in > loader.conf and see if I can raise the txd and rxd descriptors since > we're not running on 82542 or 82543 chipped hardware we can go above > 256 descriptors. No that's the internal work deferral queue. Try something like the=20 following in contrib/pf/net/if_pfsync.c: @@ -229,7 +229,7 @@ callout_init(&sc->sc_bulk_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_bulkfail_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_send_tmo, NET_CALLOUT_MPSAFE); =2D sc->sc_ifq.ifq_maxlen =3D ifqmaxlen; + sc->sc_ifq.ifq_maxlen =3D 2 * ifqmaxlen; mtx_init(&sc->sc_ifq.ifq_mtx, ifp->if_xname, "pfsync send queue", MTX_DEF); if_attach(ifp); But there might be other reasons like timing wrt the locks. I'll have to=20 check for details. It might also be a good idea to MFC the taskqueue=20 approach from CURRENT, rather than using the callout ... that's a bit of=20 work however. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart8114292.2W39dtXNfE Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBG1ItaXyyEoT62BG0RAiQXAJ96MwKuzLsyXcgFzZr7bCEZPxA4xACfTcB4 MHwsRAisyPoCIDsRZUn/6gQ= =IcpH -----END PGP SIGNATURE----- --nextPart8114292.2W39dtXNfE--