* [PATCH] stmmac: replace open coded __netdev_alloc_skb_ip_align() with actual call
@ 2015-05-20 6:34 Vineet Gupta
2015-05-21 22:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vineet Gupta @ 2015-05-20 6:34 UTC (permalink / raw)
To: Giuseppe Cavallaro, netdev; +Cc: linux-kernel, Vineet Gupta
This also matches with the sibling call netdev_alloc_skb_ip_align() made in
rx fast path.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 05c146f718a3..42e1492ea845 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -975,13 +975,11 @@ static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
{
struct sk_buff *skb;
- skb = __netdev_alloc_skb(priv->dev, priv->dma_buf_sz + NET_IP_ALIGN,
- flags);
+ skb = __netdev_alloc_skb_ip_align(priv->dev, priv->dma_buf_sz, flags);
if (!skb) {
pr_err("%s: Rx init fails; skb is NULL\n", __func__);
return -ENOMEM;
}
- skb_reserve(skb, NET_IP_ALIGN);
priv->rx_skbuff[i] = skb;
priv->rx_skbuff_dma[i] = dma_map_single(priv->device, skb->data,
priv->dma_buf_sz,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] stmmac: replace open coded __netdev_alloc_skb_ip_align() with actual call
2015-05-20 6:34 [PATCH] stmmac: replace open coded __netdev_alloc_skb_ip_align() with actual call Vineet Gupta
@ 2015-05-21 22:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-05-21 22:41 UTC (permalink / raw)
To: Vineet.Gupta1; +Cc: peppe.cavallaro, netdev, linux-kernel
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Date: Wed, 20 May 2015 12:04:40 +0530
> This also matches with the sibling call netdev_alloc_skb_ip_align() made in
> rx fast path.
>
> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-21 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 6:34 [PATCH] stmmac: replace open coded __netdev_alloc_skb_ip_align() with actual call Vineet Gupta
2015-05-21 22:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).