Added a minimum size of packets to be looped to improve performance. Also a bug fix that led to incorrect timing between packets

This commit is contained in:
Srivats P. 2011-10-12 20:20:36 +05:30
parent 210bdf11a9
commit e9ea3d7934
2 changed files with 5 additions and 1 deletions

View File

@ -138,6 +138,7 @@ void AbstractPort::updatePacketList()
void AbstractPort::updatePacketListSequential() void AbstractPort::updatePacketListSequential()
{ {
const int kMinLoopSize = 16;
long sec = 0; long sec = 0;
long nsec = 0; long nsec = 0;
@ -189,6 +190,9 @@ void AbstractPort::updatePacketListSequential()
break; break;
case OstProto::StreamControl::e_su_packets: case OstProto::StreamControl::e_su_packets:
x = frameVariableCount; x = frameVariableCount;
n = 2;
while (x < kMinLoopSize)
x = frameVariableCount*n++;
n = streamList_[i]->numPackets() / x; n = streamList_[i]->numPackets() / x;
y = streamList_[i]->numPackets() % x; y = streamList_[i]->numPackets() % x;
burstSize = x + y; burstSize = x + y;

View File

@ -451,7 +451,7 @@ _restart:
{ {
long usecs = packetSequenceList_.at(i+k)->usecDelay_ long usecs = packetSequenceList_.at(i+k)->usecDelay_
+ overHead; + overHead;
if (usecs) if (usecs > 0)
{ {
udelay(usecs); udelay(usecs);
overHead = 0; overHead = 0;