aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-10-30 00:28:59 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 00:28:59 -0400
commit0519d83d83ed485b5a1f9222ff69d7d6c9bb8a01 (patch)
tree2e336be8a4bd2e59bcd4b69b00feb77c6672a9cb /drivers/net/virtio_net.c
parent38bfd8f5bec496e8e0db8849e01c99a33479418a (diff)
parentb5dd884e682cae6b8c037f9d11f3b623b4cf2011 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e78486504d3a..95274678fe45 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -514,8 +514,7 @@ again:
514 /* Free up any pending old buffers before queueing new ones. */ 514 /* Free up any pending old buffers before queueing new ones. */
515 free_old_xmit_skbs(vi); 515 free_old_xmit_skbs(vi);
516 516
517 /* Put new one in send queue and do transmit */ 517 /* Try to transmit */
518 __skb_queue_head(&vi->send, skb);
519 capacity = xmit_skb(vi, skb); 518 capacity = xmit_skb(vi, skb);
520 519
521 /* This can happen with OOM and indirect buffers. */ 520 /* This can happen with OOM and indirect buffers. */
@@ -529,8 +528,17 @@ again:
529 } 528 }
530 return NETDEV_TX_BUSY; 529 return NETDEV_TX_BUSY;
531 } 530 }
532
533 vi->svq->vq_ops->kick(vi->svq); 531 vi->svq->vq_ops->kick(vi->svq);
532
533 /*
534 * Put new one in send queue. You'd expect we'd need this before
535 * xmit_skb calls add_buf(), since the callback can be triggered
536 * immediately after that. But since the callback just triggers
537 * another call back here, normal network xmit locking prevents the
538 * race.
539 */
540 __skb_queue_head(&vi->send, skb);
541
534 /* Don't wait up for transmitted skbs to be freed. */ 542 /* Don't wait up for transmitted skbs to be freed. */
535 skb_orphan(skb); 543 skb_orphan(skb);
536 nf_reset(skb); 544 nf_reset(skb);