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

Re: [openss7] RE: How's It Going



Chuck,

Attached is a patch which solves the problem with your test
program.  It's really a two line fix.  I was not deleting
the skb once it was read because it still had one user (but
it should have one user).  Also, I fixed a bug in the
FIONREAD which showed up after I fixed the first one.  It
was dereferencing a null pointer when the receive queue was
empty.  I ran your test programs and the read program now
blocks properly waiting for each write.  Once the writing
is through, the read program closes and exists because the
write program drops the assocation after the last write.
This is all correct behavior now.

That should get your boss off your back ;)

Chuck Winters wrote:                          Fri, 15 Jun 2001 17:04:23
> Brian,
>         No problem.  My boss is just tearing me apart (lol) :)
> 
>         I am just excited to get some real test results.  
> 
>         I was ok'd to release my sources, but I want to make sure they
> work
> first.
> 
> Later,
> Chuck
> --
> Chuck Winters                            | Email:  cwinters@atl.lmco.com
> Distributed Processing Laboratory        | Phone:  856-338-3987
> Lockheed Martin Advanced Technology Labs |
> 1 Federal St - A&E-3W                    |
> Camden, NJ 08102                         |

-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
bidulock@openss7.org    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦
Index: sctp_ipv4.c
===================================================================
RCS file: /home/common/cvsroot/linux/net/ipv4/sctp_ipv4.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -c -r1.43 -r1.44
*** sctp_ipv4.c	2001/05/15 15:30:28	1.43
--- sctp_ipv4.c	2001/06/15 22:26:29	1.44
***************
*** 1,6 ****
  /*****************************************************************************
  
!  @(#) $Id: sctp_ipv4.c,v 1.43 2001/05/15 15:30:28 brian Exp $
  
   -----------------------------------------------------------------------------
  
--- 1,6 ----
  /*****************************************************************************
  
!  @(#) $Id: sctp_ipv4.c,v 1.44 2001/06/15 22:26:29 brian Exp $
  
   -----------------------------------------------------------------------------
  
***************
*** 24,32 ****
  
   -----------------------------------------------------------------------------
  
!  Last Modified $Date: 2001/05/15 15:30:28 $ by $Author: brian $
  
   $Log: sctp_ipv4.c,v $
   Revision 1.43  2001/05/15 15:30:28  brian
   Pre-release version of OpenSS7 SCTP for Linux Native.
  
--- 24,35 ----
  
   -----------------------------------------------------------------------------
  
!  Last Modified $Date: 2001/06/15 22:26:29 $ by $Author: brian $
  
   $Log: sctp_ipv4.c,v $
+  Revision 1.44  2001/06/15 22:26:29  brian
+  Fixed bug reported by Chunk Winters.
+ 
   Revision 1.43  2001/05/15 15:30:28  brian
   Pre-release version of OpenSS7 SCTP for Linux Native.
  
***************
*** 95,101 ****
  
   *****************************************************************************/
  
! static char const ident[] = "$Name:  $($Revision: 1.43 $) $Date: 2001/05/15 15:30:28 $";
  
  /*
   *  ==========================================================================
--- 98,104 ----
  
   *****************************************************************************/
  
! static char const ident[] = "$Name:  $($Revision: 1.44 $) $Date: 2001/06/15 22:26:29 $";
  
  /*
   *  ==========================================================================
***************
*** 1440,1445 ****
--- 1443,1449 ----
  	struct sk_buff *skb;
  
  	for ( skb = skb_peek(&sk->receive_queue);
+                         skb &&
  			skb != (struct sk_buff *)&sk->receive_queue;
  			skb = skb->next )
  		if ( !skb->used )
***************
*** 2611,2617 ****
  		}
  #endif
  		do {
! 			if ( !skb->used || atomic_read(&skb->users) ) 
  				break;
  			__skb_unlink(skb, head);
  			kfree_skb(skb);
--- 2615,2621 ----
  		}
  #endif
  		do {
! 			if ( !skb->used || atomic_read(&skb->users) < 2 ) 
  				break;
  			__skb_unlink(skb, head);
  			kfree_skb(skb);