* mtu issue with gianfar driver
@ 2011-07-25 11:47 Kumar Reddy Suresh-B22303
0 siblings, 0 replies; only message in thread
From: Kumar Reddy Suresh-B22303 @ 2011-07-25 11:47 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]
Hi All,
A problem was observed in gianfar driver when the interface MTU was modified to a small value.
FYI Kernel Version : 2.6.32 on PPC.
Like if we change the interface mtu to say 100, ping traffic with size greater than 450 is failing.
It was observed that packets ( ping requests) going out of that interface are getting properly fragmented, but the return packets ( ping replies ) are getting dropped by the interface.
To fix this issue the function gfar_change_mtu() in gianfar.c was modified as below:
rx_buffer_size is restored to DEFAULT_RX_BUFFER_SIZE as indicated in RED in the code snippet below
------------------------- CODE SNIPPET BEGIN ----------------------------------
tempsize =
(frame_size & ~(INCREMENTAL_BUFFER_SIZE - 1)) +
INCREMENTAL_BUFFER_SIZE;
if (tempsize < DEFAULT_RX_BUFFER_SIZE )
tempsize = DEFAULT_RX_BUFFER_SIZE;
/* Only stop and start the controller if it isn't already
* stopped, and we changed something */
if ((oldsize != tempsize) && (dev->flags & IFF_UP))
stop_gfar(dev);
priv->rx_buffer_size = tempsize;
dev->mtu = new_mtu;
------------------------- CODE SNIPPET END----------------------------------
If this fix OK? What is the impact of this change on overall behavior?
Best Regards,
- Suresh
[-- Attachment #2: Type: text/html, Size: 8406 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-25 11:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 11:47 mtu issue with gianfar driver Kumar Reddy Suresh-B22303
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.