Patchwork gianfar:don't add FCB length to hard_header_len

login
register
mail settings
Submitter Wu Jiajun-B06378
Date May 22, 2012, 9 a.m.
Message ID <1337677248-27792-1-git-send-email-b06378@freescale.com>
Download mbox | patch
Permalink /patch/160573/
State Accepted
Delegated to: Kumar Gala
Headers show

Comments

Wu Jiajun-B06378 - May 22, 2012, 9 a.m.
FCB(Frame Control Block) isn't the part of netdev hard header.
Add FCB to hard_header_len will make GRO fail at MAC comparision stage.

Signed-off-by: Jiajun Wu <b06378@freescale.com>
---
 drivers/net/ethernet/freescale/gianfar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - May 22, 2012, 7:18 p.m.
From: Jiajun Wu <b06378@freescale.com>
Date: Tue, 22 May 2012 17:00:48 +0800

> FCB(Frame Control Block) isn't the part of netdev hard header.
> Add FCB to hard_header_len will make GRO fail at MAC comparision stage.
> 
> Signed-off-by: Jiajun Wu <b06378@freescale.com>

Applied, thanks.

Someone needs to go through this driver when net-next opens up
and fix all of the indentation in this driver.
Jan Ceuleers - May 24, 2012, 3:04 p.m.
On 05/22/2012 09:18 PM, David Miller wrote:
> From: Jiajun Wu <b06378@freescale.com>
> Date: Tue, 22 May 2012 17:00:48 +0800
> 
>> FCB(Frame Control Block) isn't the part of netdev hard header.
>> Add FCB to hard_header_len will make GRO fail at MAC comparision stage.
>>
>> Signed-off-by: Jiajun Wu <b06378@freescale.com>
> 
> Applied, thanks.
> 
> Someone needs to go through this driver when net-next opens up
> and fix all of the indentation in this driver.

May I give that a go?

Patch

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 1adb024..0741ade 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1082,7 +1082,7 @@  static int gfar_probe(struct platform_device *ofdev)
 
 	if (dev->features & NETIF_F_IP_CSUM ||
 			priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)
-		dev->hard_header_len += GMAC_FCB_LEN;
+		dev->needed_headroom = GMAC_FCB_LEN;
 
 	/* Program the isrg regs only if number of grps > 1 */
 	if (priv->num_grps > 1) {