Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97647
b: refs/heads/master
c: 7eb2e25
h: refs/heads/master
i:
  97645: 178e360
  97643: 0841462
  97639: 3025f38
  97631: d455177
v: v3
  • Loading branch information
Rusty Russell authored and Jeff Garzik committed May 31, 2008
1 parent 1ab0ac5 commit 7580a80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d399cf8c04c595d738d82d02ae2755b902a51571
refs/heads/master: 7eb2e25112bf920bb0a4d1cca445f3d96874c25f
14 changes: 9 additions & 5 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,25 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
free_old_xmit_skbs(vi);

/* If we has a buffer left over from last time, send it now. */
if (vi->last_xmit_skb) {
if (unlikely(vi->last_xmit_skb)) {
if (xmit_skb(vi, vi->last_xmit_skb) != 0) {
/* Drop this skb: we only queue one. */
vi->dev->stats.tx_dropped++;
kfree_skb(skb);
skb = NULL;
goto stop_queue;
}
vi->last_xmit_skb = NULL;
}

/* Put new one in send queue and do transmit */
__skb_queue_head(&vi->send, skb);
if (xmit_skb(vi, skb) != 0) {
vi->last_xmit_skb = skb;
goto stop_queue;
if (likely(skb)) {
__skb_queue_head(&vi->send, skb);
if (xmit_skb(vi, skb) != 0) {
vi->last_xmit_skb = skb;
skb = NULL;
goto stop_queue;
}
}
done:
vi->svq->vq_ops->kick(vi->svq);
Expand Down

0 comments on commit 7580a80

Please sign in to comment.