> On Sunday 26 November 2006 5:28 am, Nikita V. Youshchenko wrote:
> > When AX88xxx hardware packs several incoming frames, it puts second
> > and subsequent frames with 2-byte alignment. This may cause situations
> > when IP layer gets IP packet not aligned at 32-bit word boundary,
> > which in turn may lead to kernel crashes on some hardware, and serious
> > slowdown on other hardware.
>
> The number "2" is magic.  You should rework this patch to use
> NET_IP_ALIGN instead ...

Hmm...
Actually, frame should be aligned at 4n+2, so here are two magic numbers (4 
and 2). Should 4 be replaced with something as well?

> and remove the #ifdefs. 

I believe that code should really be different between different 
architectures - because:
- on architectures that can't do hardware unaligned access, data move is 
required,
- on architectures that can do hardware unaligned access, data move is 
unnecessary slowdown.
And this was discussed in the mailing list several days ago.
Why removing #ifdef's in such a situation?

> Also, please cc your two ASIX patches to the maintainer of
> that module, he may have other comments ...

ok

Nikita

Attachment: pgpBGt9iIxxOS.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to