From: Herbert Xu Date: Fri, 12 Jun 2009 03:55:17 +0000 (-0700) Subject: virtio_net: Fix IP alignment on non-mergeable RX path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8981f01001c616f58f1623ecadfab8b1ed758da7;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git virtio_net: Fix IP alignment on non-mergeable RX path We need to enforce the IP alignment on the non-mergeable RX path just like the other RX path. Not doing so results in misaligned IP headers. Signed-off-by: Herbert Xu Signed-off-by: Rusty Russell Signed-off-by: David S. Miller --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 09bd4410fa65..f0bb1a4c8323 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -283,10 +283,11 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi) for (;;) { struct virtio_net_hdr *hdr; - skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN); + skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN + NET_IP_ALIGN); if (unlikely(!skb)) break; + skb_reserve(skb, NET_IP_ALIGN); skb_put(skb, MAX_PACKET_LEN); hdr = skb_vnet_hdr(skb);