summaryrefslogtreecommitdiffstats
path: root/drivers/net/bna
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-07-08 05:29:30 +0000
committerDavid S. Miller <davem@davemloft.net>2011-07-08 09:09:07 -0700
commit0a0e2344a62ce9e7fac6129d6292e59aecfceced (patch)
tree4bcc4cebe5e320cc7bd6d5968d1772e4bac0959e /drivers/net/bna
parent135d23d66c53ade614c288d422f4c4b3205eb201 (diff)
bna: use netdev_alloc_skb_ip_align()
Some workloads need some headroom (NET_SKB_PAD) to avoid expensive reallocations. Using netdev_alloc_skb_ip_align() instead of bare skb_alloc() brings the NET_IP_ALIGN and the NET_SKB_PAD headroom. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Rasesh Mody <rmody@brocade.com> CC: Debashis Dutt <ddutt@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna')
-rw-r--r--drivers/net/bna/bnad.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index 44e219c910d..795b93b73b1 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -386,14 +386,12 @@ bnad_alloc_n_post_rxbufs(struct bnad *bnad, struct bna_rcb *rcb)
BNA_RXQ_QPGE_PTR_GET(unmap_prod, rcb->sw_qpt, rxent,
wi_range);
}
- skb = alloc_skb(rcb->rxq->buffer_size + NET_IP_ALIGN,
- GFP_ATOMIC);
+ skb = netdev_alloc_skb_ip_align(bnad->netdev,
+ rcb->rxq->buffer_size);
if (unlikely(!skb)) {
BNAD_UPDATE_CTR(bnad, rxbuf_alloc_failed);
goto finishing;
}
- skb->dev = bnad->netdev;
- skb_reserve(skb, NET_IP_ALIGN);
unmap_array[unmap_prod].skb = skb;
dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
rcb->rxq->buffer_size,