From: Wayne Visser <wvisser@lszpaper.com>
To: Stanislav Meduna <stano@meduna.org>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] eth_recv out of MBUFs
Date: Tue, 09 Aug 2011 12:55:00 -0000 [thread overview]
Message-ID: <4E412E1F.5040601@lszpaper.com> (raw)
In-Reply-To: <4E40D581.70101@meduna.org>
Hi Stano,
I've had a similar problem and found some help in this message:
http://ecos.sourceware.org/ml/ecos-discuss/2003-10/msg00350.html
and the followup:
http://ecos.sourceware.org/ml/ecos-discuss/2003-10/msg00380.html
Basically, I've used the suggested hack to reduce the time required for
TCP connections to timeout. Fiddling around with the number of
permissible open connections did not end well...
--
Wayne Visser
LSZ PaperTech Inc.
On 11-08-09 02:36 AM, Stanislav Meduna wrote:
> On 05.08.2011 09:51, Lambrecht Jürgen wrote:
>
>> Be carefull: the eCos freeBSD stack has no timeouts on TCP connections I
>> believe, but often the PC stack has!
> Well the TCP timeouts that are in place when the connection
> is not sending any data are basically unusable on any
> standard-conforming TCP/IP stack. Whoever designed
> SO_KEEPALIVE the way it is specified was smoking something
> quite strong...
>
>> So the eCos TCP session stays alive, but the PC (used to test) stack
>> shuts down the TCP connection when the cable breaks (after a timeout, or
>> it can also detect the cable fault). And the TCPs are out of sync
>> (something like that), and then it uses a lot of sockets, and indeed (as
>> in your next mail) the timeouts are very big to free sockets.
>> If that is your problem, I can ask my college: he recompiled ecos to
>> change the minute timeout to seconds.
> This is most probably not the source of the problem I am seeing
> in this test setup. Thanks for the hint anyway.
>
>> With a slow device and big burst of data, I had to increase the space
>> for mbufs.
> Well, but to what size? I'd like to know the formula to calculate
> the worst-case mbufs needs based on the number of active TCP
> and UDP sockets... I am probably asking for too much :(
>
> My gut feeling is that the TCP windows of all open connections
> do not fit into the allocated mbufs. I'll try to tune this
> stuff - unfortunately the FreeBSD stack is not really
> friendly here.
>
>> Better use lwIP on memory-constrained devices. And lwIP is more actively
>> maintained..
> This is on my todo list for quite a long time - unfortunately
> there are issues that have to be solved first. AFAIK lwIP
> is not thread-safe on a single socket level and our present
> framework does read from and write to a single socket from
> different threads :/
>
> I have also no idea whether everything from eCos we are
> using/planning to use is able to work with lwIP (e.g. SNMP).
>
>
> Regards
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2011-08-09 12:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 19:16 Stanislav Meduna
2011-07-20 21:27 ` Stanislav Meduna
2011-08-05 7:52 ` Lambrecht Jürgen
2011-08-09 6:37 ` Stanislav Meduna
2011-08-09 12:55 ` Wayne Visser [this message]
2011-08-11 16:52 ` Stanislav Meduna
2011-11-22 17:50 ` Stefan Sommerfeld
-- strict thread matches above, loose matches on Subject: below --
2010-07-16 8:26 cyl cyl
2010-07-16 11:52 ` James Hunter
2010-07-17 12:44 ` John Mills
2010-07-18 21:07 ` Ross Younger
2010-07-19 1:55 ` John Mills
2010-07-20 7:45 ` cyl cyl
2010-07-21 1:12 ` John Mills
2010-07-21 1:58 ` cyl cyl
2001-10-16 9:21 Christoph Csebits
2001-10-16 14:55 ` Jonathan Larmour
2001-10-16 17:19 ` Rosimildo da Silva
2001-10-17 1:49 ` Peter Graf
2001-10-17 1:03 ` Christoph Csebits
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E412E1F.5040601@lszpaper.com \
--to=wvisser@lszpaper.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=stano@meduna.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).