lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #27140] tcp/ip stack hang becouse remains a pbuf_free


From: juan schiavoni
Subject: [lwip-devel] [bug #27140] tcp/ip stack hang becouse remains a pbuf_free
Date: Mon, 03 Aug 2009 18:08:41 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009070812 Ubuntu/8.04 (hardy) Firefox/3.0.12

Follow-up Comment #8, bug #27140 (project lwip):

Hi, Today I could do more test with the hardware. The error has two point,
the first one is that tcp_timer_needed is called from the ethernetif_input
function, that run in a diferent thread that tcpip_thread. The second one is
that tcp_ticks of tcp_slowtmr function, increase the timeout, to free the
memory for a connection already closed.

If disable the timer by thread, and increase the tcp_tick in 500 by time, the
webserver run fine, but I understand that this is not a good solution. Could
you give some help?

I put the source code of the ethernetif_input:

/**
 * This function should be called when a packet is ready to be read
 * from the interface. It uses the function low_level_input() that
 * should handle the actual reception of bytes from the network
 * interface. Then the type of the received packet is determined and
 * the appropriate input function is called.
 *
 * @param netif the lwip network interface structure for this ethernetif
 */
static void ethernetif_input(void * pvParameters)
{
  struct netif      *netif = (struct netif *)pvParameters;
  struct pbuf       *p;


  for( ;; )
  {
    do
    {
      /* move received packet into a new pbuf */
      p = low_level_input( netif );
      if( p == NULL )
      {
        /* No packet could be read.  Wait a for an interrupt to tell us
        there is more data available. */
        vMACBWaitForInput(100);
      }
    }while( p == NULL );

    if( ERR_OK != ethernet_input( p, netif ) )
    {
      pbuf_free(p);
      p = NULL;
    }
  }
}




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27140>

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





reply via email to

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