aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 7b0059f0f5d4..3492ae0951de 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -242,6 +242,7 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
242 } 242 }
243 243
244 if (skb_is_gso(skb)) { 244 if (skb_is_gso(skb)) {
245 hdr->hdr_len = skb_transport_header(skb) - skb->data;
245 hdr->gso_size = skb_shinfo(skb)->gso_size; 246 hdr->gso_size = skb_shinfo(skb)->gso_size;
246 if (skb_shinfo(skb)->gso_type & SKB_GSO_TCP_ECN) 247 if (skb_shinfo(skb)->gso_type & SKB_GSO_TCP_ECN)
247 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4_ECN; 248 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4_ECN;
@@ -255,7 +256,7 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
255 BUG(); 256 BUG();
256 } else { 257 } else {
257 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; 258 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
258 hdr->gso_size = 0; 259 hdr->gso_size = hdr->hdr_len = 0;
259 } 260 }
260 261
261 vnet_hdr_to_sg(sg, skb); 262 vnet_hdr_to_sg(sg, skb);