lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #10167] sockets: speed up TCP recv by not allocating


From: Simon Goldschmidt
Subject: [lwip-devel] [task #10167] sockets: speed up TCP recv by not allocating a netbuf
Date: Thu, 11 Feb 2010 18:40:30 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6

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

                 Summary: sockets: speed up TCP recv by not allocating a
netbuf
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Do 11 Feb 2010 18:40:30 GMT
                Category: None
         Should Start On: Do 11 Feb 2010 00:00:00 GMT
   Should be Finished on: Do 11 Feb 2010 00:00:00 GMT
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

Currently, when receiving TCP data using sockets, a netbuf is malloced for
every packet at netconn level and then directly freed again in lwip_recvfrom,
whithout touching any other member than p (the actual pbuf) of that netbuf ->
thus the netbuf is only necessary because the function declaration of
netconn_recv uses it.

Fixing this might require a new netconn function (say, netconn_recv_pbuf())
that can receive pbufs only (if the caller is not interested in netbufs, like
the sockets layer is). I'd let netconn_recv malloc a netbuf when
netconn_recv_pbuf successfully returns a pbuf and let netconn_recv always be
based on netconn_recv_pbuf.

Then the socket layer would call netconn_recv for UDP/RAW and
netconn_recv_pbuf for TCP.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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