www.a00.de > tcpgroup > 1992 > msg00071

TCP-group 1992

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

NOS & heavy Ethernet traffic

        NOS crashes immediately under heavy ethernet traffic!


        PC: 386SX, 16MHz, 4MB RAM, DOS 5.0, NE-1000 (or NI5010)
        connected via RG-58U to a SUN-3 workstation with SunOS 4.1
        No other hosts on the ethernet nor routers.


        I tested WNOS3 (latest version) and NOS_1229 and an
        old version (PA0GRI 1.6j).
        NOS has only echo and discard running.
        ping from/to SUN/PC works fine.

to crash:
        Use '/usr/etc/spray -i pc-host.ampr.org' from the Sun.
        This sends about 1000 ICMP echo packets with length of 86 bytes
        without pause between each packet to the PC with NOS.
        Result: NOS crashes after about 100 to 200 packets without
        error message!

I tested this because we have at hb9zz.ampr.org always troubles with all
versions of NOS. It crashes usually between a few hours and 1 day.
The ethernet segment has about 10 SUN workstations connected.  There
is lot of traffic on it.

So I started to look in the code. I found a solution:

The reason, why NOS blocks is, that there are no buffers left. but why?
The pktdrvr, called by interrupt, gets buffers via alloc_mbuf only from
the interrupt buffer pool (int disabled). This pool is replenished by refiq()
(mbuf.c). My idea is, that the incoming packets get all available buffers
and there aren't any more buffers for the other layers to process the
packets !

In refiq() (mbuf.c) I made the following hack (marked with callsign):

#include <alloc.h>
void refiq()
register struct mbuf *bp;
char i_state;

   /* Empty the garbage */
   if(Garbq != NULLBUF){
      i_state = dirps();
      bp = Garbq;
      Garbq = NULLBUF;
   /* Replenish interrupt buffer pool */
   while(Intqlen < Nibufs && 32768L < coreleft() ){   /* HB9RWM */
          if((bp = alloc_mbuf(Ibufsize)) == NULLBUF)
      i_state = dirps();
      bp->next = Intq;
      Intq = bp;
   if(Iminfree == -1)
      Iminfree = Intqlen;

This patch prevents allocating of Intq buffers if there isn't enough
coreleft(). Result: more packets get lost (:-)) but the received packets
can be processed.
But: 'spray' works now without any problems !!

Maybe I am wrong. Did someone else had similar problems?  I am testing
at the moment the corrected code (in wnos3) at hb9zz.ampr.org. It seems
to be better, but not perfect...

vy 73 de Marcel

Internet: wiget@verw.switch.ch  | SWITCH
Phone   : +41 1 261 81 78       | Swiss Academic and Research Network
AMPRNET : hb9rwm@hb9zz.ampr.org | Marcel Wiget
AX.25   : HB9RWM @ HB9EAS       | ETH-Zentrum, CH-8092 Zuerich

Document URL : http://www.a00.de/tcpgroup/1992/msg00071.php
Ralf D. Kloth, Ludwigsburg, DE (QRQ.software). < hostmaster at a00.de > [don't send spam]
Created 2004-11-12. Last modified 2004-11-12. Your visit 2020-10-28 23:28.40. Page created in 0.0498 sec.
[Go to the top of this page]   [... to the index page]