From owner-freebsd-hackers Tue Oct 6 11:19:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09424 for freebsd-hackers-outgoing; Tue, 6 Oct 1998 11:19:47 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA09407; Tue, 6 Oct 1998 11:19:41 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id RAA06850; Tue, 6 Oct 1998 17:18:35 +0100 From: Luigi Rizzo Message-Id: <199810061618.RAA06850@labinfo.iet.unipi.it> Subject: Re: 2nd call for testers for RealTek 8139 driver To: wpaul@skynet.ctr.columbia.edu (Bill Paul) Date: Tue, 6 Oct 1998 17:18:35 +0100 (MET) Cc: hackers@FreeBSD.ORG, freebsd-hardware@FreeBSD.ORG In-Reply-To: <199809292311.TAA12549@skynet.ctr.columbia.edu> from "Bill Paul" at Sep 29, 98 07:11:31 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > This is another call for testers for the RealTek 8139 fast ethernet > driver. So far I have only gotten one (1) response to my first call ... ok, adapting the driver to do bridging was not that hard but now i seem unable to deal with pkts larger than a few bytes (an mbuf i think): ping -s 80 does not seem to go through, whereas regular pings work. I am not sure what is the problem and now it is too late to investigate more. In any case my diffs are as follows, in case they suggest something. cheers luigi --- if_rl.c.orig Tue Oct 6 17:29:40 1998 +++ if_rl.c Tue Oct 6 18:09:03 1998 @@ -121,6 +121,10 @@ #include #endif +#ifdef BRIDGE +#include +#endif + #include /* for vtophys */ #include /* for vtophys */ #include /* for DELAY */ @@ -1407,6 +1411,9 @@ eh = mtod(m, struct ether_header *); ifp->if_ipackets++; + m->m_pkthdr.len = m->m_len = total_len; + m->m_pkthdr.rcvif = ifp; /* XXX */ + #if NBPFILTER > 0 /* * Handle BPF listeners. Let the BPF user see the packet, but @@ -1414,18 +1421,36 @@ * a broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (ifp->if_bpf) { - m->m_pkthdr.len = m->m_len = total_len; + if (ifp->if_bpf) bpf_mtap(ifp, m); +#endif +#ifdef BRIDGE + if (do_bridge) { + struct ifnet *bdg_ifp ; + bdg_ifp = bridge_in(m); + if (bdg_ifp == BDG_DROP) + goto dropit; + else { + if (bdg_ifp != BDG_LOCAL) + bdg_forward(&m, bdg_ifp); + if (!m) + goto dropit ; + if (bdg_ifp == BDG_LOCAL || bdg_ifp == BDG_BCAST || + bdg_ifp == BDG_MCAST) + goto getit ; + else if (m) + goto dropit ; + } + } else +#endif if (ifp->if_flags & IFF_PROMISC && (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { + ETHER_ADDR_LEN) && (eh->ether_dhost[0] & 1) == 0)) { +dropit: m_freem(m); continue; } - } -#endif +getit: /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message