Date: Tue, 21 May 1996 19:55:18 -0700 (PDT) From: Steven Frank <stevenf@thetics.europa.com> To: Michael Smith <msmith@atrad.adelaide.edu.au> Cc: freebsd-hackers@freebsd.org Subject: Re: Socket library question Message-ID: <Pine.SUN.3.91.960521194339.10487A-100000@thetics.europa.com> In-Reply-To: <199605220123.KAA00231@genesis.atrad.adelaide.edu.au>
index | next in thread | previous in thread | raw e-mail
> How much of the kernel did you port?! You should start by looking at what
> the original code is sleeping _on_, and find any/all wakeups that match it.
I ported everything to do with sockets and TCP/IP, and the domain
name resolver. (most of net/ and netinet/ and a little of kern/)
Fortunately it's all quite platform-independent and the only things that
had to really be "ported" were the kernel-level calls to set the
processing level and handle sleep queues, etc.
The sleep in question that is not getting woken up is in the sbwait()
function in kern/uipc_socket2.c. It waits on the sb_cc field of the
receiving socket buffer. (So it should continue when more network data
comes in, I assume.) More data is coming in, but the sleep is not broken.
> You may have missed the code that's responsible for the appropriate wakeup.
I am fairly sure the wakeup is in there, but it is most likely being
blocked from execution somehow.
> It's possible that the OS/network interface that you're layering on top
> of behaves sufficiently differently to FreeBSD that some condition/situation
> is not being met.
I should clarify this point, actually... The code I used for the
base socket library and TCP stack is the "bsd-sources" located on
munnari.oz.au. The PPP interface came from NetBSD 1.1. So,
technically, it has nothing specifically to do with FreeBSD, but I have
noticed that the socket portion of the code seems to be almost exactly the
same across the different BSDs I have looked at. That's why I'm
asking on the FreeBSD mailing list, as well as several other places. :)
Thanks for the help. Hope my explanation wasn't too muddled. :)
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.960521194339.10487A-100000>
