Thread (10 messages) 10 messages, 3 authors, 2015-02-23

Re: [RFC] mac80211: use rhashtable for station table

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2015-02-23 22:01:38

On Mon, 2015-02-23 at 22:52 +0100, Johannes Berg wrote:
We also can't rely on 4-byte alignment though, so perhaps we should do
something like

u32 sta_info_hash(void *addr, u32 len, u32 seed)
{
	u16 *a = addr;

	return jhash_3words(a[0], a[1], a[2], seed);
}
Or better do

	return jhash_2words(addr[0], (addr[1] << 16) | addr[2], seed);

since I have no idea how the missing high 16 bits would behave.
(we can rely on 2-byte alignment, but not 4-byte)

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help