lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7142] Sanity check user-configurable values


From: Jonathan Larmour
Subject: [lwip-devel] [task #7142] Sanity check user-configurable values
Date: Thu, 02 Aug 2007 19:52:13 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12

URL:
  <http://savannah.nongnu.org/task/?7142>

                 Summary: Sanity check user-configurable values
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jifl
            Submitted on: Thursday 08/02/2007 at 20:52
                Category: None
         Should Start On: Thursday 08/02/2007 at 00:00
   Should be Finished on: Thursday 08/02/2007 at 00:00
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

There should be more sanity checking of configuration settings in lwipopts.h,
for example: 

- MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN
- MEMP_NUM_NETCONN should be at most the sum of MEMP_NUM_{TCP,RAW,UDP}_PCB
- MEMP_NUM_NETBUF should be at most the sum of MEMP_NUM_PBUF_POOL and
MEMP_NUM_PBUF
- Ditto MEMP_NUM_ARP_QUEUE can be compared to the number of pbufs.
- Ditto IP_FRAG_USES_STATIC_BUF
- Ditto TCP_SND_QUEUELEN
- TCP_WND versus PBUF_POOL_SIZE*PBUF_POOL_BUFSIZE
- TCP_MSS <= TCP_WND
- TCP_SNDLOWAT < TCP_SND_BUF

There's probably more. We could consider ensuring that the number of pbufs
exceed MEMP_NUM_NETBUF+MEMP_NUM_ARP_QUEUE+TCP_SND_QUEUELEN etc., but I don't
think that's something to assert on because it's inherent in lwIP that you
shouldn't assume the worst case, and instead try to recover if you run out of
memory. But in other cases it's worth asserting when it shows the user doesn't
really understand the dependencies.

Some can be checked at build time in the preprocessor, others may need to be
done at runtime, but only in a debug build.





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7142>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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