HI,
I am using LWIP on the CM of f28388.
In f2838xif.c:f2838xif_transmit() the transmit descriptors are chained if the input pbuf is a chain. Descriptors are chained using the nextPacketDesc member.
The nextPacketDesc member is also used to put descriptors on a wait queue in the ethernet driver in ethernet.c:Ethernet_performPushOnPacketQueue().
The TX completion call in f2838xif.c:f2838xif_process_transmit() follows the chain of nextPacketDesc, calling mem_free() for each descriptor.
This causes a problem because when a descriptor is removed from the wait queue and given to the EMAC to send, it could have a non-null nextPacketDesc, which means that when the completion routine is invoked, it will free all the descriptors that were on the wait queue, regardless of whether they were part of the original pbuf chain or not.
Note that this is an issue even if pbufs are never chained. The problem can happen anytime more than one packet is on the TX wait queue.
Can someone please confirm that I have understood this correctly, and that this is indeed a bug?
I think that the issue would be fixed if the routine ethernet.c:Ethernet_removePacketsFromTxQueue() were to arrange to clear the nextPacketDesc member of the last descriptor in the chain as it is enqueing them to the device.