From 552a7fc91047e8e3cfe21b3e8268765c29f0ea03 Mon Sep 17 00:00:00 2001 From: Alok Makhariya Date: Fri, 4 Apr 2014 16:34:43 +0530 Subject: gianfar: adding EXTRA_HEADROOM in skb_size calc of asf_gianfar recycle fn. Recycling of skb was not working. This was due to checks in gfar_recycle_skb is getting false which results in freeing skb every time. There is mismatch b/w skb_size calculated and actual skb size (skb->end - skb->head). So this patch adds EXTRA_HEADROOM when skb_size is calculated. CR:ENGR00306216 Signed-off-by: Alok Makhariya Change-Id: I524254ceb2a7ec757645d11922e7066d0b22b756 Reviewed-on: http://git.am.freescale.net:8181/10689 Tested-by: Review Code-CDREVIEW Reviewed-by: Rajan Gupta Reviewed-by: Jose Rivera diff --git a/drivers/net/ethernet/freescale/asf_gianfar.c b/drivers/net/ethernet/freescale/asf_gianfar.c index af7f205..5280ed9 100644 --- a/drivers/net/ethernet/freescale/asf_gianfar.c +++ b/drivers/net/ethernet/freescale/asf_gianfar.c @@ -55,7 +55,8 @@ static inline void gfar_asf_reclaim_skb(struct sk_buff *skb) static inline void gfar_recycle_skb(struct sk_buff *skb) { struct sk_buff_head *h = &__get_cpu_var(skb_recycle_list); - int skb_size = SKB_DATA_ALIGN(GFAR_RXB_REC_SZ + NET_SKB_PAD); + int skb_size = SKB_DATA_ALIGN(GFAR_RXB_REC_SZ + NET_SKB_PAD + + EXTRA_HEADROOM); if (skb_queue_len(h) < DEFAULT_RX_RING_SIZE && !skb_cloned(skb) && !skb_is_nonlinear(skb) && -- cgit v0.10.2