[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 1421] altq-3.1 errata




I've placed the following errata file at
ftp://ftp.csl.sony.co.jp/pub/kjc/altq-3.1.errata.txt

-Kenjiro

----------------------------------------------------------------------

This file contains post-release ERRATA for altq-3.1.

Currently 2 problems are listed.
	1. FreeBSD: kernel ppp panics when ALTQ is enabled (2002/03/26)
	2. FreeBSD and OpenBSD: the vr driver causes panic  (2002/04/04)

1. FreeBSD: kernel ppp panics when ALTQ is enabled (2002/03/26)
	
    Problem description:
	FreeBSD doesn;t initialize the if_softc field,
	and the kernel panics if ALTQ is enabled on kernel ppp.

    Solution:
	Appy the following patch to sys-altq/net/if_ppp.c.

--- if_ppp.c.orig	Tue Mar 26 11:20:28 2002
+++ if_ppp.c	Tue Mar 26 11:21:27 2002
@@ -211,6 +211,7 @@
 	sc->sc_if.if_ioctl = pppsioctl;
 	sc->sc_if.if_output = pppoutput;
 #ifdef ALTQ
+	sc->sc_if.if_softc = sc;
 	sc->sc_if.if_start = ppp_ifstart;
 #endif
 	IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN);


2. FreeBSD and OpenBSD: the vr driver causes panic  (2002/04/04)

    Problem description:
	the kernel panics on the vr driver.
	vr_encap() copies and frees the original mbuf so that the
	original mbuf isn't valid after vr_encap().

    Solution:
	Appy the following patch to the vr driver.

for FreeBSD, use this patch.

Index: if_vr.c
===================================================================
RCS file: /cvsroot/kame/kame/freebsd4/sys/pci/if_vr.c,v
retrieving revision 1.9
diff -u -r1.9 if_vr.c
--- if_vr.c	2002/02/07 12:46:13	1.9
+++ if_vr.c	2002/04/04 05:01:00
@@ -1330,7 +1330,7 @@
 	start_tx = sc->vr_cdata.vr_tx_free;
 
 	while(sc->vr_cdata.vr_tx_free->vr_mbuf == NULL) {
-		IFQ_POLL(&ifp->if_snd, m_head);
+		IFQ_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;
 
@@ -1340,16 +1340,18 @@
 
 		/* Pack the data into the descriptor. */
 		if (vr_encap(sc, cur_tx, m_head)) {
-			ifp->if_flags |= IFF_OACTIVE;
+			if (ALTQ_IS_ENABLED(&ifp->if_snd)) {
+				m_freem(m_head);
+			} else {
+				IF_PREPEND(&ifp->if_snd, m_head);
+				ifp->if_flags |= IFF_OACTIVE;
+			}
 			cur_tx = NULL;
 			break;
 		}
 
 		if (cur_tx != start_tx)
 			VR_TXOWN(cur_tx) = VR_TXSTAT_OWN;
-
-		/* now we are committed to transmit the packet */
-		IFQ_DEQUEUE(&ifp->if_snd, m_head);
 
 		/*
 		 * If there's a BPF listener, bounce a copy of this frame


for OpenBSD, use this patch.

Index: if_vr.c
===================================================================
RCS file: /cvsroot/kame/kame/openbsd/sys/dev/pci/if_vr.c,v
retrieving revision 1.8
diff -u -r1.8 if_vr.c
--- if_vr.c	2002/02/19 07:05:33	1.8
+++ if_vr.c	2002/04/04 05:01:26
@@ -1290,7 +1290,7 @@
 	start_tx = sc->vr_cdata.vr_tx_free;
 
 	while(sc->vr_cdata.vr_tx_free->vr_mbuf == NULL) {
-		IFQ_POLL(&ifp->if_snd, m_head);
+		IFQ_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;
 
@@ -1300,16 +1300,18 @@
 
 		/* Pack the data into the descriptor. */
 		if (vr_encap(sc, cur_tx, m_head)) {
-			ifp->if_flags |= IFF_OACTIVE;
+			if (ALTQ_IS_ENABLED(&ifp->if_snd)) {
+				m_freem(m_head);
+			} else {
+				IF_PREPEND(&ifp->if_snd, m_head);
+				ifp->if_flags |= IFF_OACTIVE;
+			}
 			cur_tx = NULL;
 			break;
 		}
 
 		if (cur_tx != start_tx)
 			VR_TXOWN(cur_tx) = VR_TXSTAT_OWN;
-
-		/* now we are committed to transmit the packet */
-		IFQ_DEQUEUE(&ifp->if_snd, m_head);
 
 #if NBPFILTER > 0
 		/*
----------------------------------------------------------------------