netdemo echoServer issue [was: Re: listen/select and then accept pattern not working?]
Karel Gardas
kgardas at objectsecurity.com
Mon Jan 17 17:19:01 UTC 2005
On Mon, 17 Jan 2005, Karel Gardas wrote:
> Interesting. I have different issue: the first connection come OK: NIC
> (I'm using ne2000) signals received packet, then yet another packet,
> socket A (my guess is that this is the socket on which server is listening
> by using select) is wakenup, then socket B is wakenup (my guess is that
> this is socket created by accept call), again several times socket B, then
> Hello World is printed (CORBA servant is invoked), again several times
> socket B is wakenup, again NIC receive packet, then several times socket B
> is wakenup and that's all. For the second client run, RTEMS even does not
> signal received packet on NIC nor it signals wake up for socket A, but
> strangelly signals wake-up on socket B several times.
> Note: Socket A and socket B are two different socket pointers obtained
> during RTEMS debuging.
For your reference: to obtain these results I'm using patch below. I hope
I have not overlooked any place where NIC receive data from outside and
where socket is waken-up so it "breaks" from select system call...
Thanks,
Karel
--
Karel Gardas kgardas at objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
? c/src/lib/libbsp/powerpc/psim/irq/Makefile.in
Index: c/src/lib/libbsp/i386/pc386/ne2000/ne2000.c
===================================================================
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/pc386/ne2000/ne2000.c,v
retrieving revision 1.9.6.1
diff -u -r1.9.6.1 ne2000.c
--- c/src/lib/libbsp/i386/pc386/ne2000/ne2000.c 4 Sep 2003 18:44:03 -0000 1.9.6.1
+++ c/src/lib/libbsp/i386/pc386/ne2000/ne2000.c 17 Jan 2005 17:14:01 -0000
@@ -349,6 +349,7 @@
{
++sc->stats.rx_acks;
rtems_event_send (sc->rx_daemon_tid, INTERRUPT_EVENT);
+ printf("\nNE: receive packet\n");
}
/* Check for counter change. */
Index: cpukit/libnetworking/rtems/rtems_glue.c
===================================================================
RCS file: /usr1/CVS/rtems/cpukit/libnetworking/rtems/rtems_glue.c,v
retrieving revision 1.29.2.2
diff -u -r1.29.2.2 rtems_glue.c
--- cpukit/libnetworking/rtems/rtems_glue.c 15 Sep 2003 14:07:57 -0000 1.29.2.2
+++ cpukit/libnetworking/rtems/rtems_glue.c 17 Jan 2005 17:14:12 -0000
@@ -409,6 +409,8 @@
register struct socket *so;
register struct sockbuf *sb;
{
+ printf("wup(%p), ", so);
+ fflush(stdout);
if (sb->sb_flags & SB_WAIT) {
sb->sb_flags &= ~SB_WAIT;
rtems_event_send (sb->sb_sel.si_pid, SBWAIT_EVENT);
More information about the users
mailing list