Subject: Re: altq 3.0 kernel interacts negatively with pppd?
To: Kenjiro Cho , 386 Port NetBSD <port-i386@netbsd.org>
From: Scott Presnell <srp@zgi.com>
List: port-i386
Date: 10/17/2001 09:19:58
Kenjiro Cho wrote:
> 
> Scott Presnell wrote:

> > Is there something I need to do with altq to allow connections on ppp
> > interfaces even though the other network interfaces seem to operate correctly?
> 
> No.
> 
> > Or does this seem like a problem?
> 
> I'm afraid so.
> 
> Can you replace only "sys/net/if_ppp.c" by the original (unpatched)
> file?
> 
> The symptom indicates that net interrupts are blocked until ppp times
> out.  I have no idea about how it is related to ALTQ, and I don't have
> a ppp setup to test with at this moment.
> 
Hi Kenjiro,

I had problems when I tried the replacement above:

cc1: warnings being treated as errors
../../../../net/if_ppp.c: In function `pppoutput':
../../../../net/if_ppp.c:873: warning: pointer type mismatch in conditional expression
../../../../net/if_ppp.c: In function `ppp_requeue':
../../../../net/if_ppp.c:929: warning: pointer type mismatch in conditional expression

in the unpatched if_ppp.c those lines are:

ifq = (m0->m_flags & M_HIGHPRI)? &sc->sc_fastq: &ifp->if_snd;

but with the altq patch for if.h:

#if 1 /* ALTQ */
      struct  ifaltq if_snd;          /* output queue (includes altq) */
#else
      struct  ifqueue if_snd;         /* output queue */
#endif

... and...
        struct  ifqueue sc_fastq;       /* interactive output packet q */ 

so if_snd and sc_fastq are not the same structure type.

I didn't see a simple way around this so ...

Instead, I used the altq patched source, but didn't enable ALTQ options
in the configuration file.

A kernel built with the altq patches, but none of the ALTQ options turned
on still has the problem when pppd tries to start.

If you have more ideas about what part of the ppp code to look at I would be
happy to continue to troubleshoot.  I will think about it myself.

	Thanks.

	- Scott