There is a problem in the the Ethernet driver for LwIP, which can permanently kill a TCP connection. The problem happens when a short chained packet is transmitted. The function hdkif_output has the following code:
if(p->tot_len < MIN_PKT_LEN) {
p->tot_len = MIN_PKT_LEN;
p->len = MIN_PKT_LEN;
}
if(p->tot_len < MIN_PKT_LEN) {
struct pbuf *temp_p;
int diff_len = MIN_PKT_LEN - p->tot_len;
for (temp_p = p; temp_p->next != NULL; temp_p = temp_p->next)
temp_p->tot_len += diff_len;
temp_p->tot_len += diff_len;
temp_p->len += diff_len;
}
-Jeremy