From owner-freebsd-hackers Wed Sep 18 18:18:54 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA01004 for hackers-outgoing; Wed, 18 Sep 1996 18:18:54 -0700 (PDT) Received: from research.gate.nec.co.jp (research.gate.nec.co.jp [202.32.8.49]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA00961 for ; Wed, 18 Sep 1996 18:18:50 -0700 (PDT) Received: from sbl-gw.sbl.cl.nec.co.jp by research.gate.nec.co.jp (8.7.5+2.6Wbeta6/950912) with ESMTP id KAA21701; Thu, 19 Sep 1996 10:18:35 +0900 (JST) Received: from sirius.sbl.cl.nec.co.jp by sbl-gw.sbl.cl.nec.co.jp (8.7.5+2.6Wbeta6/3.3W6) with ESMTP id KAA29478; Thu, 19 Sep 1996 10:18:30 +0900 (JST) X-Authentication-Warning: sbl-gw.sbl.cl.nec.co.jp: Host nao@sirius [133.207.68.90] claimed to be sirius.sbl.cl.nec.co.jp Received: by sirius.sbl.cl.nec.co.jp (8.7.5+2.6Wbeta6/3.3W6) with UUCP id KAA11113; Thu, 19 Sep 1996 10:18:30 +0900 (JST) Date: Thu, 19 Sep 1996 10:18:30 +0900 (JST) From: Naoki Hamada Message-Id: <199609190118.KAA11113@sirius.sbl.cl.nec.co.jp> References: <199609172045.WAA06494@gvr.win.tue.nl> To: guido@gvr.win.tue.nl CC: dfr@render.com, Guido.vanRooij@nl.cis.philips.com, freebsd-hackers@freebsd.org In-reply-to: Guido van Rooij's message of "Tue, 17 Sep 1996 22:45:08 +0200 (MET DST)" <199609172045.WAA06494@gvr.win.tue.nl> Subject: Re: new if_vx driver on freefall Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello, guys! Guido wrote: >If you happen to have a 3c590, could you undef the BROKEN_AVAIL define and >see if you card still works after doing a ping -f -s 1000 >(as root of course). I ported Guido's new if_vx to 960801-SNAP and tried it. (A patch follows my message.) It works very well with and without BROKEN_AVAIL though my adapter still worked with the old vx driver :-) Anyway, it is far better than our old and broken vx driver, isn't it? -nao --- if_vx.c Tue Sep 17 16:19:42 1996 +++ /sys/pci/if_vx.c Thu Sep 19 09:21:11 1996 @@ -232,7 +232,7 @@ ifp->if_unit = unit; ifp->if_name = "vx"; ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_output = ether_output; ifp->if_start = vxstart; ifp->if_ioctl = vxioctl; @@ -242,7 +242,7 @@ ether_ifattach(ifp); #if NBPFILTER > 0 - bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header)); + bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); #endif sc->tx_start_thresh = 20; /* probably a good starting point. */ @@ -397,7 +397,7 @@ { register struct vx_softc *sc = &vx_softc[ifp->if_unit]; register struct mbuf *m, *m0; - int sh, len, pad; + int sh, len, pad, s; /* Don't transmit if interface is busy or not running */ if ((sc->arpcom.ac_if.if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING) @@ -449,8 +449,8 @@ (len / 4 + sc->tx_start_thresh)); #if NBPFILTER > 0 - if (ifp->if_bpf) { - bpf_mtap(ifp->if_bpf, m0); + if (sc->arpcom.ac_if.if_bpf) { + bpf_mtap(&sc->arpcom.ac_if, m0); } #endif @@ -715,8 +715,8 @@ * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to BPF. */ - if (ifp->if_bpf) { - bpf_mtap(ifp->if_bpf, m); + if (sc->arpcom.ac_if.if_bpf) { + bpf_mtap(&sc->arpcom.ac_if, m); /* * Note that the interface cannot be in promiscuous mode if