Date: Mon, 24 Nov 1997 09:18:31 +0100 (MET) From: Emmanuel Duros <Emmanuel.Duros@sophia.inria.fr> To: hackers@FreeBSD.ORG Subject: Re: My fbsd router looses packets ! Message-ID: <199711240818.JAA05136@chouette.inria.fr>
next in thread | raw e-mail | index | archive | help
I have finally located where the pb came from. The driver of the b2 interface initiates a DMA transfer every time it needs to send a packet. The isa_dmastart() is called for every transfer. When there is at the same an incoming traffic on the other interface (I tried a Lance and a DEC Ethernet card), the PC losses packets on b1. When I comment out the isa_dmastart(), there is no more losses on b1 (but nothing is sent via b2!). I have not been able to explain this behavior yet. To me, my code looks fine, I use the set of isa_dma* functions to initiate a dma transfer, release a chanel,... My PC router (Pentium Pro) has a supermicro motherboard with 6 (!) PCI slots and 3 ISA slots (Ref: Super P6DNH). It is not very common to use this sort of motherboard, I though it might be a bit tricky for FBSD to handle it. I then took another PC (Pentium Pro) with a more classical motherboard, I put inside the HD I was using with the SuperMicro motherboard. This way I kept exactly the same code. I specified in the BIOS the IRQ which was used by my dvbtx interface. I boot up the station and guess what, it works just fine! I can stream video between A and C routed by B at several Mbps without a single packet loss. Is there anybody who can give an explanation to this ? I also took another P6DNH motherboard with the same result (losses). I also tried this code successfully on other different motherboards... Emmanuel. Julian Elischer wrote: > which is the isa bus interface? > > > > > Julian Elischer wrote: > > > > >> Emmanuel Duros wrote: > > >> > > >> My fbsd (2.2.2 release) router has two communication interfaces and when > > >> it routes packets between its interfaces, it looses lots of packets ! > > >> > > >> Here is the network configuration: > > >> > > >> --- --------- --- > > >> |A| | B | |C| > > >> --- --------- --- > > >> | (b1) | | (b2) | > > >> -------------------------- -------------------------- > > >> > > >> b1 is an Ethernet interface, b2 is a dvb interface, it is a satellite > > >> communication card (a send-only interface). I wrote the device > > >> driver for the latter. > > >> > > >> I have used a video conferencing application to verify the communication > > >> between the stations: > > >> > > >> 1) A generates a video stream to B up to several Mbps: NO LOSSES > > >> 2) B generates a video stream to C up to several Mbps: NO LOSSES > > >> 3) A generates a video stream to C at 100-200 kbps and I get 5 to > > >> 30 % loss rate > > >> > > >> 1) ensures that the connectivity between A and B is fine > > >> 2) ensures that the connectivity between B and C is fine > > >> 3) shows that there is a routing pb !!! > > >> ... > > > > > > > > >An ISA bus can only really support 1 ethernet and still leave > > >any CPU time for other actions. > > > > > >can you stream video from B tpo A and C at the same time? > > >how about from A and C to B at the same time.? > > > > When I currently stream video from B to C and from A to B: > > > > - No losses on C (whatever bit rate up to several Mbps) > > - High loss rate on B > > > > Looking at what goes through the interface b1 shows errors. > > > > $ netstat -I de0 -w 1 > > > > input (de0) output > > packets errs bytes packets errs bytes colls > > 46 3 32003 0 0 222 0 > > 40 2 25126 0 0 398 0 > > .... > > > > When I stop streaming video from B to C, there is no more errors and I > > can increase the bit rate from A up to several Mbps without loss (!!!). > > > > When I currently stream video from B to C and from B to A, everything is > > fine in spite of the fact that the PC is relatively overloaded! > > > > b2 is an interface (on ISA with DMA transfers) which generates an > > interrupt as it is ready to send more paquets. I thought it could have > > been a pb with the interrupt generated by de0 as it receives a packet > > but according to dmesg (see below) there is no conflict. > > > > Still trying to sort this out! > > > > Emmanuel > > > > >> Beside this, it is not the first time I have used this network > > >> configuration, it used to work very well on another a fbsd router > > >> running a one year old snapshot. > > >> > > >> I have got absolutely no idea where my pb comes from, I have checked > > >> IRQs, probable overlapping ports and everything looks fine to me. I do > > >> not think it comes from my driver because of 2) and because it used to > > >> work very well before I changed the PC and the fbsd OS version. > > >> > > >> I join the output of the dmesg in case this can help... > > >> Thanks a lot for any help! > > >> > > >> Emmanuel > > >> > > >> PS: For information the send-only interface (dvtx0) has an ISA bus and > > >> performs DMA transfers > > >> > > >> ------- > > >> Copyright (c) 1992-1997 FreeBSD Inc. > > >> Copyright (c) 1982, 1986, 1989, 1991, 1993 > > >> The Regents of the University of California. All rights reserved. > > >> > > >> FreeBSD 2.2.2-RELEASE #5: Wed Nov 19 21:10:31 GMT 1997 > > >> eduros@pacman.inria.fr:/usr/src/sys/compile/PACMAN_TX > > >> CPU: Pentium Pro (199.43-MHz 686-class CPU) > > >> Origin = "GenuineIntel" Id = 0x619 Stepping=9 > > >> Features=0xfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,<b11>>,MTRR,PGE,MCA,CMOV>> > > >> real memory = 67108864 (65536K bytes) > > >> avail memory = 62619648 (61152K bytes) > > >> Probing for devices on PCI bus 0: > > >> chip0 <Intel 82440FX (Natoma) PCI and memory controller>> rev 2 on pci0:0 > > >> chip1 <Intel 82371SB PCI-ISA bridge>> rev 1 on pci0:7:0 > > >> chip2 <Intel 82371SB IDE interface>> rev 0 on pci0:7:1 > > >> vga0 <VGA-compatible display device>> rev 1 int a irq 10 on pci0:17 > > >> de0 <Digital 21041 Ethernet>> rev 17 int a irq 15 on pci0:18 > > >> de0: 21041 [10Mb/s] pass 1.1 > > >> de0: address 00:00:c0:6b:ea:df > > >> chip3 <generic PCI bridge (vendor=8086 device=0960 subclass=4)>> rev 1 on pci0:20:0 > > >> pci0:20:1: Intel Corporation, device=0x1960, class=memory (misc) int a irq 9 [no driver assigned] > > >> Probing for devices on PCI bus 1: > > >> ahc0 <Adaptec 2940 Ultra SCSI host adapter>> rev 0 int a irq 10 on pci1:1 > > >> ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs > > >> ahc0 waiting for scsi devices to settle > > >> (ahc0:0:0): "CONNER CFP2107W 2.14GB 1524" type 0 fixed SCSI 2 > > >> sd0(ahc0:0:0): Direct-Access 2048MB (4194304 512 byte sectors) > > >> Probing for devices on the ISA bus: > > >> sc0 at 0x60-0x6f irq 1 on motherboard > > >> sc0: VGA color <16 virtual consoles, flags=0x0>> > > >> sio0 at 0x3f8-0x3ff irq 4 on isa > > >> sio0: type 16550A > > >> sio1 at 0x2f8-0x2ff irq 3 on isa > > >> sio1: type 16550A > > >> fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa > > >> fdc0: NEC 72065B > > >> fd0: 1.44MB 3.5in > > >> wdc0 at 0x1f0-0x1f7 irq 14 on isa > > >> wdc0: unit 0 (atapi): <Pioneer CD-ROM ATAPI Model DR-A12X 0100/E1.00A>>, removable, ovlap, dma, iordis > > >> wcd0: 2066Kb/sec, 128Kb cache, audio play, 256 volume levels, ejectable tray > > >> wcd0: no disc inside, unlocked > > >> dvtx0: 0.9b1 version - Probing... > > >> dvtx0 at 0x310 irq 11 drq 5 on isa > > >> npx0 on motherboard > > >> npx0: INT 16 interface > > >> ccd0-3: Concatenated disk drivers > > >> de0: enabling 10baseT port >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711240818.JAA05136>