[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen-netback: use netdev_alloc_skb_ip_align
Use standard helper function to allocate and align received packet. Compile tested only Signed-off-by: Stephen Hemminger <stephen@xxxxxxxxxxxxxxxxxx> --- a/drivers/net/xen-netback/netback.c 2013-03-07 18:12:52.825300956 -0800 +++ b/drivers/net/xen-netback/netback.c 2013-03-20 12:09:09.052034865 -0700 @@ -1357,8 +1357,8 @@ static unsigned xen_netbk_tx_build_gops( ret < MAX_SKB_FRAGS) ? PKT_PROT_LEN : txreq.size; - skb = alloc_skb(data_len + NET_SKB_PAD + NET_IP_ALIGN, - GFP_ATOMIC | __GFP_NOWARN); + skb = __netdev_alloc_skb_ip_align(vif->dev, data_len, + GFP_ATOMIC | __GFP_NOWARN); if (unlikely(skb == NULL)) { netdev_dbg(vif->dev, "Can't allocate a skb in start_xmit.\n"); @@ -1366,9 +1366,6 @@ static unsigned xen_netbk_tx_build_gops( break; } - /* Packets passed to netif_rx() must have some headroom. */ - skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN); - if (extras[XEN_NETIF_EXTRA_TYPE_GSO - 1].type) { struct xen_netif_extra_info *gso; gso = &extras[XEN_NETIF_EXTRA_TYPE_GSO - 1]; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |