netdev
[Top] [All Lists]

[0/3] mc_filter on big-endian arch

To: Jeff Garzik <jgarzik@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>
Subject: [0/3] mc_filter on big-endian arch
From: Roger Luethi <rl@xxxxxxxxxxx>
Date: Sun, 6 Jun 2004 18:53:22 +0200
Cc: netdev@xxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
A.J. from VIA Networking Technologies noticed that via-rhine is using
cpu_to_le32() when preparing mc_filter hashes. I confirmed that this
breaks Rhine hardware multicast filters on big-endian architectures.

A bunch of other drivers are affected, too. I'll post a patch for
2.6 atp, winbond, and tulip_core (typhoon could be okay at first
glance). Those are entirely untested due to lack of hardware.

If the patches are ack'ed by the respective maintainers, we might want
to fix up the tulips in 2.4 as well. atp still uses set_bit in 2.4 and
is thus okay. Note: Although it's been widely popular, there is no need
to use cpu_to_le32 when converting from set_bit.

A generic hash filter calculator might be helpful. Most drivers get
it right, but the workings of the hardware mc filters and the bit
trickery in all those functions calls for at least one _documented_
version. IMHO, anyway.

Roger

<Prev in Thread] Current Thread [Next in Thread>