Loading drivers/net/3c59x.c +1 −2 Original line number Diff line number Diff line Loading @@ -2560,7 +2560,7 @@ boomerang_rx(struct net_device *dev) struct sk_buff *skb; entry = vp->dirty_rx % RX_RING_SIZE; if (vp->rx_skbuff[entry] == NULL) { skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, PKT_BUF_SZ); if (skb == NULL) { static unsigned long last_jif; if (time_after(jiffies, last_jif + 10 * HZ)) { Loading @@ -2572,7 +2572,6 @@ boomerang_rx(struct net_device *dev) break; /* Bad news! */ } skb_reserve(skb, NET_IP_ALIGN); vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); vp->rx_skbuff[entry] = skb; } Loading drivers/net/8139cp.c +2 −6 Original line number Diff line number Diff line Loading @@ -549,14 +549,12 @@ static int cp_rx_poll(struct napi_struct *napi, int budget) pr_debug("%s: rx slot %d status 0x%x len %d\n", dev->name, rx_tail, status, len); new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN); new_skb = netdev_alloc_skb_ip_align(dev, buflen); if (!new_skb) { dev->stats.rx_dropped++; goto rx_next; } skb_reserve(new_skb, NET_IP_ALIGN); dma_unmap_single(&cp->pdev->dev, mapping, buflen, PCI_DMA_FROMDEVICE); Loading Loading @@ -1057,12 +1055,10 @@ static int cp_refill_rx(struct cp_private *cp) struct sk_buff *skb; dma_addr_t mapping; skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, cp->rx_buf_sz); if (!skb) goto err_out; skb_reserve(skb, NET_IP_ALIGN); mapping = dma_map_single(&cp->pdev->dev, skb->data, cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp->rx_skb[i] = skb; Loading drivers/net/8139too.c +1 −2 Original line number Diff line number Diff line Loading @@ -2004,9 +2004,8 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, /* Malloc up new buffer, compatible with net-2e. */ /* Omit the four octet CRC from the length. */ skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, pkt_size); if (likely(skb)) { skb_reserve (skb, NET_IP_ALIGN); /* 16 byte align the IP fields. */ #if RX_BUF_IDX == 3 wrap_copy(skb, rx_ring, ring_offset+4, pkt_size); #else Loading drivers/net/atl1e/atl1e_main.c +1 −3 Original line number Diff line number Diff line Loading @@ -1433,14 +1433,12 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que, packet_size = ((prrs->word1 >> RRS_PKT_SIZE_SHIFT) & RRS_PKT_SIZE_MASK) - 4; /* CRC */ skb = netdev_alloc_skb(netdev, packet_size + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(netdev, packet_size); if (skb == NULL) { dev_warn(&pdev->dev, "%s: Memory squeeze," "deferring packet.\n", netdev->name); goto skip_pkt; } skb_reserve(skb, NET_IP_ALIGN); skb->dev = netdev; memcpy(skb->data, (u8 *)(prrs + 1), packet_size); skb_put(skb, packet_size); Loading drivers/net/atlx/atl1.c +2 −9 Original line number Diff line number Diff line Loading @@ -1864,21 +1864,14 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter) rfd_desc = ATL1_RFD_DESC(rfd_ring, rfd_next_to_use); skb = netdev_alloc_skb(adapter->netdev, adapter->rx_buffer_len + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(adapter->netdev, adapter->rx_buffer_len); if (unlikely(!skb)) { /* Better luck next round */ adapter->netdev->stats.rx_dropped++; break; } /* * Make buffer alignment 2 beyond a 16 byte boundary * this will result in a 16 byte aligned IP header after * the 14 byte MAC header is removed */ skb_reserve(skb, NET_IP_ALIGN); buffer_info->alloced = 1; buffer_info->skb = skb; buffer_info->length = (u16) adapter->rx_buffer_len; Loading Loading
drivers/net/3c59x.c +1 −2 Original line number Diff line number Diff line Loading @@ -2560,7 +2560,7 @@ boomerang_rx(struct net_device *dev) struct sk_buff *skb; entry = vp->dirty_rx % RX_RING_SIZE; if (vp->rx_skbuff[entry] == NULL) { skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, PKT_BUF_SZ); if (skb == NULL) { static unsigned long last_jif; if (time_after(jiffies, last_jif + 10 * HZ)) { Loading @@ -2572,7 +2572,6 @@ boomerang_rx(struct net_device *dev) break; /* Bad news! */ } skb_reserve(skb, NET_IP_ALIGN); vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); vp->rx_skbuff[entry] = skb; } Loading
drivers/net/8139cp.c +2 −6 Original line number Diff line number Diff line Loading @@ -549,14 +549,12 @@ static int cp_rx_poll(struct napi_struct *napi, int budget) pr_debug("%s: rx slot %d status 0x%x len %d\n", dev->name, rx_tail, status, len); new_skb = netdev_alloc_skb(dev, buflen + NET_IP_ALIGN); new_skb = netdev_alloc_skb_ip_align(dev, buflen); if (!new_skb) { dev->stats.rx_dropped++; goto rx_next; } skb_reserve(new_skb, NET_IP_ALIGN); dma_unmap_single(&cp->pdev->dev, mapping, buflen, PCI_DMA_FROMDEVICE); Loading Loading @@ -1057,12 +1055,10 @@ static int cp_refill_rx(struct cp_private *cp) struct sk_buff *skb; dma_addr_t mapping; skb = netdev_alloc_skb(dev, cp->rx_buf_sz + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, cp->rx_buf_sz); if (!skb) goto err_out; skb_reserve(skb, NET_IP_ALIGN); mapping = dma_map_single(&cp->pdev->dev, skb->data, cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp->rx_skb[i] = skb; Loading
drivers/net/8139too.c +1 −2 Original line number Diff line number Diff line Loading @@ -2004,9 +2004,8 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, /* Malloc up new buffer, compatible with net-2e. */ /* Omit the four octet CRC from the length. */ skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(dev, pkt_size); if (likely(skb)) { skb_reserve (skb, NET_IP_ALIGN); /* 16 byte align the IP fields. */ #if RX_BUF_IDX == 3 wrap_copy(skb, rx_ring, ring_offset+4, pkt_size); #else Loading
drivers/net/atl1e/atl1e_main.c +1 −3 Original line number Diff line number Diff line Loading @@ -1433,14 +1433,12 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que, packet_size = ((prrs->word1 >> RRS_PKT_SIZE_SHIFT) & RRS_PKT_SIZE_MASK) - 4; /* CRC */ skb = netdev_alloc_skb(netdev, packet_size + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(netdev, packet_size); if (skb == NULL) { dev_warn(&pdev->dev, "%s: Memory squeeze," "deferring packet.\n", netdev->name); goto skip_pkt; } skb_reserve(skb, NET_IP_ALIGN); skb->dev = netdev; memcpy(skb->data, (u8 *)(prrs + 1), packet_size); skb_put(skb, packet_size); Loading
drivers/net/atlx/atl1.c +2 −9 Original line number Diff line number Diff line Loading @@ -1864,21 +1864,14 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter) rfd_desc = ATL1_RFD_DESC(rfd_ring, rfd_next_to_use); skb = netdev_alloc_skb(adapter->netdev, adapter->rx_buffer_len + NET_IP_ALIGN); skb = netdev_alloc_skb_ip_align(adapter->netdev, adapter->rx_buffer_len); if (unlikely(!skb)) { /* Better luck next round */ adapter->netdev->stats.rx_dropped++; break; } /* * Make buffer alignment 2 beyond a 16 byte boundary * this will result in a 16 byte aligned IP header after * the 14 byte MAC header is removed */ skb_reserve(skb, NET_IP_ALIGN); buffer_info->alloced = 1; buffer_info->skb = skb; buffer_info->length = (u16) adapter->rx_buffer_len; Loading