From: Joshua Kinard <kumba@gentoo.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery
Date: Sun, 18 Dec 2011 10:13:29 -0500 [thread overview]
Message-ID: <4EEE0319.3050305@gentoo.org> (raw)
In-Reply-To: <20111217.215630.640392276998191183.davem@davemloft.net>
On 12/17/2011 21:56, David Miller wrote:
>> + netdev_for_each_mc_addr(ha, dev)
>> + set_bit((ether_crc(ETH_ALEN, ha->addr) >> 26),
>> + (volatile long unsigned int *)&priv->mcast_filter);
>
> This makes an assumption not only about the size of the "unsigned long"
> type, but also of the endianness of the architecture this runs on.
>
Can you give me some tips on this one? au1000_eth.c does the same thing,
and I'm not seeing what the endian issue is exactly. Is it the >> 26 part
or the use of ether_crc? I see there's an ether_crc_le, too, and some
drivers also do the >> 26 bit on it as well.
Which is correct? The few drivers I've looked at don't exactly spell out
this part of the code, and are usually doing something different because
most seem to access the multicast filter register in either 8-bits or
32-bits. MACE ethernet seems to be one of the few doing it in full 64-bits.
Thanks,
--
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28
"The past tempts us, the present confuses us, the future frightens us. And
our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
next prev parent reply other threads:[~2011-12-18 15:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-18 0:56 [PATCH] net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery Joshua Kinard
2011-12-18 2:56 ` David Miller
2011-12-18 4:37 ` Joshua Kinard
2011-12-18 5:19 ` David Miller
2011-12-18 14:40 ` Joshua Kinard
2011-12-18 15:13 ` Joshua Kinard [this message]
2011-12-18 13:26 ` Sergei Shtylyov
2011-12-18 14:35 ` Joshua Kinard
2011-12-25 1:45 ` Joshua Kinard
2011-12-26 20:17 ` David Miller
2011-12-27 4:54 ` Joshua Kinard
2011-12-27 5:06 ` Joshua Kinard
2011-12-27 18:17 ` David Miller
2011-12-27 18:34 ` Stephen Hemminger
2011-12-27 18:52 ` David Miller
2011-12-27 21:29 ` Joshua Kinard
2011-12-27 22:34 ` Stephen Hemminger
2011-12-27 22:48 ` Joshua Kinard
2011-12-28 0:29 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EEE0319.3050305@gentoo.org \
--to=kumba@gentoo.org \
--cc=davem@davemloft.net \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).