In my link layer driver I'm queuing packets to be transmitted using
pbuf_queue (using pbuf_take when appropriate)

There are some times when the link layer driver can't transmit packets for a
few seconds (it's busy doing something else).

This seems to be long enough for TCP packets to timeout and be
retransmitted.
When they are retransmitted the same pbufs are given to the link layer
driver; which has not yet transmitted the first set of packets.

When the link layer then uses pbuf_queue to put them on the packet queue
there is an assertion because the first packet on the queue is the same as
the packet being added (since the link layer didn't actually *send* the
packets TCP gave it earlier).

It seems my options are

  - Check the queue before adding the new packet, don't add duplicate
  packets
  - Check the queue before adding the new packet, if a duplicate is
  found make a copy of the new packet and queue that
  - Somehow disable TCP timeouts and retransmissions when the link layer
  isn't sending packets
  - Some other method?

What is the best way to avoid this problem?

Thanks,

Tom Hennen
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to