URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [trunk/] [kernel/] [tcpip.c] - Diff between revs 327 and 341
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 327 |
Rev 341 |
Line 350... |
Line 350... |
if(frame->socket == NULL || frame->socket->state == IP_UDP || length == 0 ||
|
if(frame->socket == NULL || frame->socket->state == IP_UDP || length == 0 ||
|
frame->socket->state == IP_PING || ++frame->retryCnt > 4)
|
frame->socket->state == IP_PING || ++frame->retryCnt > 4)
|
{
|
{
|
FrameFree(frame); //can't be ACK'ed
|
FrameFree(frame); //can't be ACK'ed
|
}
|
}
|
|
#ifdef WIN32
|
|
else if(FrameFreeCount < FRAME_COUNT_SYNC)
|
|
{
|
|
FrameFree(frame); //can't be ACK'ed
|
|
}
|
|
#endif
|
else
|
else
|
{
|
{
|
//Put on resend list until TCP ACK'ed
|
//Put on resend list until TCP ACK'ed
|
frame->timeout = (short)(RETRANSMIT_TIME * frame->retryCnt);
|
frame->timeout = (short)(RETRANSMIT_TIME * frame->retryCnt);
|
FrameInsert(&FrameResendHead, &FrameResendTail, frame);
|
FrameInsert(&FrameResendHead, &FrameResendTail, frame);
|
Line 1294... |
Line 1300... |
{
|
{
|
//Rate limit output
|
//Rate limit output
|
if(socket->seq - socket->seqReceived >= SEND_WINDOW)
|
if(socket->seq - socket->seqReceived >= SEND_WINDOW)
|
{
|
{
|
//printf("l(%d,%d,%d) ", socket->seq - socket->seqReceived, socket->seq, socket->seqReceived);
|
//printf("l(%d,%d,%d) ", socket->seq - socket->seqReceived, socket->seq, socket->seqReceived);
|
if(self == IPThread || ++tries > 200)
|
if(self != IPThread && ++tries < 200)
|
break;
|
|
else
|
|
{
|
{
|
OS_ThreadSleep(1);
|
OS_ThreadSleep(1);
|
continue;
|
continue;
|
}
|
}
|
}
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.