From owner-freebsd-pf@FreeBSD.ORG Thu Jul 14 20:32:45 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 932E216A41C for ; Thu, 14 Jul 2005 20:32:45 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id C37BA43D5E for ; Thu, 14 Jul 2005 20:32:42 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3DEA1.dip.t-dialin.net [84.163.222.161] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwpI-1DtANp3Ben-0004iU; Thu, 14 Jul 2005 22:32:37 +0200 From: Max Laier To: freebsd-pf@freebsd.org Date: Thu, 14 Jul 2005 22:32:29 +0200 User-Agent: KMail/1.8 References: <42D258CE.60507@kasimir.com> In-Reply-To: <42D258CE.60507@kasimir.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart9667726.Fgj0PVO5xg"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507142232.36112.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Subject: Re: ALTQ support on bge interface? 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: Thu, 14 Jul 2005 20:32:45 -0000 --nextPart9667726.Fgj0PVO5xg Content-Type: multipart/mixed; boundary="Boundary-01=_fvs1CdwRgl6fOX/" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_fvs1CdwRgl6fOX/ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 11 July 2005 13:32, Florian C. Smeets wrote: > > As it is quite often used (e.g.: HP DL380 server), are there any plan to > > support ALTQ on bge interface? > > bge has altq suppot in -CURRENT but it seems that it was never merged > back to RELENG_5. Here is a patch relative to RELENG_5. Please take it for a spin and let me= =20 know if it works reliably. =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 --Boundary-01=_fvs1CdwRgl6fOX/ Content-Type: text/x-diff; charset="iso-8859-1"; name="if_bge.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="if_bge.c.diff" Index: if_bge.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 RCS file: /usr/store/mlaier/fcvs/src/sys/dev/bge/if_bge.c,v retrieving revision 1.72.2.13 diff -u -r1.72.2.13 if_bge.c =2D-- if_bge.c 22 May 2005 03:17:49 -0000 1.72.2.13 +++ if_bge.c 14 Jul 2005 20:30:14 -0000 @@ -2399,7 +2399,9 @@ ifp->if_watchdog =3D bge_watchdog; ifp->if_init =3D bge_init; ifp->if_mtu =3D ETHERMTU; =2D ifp->if_snd.ifq_maxlen =3D BGE_TX_RING_CNT - 1; + ifp->if_snd.ifq_drv_maxlen =3D BGE_TX_RING_CNT - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); ifp->if_hwassist =3D BGE_CSUM_FEATURES; /* NB: the code for RX csum offload is disabled for now */ ifp->if_capabilities =3D IFCAP_TXCSUM | IFCAP_VLAN_HWTAGGING | @@ -2997,7 +2999,7 @@ /* Re-enable interrupts. */ CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 0); =20 =2D if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head !=3D NULL) + if (ifp->if_flags & IFF_RUNNING && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); =20 BGE_UNLOCK(sc); @@ -3038,7 +3040,7 @@ if (bootverbose) printf("bge%d: gigabit link up\n", sc->bge_unit); =2D if (ifp->if_snd.ifq_head !=3D NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); } return; @@ -3054,7 +3056,7 @@ IFM_SUBTYPE(mii->mii_media_active) =3D=3D IFM_1000_SX) && bootverbose) printf("bge%d: gigabit link up\n", sc->bge_unit); =2D if (ifp->if_snd.ifq_head !=3D NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); } =20 @@ -3220,13 +3222,13 @@ =20 sc =3D ifp->if_softc; =20 =2D if (!sc->bge_link && ifp->if_snd.ifq_len < 10) + if (!sc->bge_link && IFQ_DRV_IS_EMPTY(&ifp->if_snd)) return; =20 prodidx =3D CSR_READ_4(sc, BGE_MBX_TX_HOST_PROD0_LO); =20 while(sc->bge_cdata.bge_tx_chain[prodidx] =3D=3D NULL) { =2D IF_DEQUEUE(&ifp->if_snd, m_head); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head =3D=3D NULL) break; =20 @@ -3247,7 +3249,7 @@ m_head->m_pkthdr.csum_flags & (CSUM_DELAY_DATA)) { if ((BGE_TX_RING_CNT - sc->bge_txcnt) < m_head->m_pkthdr.csum_data + 16) { =2D IF_PREPEND(&ifp->if_snd, m_head); + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |=3D IFF_OACTIVE; break; } @@ -3259,7 +3261,7 @@ * for the NIC to drain the ring. */ if (bge_encap(sc, m_head, &prodidx)) { =2D IF_PREPEND(&ifp->if_snd, m_head); + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |=3D IFF_OACTIVE; break; } --Boundary-01=_fvs1CdwRgl6fOX/-- --nextPart9667726.Fgj0PVO5xg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBC1svkXyyEoT62BG0RAnzWAJwPU2BIwtBpldQfregg5dSC++kJHwCeLEBo TOALEDsstLTNRtc3Oaweilc= =syTe -----END PGP SIGNATURE----- --nextPart9667726.Fgj0PVO5xg--