[PATCH] ibm_newemac: Fixes entry of short packets

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 27 18:58:34 EST 2008


>         
> 
> Actually , short packets are not allowed to flow through the higher
> layers, If any of the layer tried to use the extra room available may
> hit wit crash .
> Since it is a invalid packet it has to be dropped and freed in driver.
> Actually if you see in code, the other invalid packets are also
> handelled similar.

My point is they should not. The rx skb should be kept in the ring for
further rx (ie, the data ignored and re-use the skb). A bit like we do
when we decide the packet is small enough to be copied to a new skb.

Ie. Move you test above the threshold test and recycle the skb.

We need to fix the usage of the dma operations in this driver anyway
and this will make it easier as we'll be able to avoid re-mapping an
skb we just recycle. (the current driver never unmaps which means it
can't be used with an iommu, which is a problem on some cell based
platforms).

Ben.






More information about the Linuxppc-dev mailing list