|
|
Subscribe / Log in / New account

Network transmit queue limits

Network transmit queue limits

Posted Aug 12, 2011 17:25 UTC (Fri) by ajb (subscriber, #9694)
In reply to: Network transmit queue limits by dlang
Parent article: Network transmit queue limits

I was thinking of something along the lines of:

void q_add(Q *q,PKT *pkt)
{
   // timestamp packet
   pkt->time=now(); 

   // add packet to end of list
   *q->last=pkt;    
   q->last=&pkt->next;
}

PKT *q_get(Q *q)
{
   PKT *pkt=q->first;
   if((pkt->time+q->max_time) < now())
   {
      free(pkt);
      return 0;
   }
   else
   {
      return pkt;
   }
}
No estimation at all. There are weaknesses in this approach, but it's simpler than adjusting a byte length.


to post comments

Network transmit queue limits

Posted Aug 13, 2011 7:40 UTC (Sat) by butlerm (subscriber, #13312) [Link]

Getting the time accurate to microseconds can be a rather expensive operation, unfortunately, and that weighs against regulating queue lengths in terms of time when a simple proxy like bytes is available.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds