lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #2595] loopif results in NULL reference for incoming T


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #2595] loopif results in NULL reference for incoming TCP packets
Date: Wed, 11 Apr 2007 09:36:15 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Follow-up Comment #4, bug #2595 (project lwip):

This is still open (for a while now...) and I must say I don't like the
solution as it introduces 1 ms delay for each packet going over the loopif.

I think there are 2 possibilities solving this:

1. If multithreaded stack is used, netif->input() should be tcpip_input() for
the loopif. With that, we can call netif->input directly in loopif_output()
since the pbuf is put in a queue.

2. If callback environment is used, we need a simple linked list for incoming
packets where we put the pbuf. That queue must then be processed in the main
loop, through something like 'poll_driver(netif)' (see
http://www.sics.se/~adam/lwip/os.html).

Some other remarks:
- memcpy() into a new pbuf is of course still needed
- using PBUF_POOL would make more sense since this is the type which should
be used for input
- the current struct that is malloc'ed using mem_malloc() and passes the
netif pointer to loopif_input() is not needed since there can be only _one_
interface with 127.0.0.1 -> the loopif netif struct can be static!

The only thing we would have to know is if we are running in multithreaded or
polling mode.

-> Are there any other 'modes' this wouldn't work with?
Hoping for your comments...

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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