flushing arp buffer -- why __skb_dequeue rather than __skb_dequeue_tail ?
As part of one of our test cases we ran into a scenario where we were sending out messages while waiting on an arp reply. As expected they were buffered, but we noticed that after the reply was received the packets were sent out in LIFO order.
In neigh_update() in neighbor.c, we're looping through the list calling __skb_dequeue(). Is there any particular reason why this was chosen rather than __skb_dequeue_tail()? The latter would result in FIFO flushing of the buffer which could have some benefits to udp applications that retry on out-of-order message receipt, and it doesn't seem to be many more instructions, if any. Besides, this isn't the fast path so a few extra instructions shouldn't matter.
Would you anticipate any odd side effects if we did change to FIFO flushing?
Chris
Signature · 4 lines
Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: [email protected]
Re: flushing arp buffer -- why __skb_dequeue rather than __skb_dequeue_tail
Hello!
Quoted 1 line
__skb_dequeue_tail()? The latter would result in FIFO
Hmmm... actually, it is supposed to be FIFO now. :-) skb_dequeue_tail would result in lifo.
Probaly, you deal with an older kernel, I remember we had a bug here.
Alexey