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



_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to