Linux virtualization list
 help / color / mirror / Atom feed
* bug in virtio network driver?
@ 2007-08-21  8:48 Christian Borntraeger
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Borntraeger @ 2007-08-21  8:48 UTC (permalink / raw)
  To: Rusty Russell; +Cc: kvm-devel, virtualization

Hello Rusty,

I think I have found a problem in the virtio network driver. virtio_net 
reclaims sent skbs on xmit. That means that there is always one skb 
outstanding and the netdev packet statistic is always one packet to low.

Documentation/networking/drivers.txt says

3) Do not forget that once you return 0 from your hard_start_xmit
   method, it is your driver's responsibility to free up the SKB
   and in some finite amount of time.

   For example, this means that it is not allowed for your TX
   mitigation scheme to let TX packets "hang out" in the TX
   ring unreclaimed forever if no new TX packets are sent.
   This error can deadlock sockets waiting for send buffer room
   to be freed up.

One solution would be to use the xmit_done interrupt. Unfortunately this would 
require additional locking as multiple interrupts can happen at two or more 
cpus. Do you have any better ideas?

Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-30 11:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200708211048.33534.borntraeger@de.ibm.com>
2007-08-21  9:09 ` bug in virtio network driver? Rusty Russell
     [not found] ` <1187687377.19435.176.camel@localhost.localdomain>
2007-08-21 15:06   ` Arnd Bergmann
2007-08-22  3:08     ` Rusty Russell
2007-08-21 16:02   ` Christian Borntraeger
     [not found]   ` <200708211802.04103.borntraeger@de.ibm.com>
2007-08-29 21:07     ` Rusty Russell
     [not found]     ` <1188421640.5531.141.camel@localhost.localdomain>
2007-08-30 11:28       ` Christian Borntraeger
2007-08-21  8:48 Christian Borntraeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox