lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP_SND_QUEUELEN vs TCP_SNDQUEUELEN_OVERFLOW


From: Jonathan Larmour
Subject: Re: [lwip-users] TCP_SND_QUEUELEN vs TCP_SNDQUEUELEN_OVERFLOW
Date: Wed, 26 Mar 2008 14:36:32 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

Art R. wrote:
Just trying to make lwIP as good as it can be.

Don't know if you would consider this, but ...

tcp.c (current 1.3.0)
line 315:   pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
line 995:   pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
Both TCP_MSS and 536 are constants. The compare could be done at compile
time in a #if rather than in compiled code at runtime.

Every compiler would optimise away that expression.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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