[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ethmac] about the hash table




   Hi,

	   I don;t know what exact application you use but Generly speaking
the purpose of the hash is to allow you to use a small memorey to cover
large range of addresses.

the simplest way to show example is assume your hash funciton take the 48
bit of addrss remove the 38 MSB bits so you are left with 10 bit.

so now no matter what Mac address come your hash result will need only a 10
bit depth of memorey.

now that we have this we have a second parameter and it come to solve the
problem of multiple address hit the same entry as take the above example if
the 10 bit LSB remiain the same the entry will be the same so what is usualy
done is that you allow 15 hits meaning let say the hash result was the nuber
200 and let say you know search the memorey for learning purpose than if
this entry is filled already you will try to put it in 201 and if this is
also used 202 and so on for 15 consecutive address and if all are full you
drop the address.
of course this also mean you need some sort of aging to clear old entry to
allow new addres to be learned. 
similry when you access the memorey for search if 200 don;t have the right
hit you try 201 and so on and if after 15 no hit was found you treat the
address as unknown and most likely send it through all the ports.

there are many type of hash function but the all solve this issue. as for
which fucntion to use there is no simple answer as it is more a network
dependent as it mainly depend on what Mac address you anticipate to have and
make the hash finction such that will spread them all over the memorey you
have so there will be as little as possible need for multi-serach and if
possiably to avoid miss-hit.

have a nice day

   Illan





-----Original Message-----
From: wilton@mail.usa.com [mailto:wilton@mail.usa.com]
Sent: Tuesday, January 21, 2003 1:25 AM
To: ethmac@opencores.org
Subject: [ethmac] about the hash table


Hi All,

Could anyone provide me the detail information about the hash talble for 
Ethernet MAC? what is it and how to generate/use it?

Thanks in advance,

Wilton
--
To unsubscribe from ethmac mailing list please visit
http://www.opencores.org/mailinglists.shtml
--
To unsubscribe from ethmac mailing list please visit http://www.opencores.org/mailinglists.shtml