Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 2001 10:37:42 +0100 (CET)
From:      Harti Brandt <brandt@fokus.gmd.de>
To:        Julian Elischer <julian@elischer.org>
Cc:        julian@freebsd.org, freebsd-net@freebsd.org, archie@freebsd.org
Subject:   Re: netgraph: problem in ng_base
Message-ID:  <Pine.BSF.4.21.0101301025520.5981-100000@beagle.fokus.gmd.de>
In-Reply-To: <3A768232.282B28E6@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Jan 2001, Julian Elischer wrote:

JE>using ngctl and 'hole' nodes in this configuration I cannot make this happen.

I tried the following two things:

-----------------------------------------------------

500 [root] (beagle) /tmp # ngctl
+ mkpeer sscfu mine upper
+ name mine sscf
+ mkpeer sscf: sscop lower upper
+ name sscf:lower sscop
+ connect sscop: fatm0: lower sig
+ list
There are 5 total nodes:
  Name: sscop           Type: sscop           ID: 00000011   Num hooks: 2
  Name: sscf            Type: sscfu           ID: 00000010   Num hooks: 2
  Name: ngctl12169      Type: socket          ID: 0000000f   Num hooks: 1
  Name: fatm1           Type: atm             ID: 00000002   Num hooks: 0
  Name: fatm0           Type: atm             ID: 00000001   Num hooks: 1
+ show sscf:
  Name: sscf            Type: sscfu           ID: 00000010   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook      
  ----------      ---------       ---------    -------         ---------      
  lower           sscop           sscop        00000011        upper          
  upper           ngctl12169      socket       0000000f        mine           
+ show sscop:
  Name: sscop           Type: sscop           ID: 00000011   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook      
  ----------      ---------       ---------    -------         ---------      
  lower           fatm0           atm          00000001        sig            
  upper           sscf            sscfu        00000010        lower          
+ msg fatm0: cpcsinit {name="sig" aal=5 vci=5}
Rec'd response "cpcsinit" (4) from "[1]:":
Args:	{}
+ 
Rec'd data packet on hook "mine":
0000:  01 00 00 00                                      ....            
+ shutdown sscf:
+ shutdown sscop:
+ list
There are 3 total nodes:
  Name: ngctl12169      Type: socket          ID: 0000000f   Num hooks: 0
  Name: fatm1           Type: atm             ID: 00000002   Num hooks: 0
  Name: fatm0           Type: atm             ID: 00000001   Num hooks: 0
+ ^C

The cpcsinit opens the ATM VCI and sends the AAL5 frames out the named
hook. The data is an SSCOP begin PDU.

In /var/log/messages I have:

Jan 30 10:15:00 beagle /boot/kernel/kernel: changing state from SSCOP_OUT_DIS_PEND to SSCOP_IDLE
Jan 30 10:15:00 beagle /boot/kernel/kernel: disconnect 0xc2c54840 from 0xc2c94d00 (invalid) refs=3 flags=9
Jan 30 10:15:00 beagle /boot/kernel/kernel: ng_sscop_shutdown: 0xc2c94d00 refs=2 flags=9
Jan 30 10:15:00 beagle /boot/kernel/kernel: Accessing freed node node: ID [11]: type 'sscop', 0 hooks, flags 0x9, 0 refs, :
Jan 30 10:15:00 beagle /boot/kernel/kernel: Last active @ /usr/src/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c, line 735
Jan 30 10:15:00 beagle /boot/kernel/kernel: problem discovered at file /usr/src/sys/modules/netgraph/netgraph/../../../netgraph/ng_base.c, line 2436

-----------------------------------

The 2nd test is exactly the same, except I do not do the cpcsinit:

+ mkpeer sscfu mine upper
+ name mine sscf
+ mkpeer sscf: sscop lower upper
+ name sscf:lower sscop
+ connect sscop: fatm0: lower sig
+ list
There are 5 total nodes:
  Name: sscop           Type: sscop           ID: 00000014   Num hooks: 2
  Name: sscf            Type: sscfu           ID: 00000013   Num hooks: 2
  Name: ngctl12184      Type: socket          ID: 00000012   Num hooks: 1
  Name: fatm1           Type: atm             ID: 00000002   Num hooks: 0
  Name: fatm0           Type: atm             ID: 00000001   Num hooks: 1
+ show sscf:
  Name: sscf            Type: sscfu           ID: 00000013   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook      
  ----------      ---------       ---------    -------         ---------      
  lower           sscop           sscop        00000014        upper          
  upper           ngctl12184      socket       00000012        mine           
+ show sscop:
  Name: sscop           Type: sscop           ID: 00000014   Num hooks: 2
  Local hook      Peer name       Peer type    Peer ID         Peer hook      
  ----------      ---------       ---------    -------         ---------      
  lower           fatm0           atm          00000001        sig            
  upper           sscf            sscfu        00000013        lower          
+ shutdown sscf:
+ shutdown sscop:
+ list
There are 3 total nodes:
  Name: ngctl12184      Type: socket          ID: 00000012   Num hooks: 0
  Name: fatm1           Type: atm             ID: 00000002   Num hooks: 0
  Name: fatm0           Type: atm             ID: 00000001   Num hooks: 0
+ ^D

Now everything is ok. In /var/log/messages I have:

Jan 30 10:18:42 beagle /boot/kernel/kernel: disconnect 0xc2c54740 from 0xc2c94c00 (valid) refs=4 flags=0
Jan 30 10:19:12 beagle /boot/kernel/kernel: disconnect 0xc2c54940 from 0xc2c94c00 (invalid) refs=4 flags=9
Jan 30 10:19:12 beagle /boot/kernel/kernel: ng_sscop_shutdown: 0xc2c94c00 refs=3 flags=9

Note, that the reference count is now 3 as I expected it (and as I
understand your explanation).

The same experiment with two holes and the cpcsinit also works whether I
do it slowly or fast.

NB: the ng_atm node switches the peer hook to queueing.

[later]

If I use 'xl0: lower' instead of the fatm0 it's also ok. Perhaps it is
rather a problem in ng_sscop ???

Can't really understand what happens.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              brandt@fokus.gmd.de, harti@begemot.org, lhbrandt@mail.ru



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101301025520.5981-100000>