diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-10-16 09:26:14 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-17 23:50:32 -0500 |
commit | 7bedc7dc7c05e6072dc81da770f70c683c45da10 (patch) | |
tree | 33e3a686088735c63c9249ce99695fb318ccfa91 /drivers | |
parent | 6ee57bcc1e61d39c0579438055bc84087210f9b6 (diff) |
virtio-net: remove unused skb_vnet_hdr->num_sg field
[Split from "correct capacity math on ring full" -- Rusty]
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/virtio_net.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3db65867895b..6c094c88424e 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -95,7 +95,6 @@ struct skb_vnet_hdr { | |||
95 | struct virtio_net_hdr hdr; | 95 | struct virtio_net_hdr hdr; |
96 | struct virtio_net_hdr_mrg_rxbuf mhdr; | 96 | struct virtio_net_hdr_mrg_rxbuf mhdr; |
97 | }; | 97 | }; |
98 | unsigned int num_sg; | ||
99 | }; | 98 | }; |
100 | 99 | ||
101 | struct padded_vnet_hdr { | 100 | struct padded_vnet_hdr { |
@@ -579,6 +578,7 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
579 | { | 578 | { |
580 | struct skb_vnet_hdr *hdr = skb_vnet_hdr(skb); | 579 | struct skb_vnet_hdr *hdr = skb_vnet_hdr(skb); |
581 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; | 580 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; |
581 | unsigned num_sg; | ||
582 | 582 | ||
583 | pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest); | 583 | pr_debug("%s: xmit %p %pM\n", vi->dev->name, skb, dest); |
584 | 584 | ||
@@ -617,8 +617,8 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
617 | else | 617 | else |
618 | sg_set_buf(vi->tx_sg, &hdr->hdr, sizeof hdr->hdr); | 618 | sg_set_buf(vi->tx_sg, &hdr->hdr, sizeof hdr->hdr); |
619 | 619 | ||
620 | hdr->num_sg = skb_to_sgvec(skb, vi->tx_sg + 1, 0, skb->len) + 1; | 620 | num_sg = skb_to_sgvec(skb, vi->tx_sg + 1, 0, skb->len) + 1; |
621 | return virtqueue_add_buf(vi->svq, vi->tx_sg, hdr->num_sg, | 621 | return virtqueue_add_buf(vi->svq, vi->tx_sg, num_sg, |
622 | 0, skb, GFP_ATOMIC); | 622 | 0, skb, GFP_ATOMIC); |
623 | } | 623 | } |
624 | 624 | ||