> OR will someone someday 'fix' the MAX value, setting it to 255? Is it > intentional that 'MAX' is 127? Should TCP_PRIO_MAX be renamed to > TCP_PRIO_HALF_MAX (<smile>)?
But then you'd have to change source code to get what you want working. :-) I'm guessing that in the olden days that the prio was a signed char, which would have made 127 the real max. This reminds me that there are types used in lwIP that should be allowed to overridden in the sys_arch.h file because a type may be a better fit for the architecture. One that comes to mind is err_t which is s_8t. For some platforms, s_16t or s_32t are better. Bill > Art R. wrote: > > > > Setting to max+1 would probably work. I was thinking that the MAX value > of > > 127 is the limit of the prio value (an int), but it's an unsigned 8 so > 128 > > would be ok. > > > > > > > > Bill Auerbach wrote: > >> > >> > >>> -----Original Message----- > >>> From: [EMAIL PROTECTED] > >>> [mailto:[EMAIL PROTECTED] On > >>> Behalf > >>> Of Art R. > >>> Sent: Wednesday, February 20, 2008 2:04 PM > >>> To: [email protected] > >>> Subject: [lwip-users] Dropping existing TCP connections to service new > >>> ones > >>> > >>> > >>> The tcp.c module has function tcp_kill_prio which is used to kill > >>> existing > >>> TCP connections when a new connection is being attempted and there is > an > >>> 'out of PCBs' situation. The comment in that function says "kill the > >>> oldest > >>> active connection that has lower priority than prio", but the test it > >>> performs is "...pcb->prio <= prio". This appears to allow a new > >>> connection > >>> to kill an existing one of the same priority. > >>> > >>> The default case is that all pcbs will have the same priority > >>> ("normal"), > >>> so > >>> the oldest is killed. > >>> > >>> Is this a bug? Should the code read "if (pcb->prio < prio && ..." > (less > >>> than instead of less or equal)? > >>> Or is it intentional? > >>> > >>> What would be the best way to disable the killing of active > connections? > >>> (Preferably without modifying the lwIP source code.) > >> > >> Can't you call tcp_setprio with a value of TCP_PRIO_MAX+1 for each pcb? > >> > >> Bill > >> > >> > >> > >> > >> _______________________________________________ > >> lwip-users mailing list > >> [email protected] > >> http://lists.nongnu.org/mailman/listinfo/lwip-users > >> > >> > > > > > > -- > View this message in context: http://www.nabble.com/Dropping-existing-TCP- > connections-to-service-new-ones-tp15596047p15598166.html > Sent from the lwip-users mailing list archive at Nabble.com. > > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
