lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #6861] Pimp ip_frag.c


From: Jonathan Larmour
Subject: [lwip-devel] [task #6861] Pimp ip_frag.c
Date: Wed, 10 Oct 2007 12:09:01 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051202 Fedora/1.5-0.fc4 Firefox/1.5

Follow-up Comment #37, task #6861 (project lwip):

>> discard the oldest fragments when reassembling 
>
> I've been thinking about how to code this, and I didn't really
> find a solution except generating a second linked list of all
> fragments in the order of their creation (including a pointer to
> the packet they are enqueued), which isn't really in the spirit
> of lwIP for me...
>
> Any other ideas?

I think I may have been imprecise. I didn't mean the oldest fragments full
stop, I meant the oldest packet being reassembled. Discarding individual
fragments wouldn't help as you may be discarding other parts of the same
packet you're reassembling!

So what I meant was the oldest (incomplete) packet, and we can already
determine the oldest one using the timer field. The solution with least code
is probably just to loop calling ip_reass_tmr() until there's space. In other
words:

  while ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) {
    ip_reass_tmr();
  }


    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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