Date: Thu, 14 Jul 2005 22:32:29 +0200 From: Max Laier <max@love2party.net> To: freebsd-pf@freebsd.org Subject: Re: ALTQ support on bge interface? Message-ID: <200507142232.36112.max@love2party.net> In-Reply-To: <42D258CE.60507@kasimir.com> References: <B6D948D84090A54ABCD88AA391DAAC8C01896427@tiasbel00ex00.be.eu.tiauto.com> <42D258CE.60507@kasimir.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507142232.36112.max>