Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347461
b: refs/heads/master
c: 7bedc7d
h: refs/heads/master
i:
  347459: 816479a
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Rusty Russell committed Dec 18, 2012
1 parent c1fbe57 commit e3a478c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 6ee57bcc1e61d39c0579438055bc84087210f9b6
refs/heads/master: 7bedc7dc7c05e6072dc81da770f70c683c45da10
6 changes: 3 additions & 3 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ struct skb_vnet_hdr {
struct virtio_net_hdr hdr;
struct virtio_net_hdr_mrg_rxbuf mhdr;
};
unsigned int num_sg;
};

struct padded_vnet_hdr {
Expand Down Expand Up @@ -579,6 +578,7 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
{
struct skb_vnet_hdr *hdr = skb_vnet_hdr(skb);
const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
unsigned num_sg;

pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest);

Expand Down Expand Up @@ -617,8 +617,8 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
else
sg_set_buf(vi->tx_sg, &hdr->hdr, sizeof hdr->hdr);

hdr->num_sg = skb_to_sgvec(skb, vi->tx_sg + 1, 0, skb->len) + 1;
return virtqueue_add_buf(vi->svq, vi->tx_sg, hdr->num_sg,
num_sg = skb_to_sgvec(skb, vi->tx_sg + 1, 0, skb->len) + 1;
return virtqueue_add_buf(vi->svq, vi->tx_sg, num_sg,
0, skb, GFP_ATOMIC);
}

Expand Down

0 comments on commit e3a478c

Please sign in to comment.