lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Dropping existing TCP connections to service new ones


From: Bill Auerbach
Subject: RE: [lwip-users] Dropping existing TCP connections to service new ones
Date: Thu, 21 Feb 2008 09:44:59 -0500

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf
> Of Kieran Mansley
> Sent: Thursday, February 21, 2008 9:40 AM
> To: Mailing list for lwIP users
> Subject: RE: [lwip-users] Dropping existing TCP connections to service new
> ones
> 
> On Thu, 2008-02-21 at 09:35 -0500, Bill Auerbach wrote:
> > > -----Original Message-----
> > > From: address@hidden
> > > [mailto:address@hidden On
> Behalf
> > > Of Kieran Mansley
> > > Sent: Thursday, February 21, 2008 6:49 AM
> > > To: Mailing list for lwIP users
> > > Subject: Re: [lwip-users] Dropping existing TCP connections to service
> new
> > > ones
> > >
> > > On Wed, 2008-02-20 at 11:03 -0800, Art R. wrote:
> > > > Is this a bug? Should the code read "if (pcb->prio < prio && ..."
> (less
> > > > than instead of less or equal)?
> > >
> > > Sounds to me like that would be more sensible, but I've not looked
> into
> > > it in any detail.  Feel free to file a bug if you'd like this changed.
> >
> > This would break existing programs that use TCP_MAX_PRIO, since these
> would
> > be killed in current lwIP versions but won't be in future versions with
> this
> > < instead of <=  change.
> 
> Are there programs that rely on this?

If there are, it will be painful for the programmer who updates and then
finds the hard way that he runs out of PCBs.  Sure, there's a readme and you
can ask if we need to protect the user to this extent.  Many programmers
inherit code and might not understand this subtlety.

> > Maybe we want:
> >
> > #define TCP_NO_KILL_PRIO (TCP_MAX_PRIO+1)
> >
> > And recommend using TCP_NO_KILL_PRIO for pcbs that cannot be killed due
> to
> > inactivity.
> 
> It would certainly make sense to have a way to say "don't kill this
> connection", but that leaves the question open of what to do if all the
> connections have TCP_MAX_PRIO and it wants to create another one.

If all the connections have TCP_MAX_PRIO, they work only because there will
be killed connections.  With the change, they won't know until the program
fails, which could take a while depending on the application.

Bill






reply via email to

[Prev in Thread] Current Thread [Next in Thread]