Method for accessing a non-symmetric dual-slot address table and switching apparatus using same
First Claim
1. A data writing method for a non-symmetric dual-slot address table, wherein the non-symmetric dual-slot address table has a first entry with m slots and a second entry with n slots, m and n are integers and m is an integer multiple of n, the method comprising steps of:
- generating a hash value according to a SMAC address;
selecting an address corresponding to the hash value for the non-symmetric dual-slot address table;
writing a tag and a source port for the SMAC address to a slot corresponding to the selected address in the first entry, when the slot corresponding to the selected address in the first entry is empty; and
mapping the hash value to a sub-address and a share value when the slot corresponding to the address in the first entry is not empty, and then selecting a slot corresponding to the sub-address in the second entry, and writing the tag, the share value and the source port for the SMAC address to the slot corresponding to the sub-address in the second entry.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus for accessing a non-symmetric dual-slot address table having two entries 0, 1 that are different in size. When writing data, the data is hashed to generate a hash value. Then, the data is written to a slot corresponding to the hash value in the entry 0. When there was data in the slot 0, the hash value is mapped to a sub-address and a share value, and then a slot 1 corresponding to the sub-address is selected from the entry 1. Afterwards, the SMAC tag, the share value and the source port are written to the slot 1. In addition, when transmitting the packet, a hash value is generated according to the DMAC address. Then, a SMAC tag, the share value and the source port are read according to the hash value. After compared, the packet is transmitted.
90 Citations
20 Claims
-
1. A data writing method for a non-symmetric dual-slot address table, wherein the non-symmetric dual-slot address table has a first entry with m slots and a second entry with n slots, m and n are integers and m is an integer multiple of n, the method comprising steps of:
-
generating a hash value according to a SMAC address;
selecting an address corresponding to the hash value for the non-symmetric dual-slot address table;
writing a tag and a source port for the SMAC address to a slot corresponding to the selected address in the first entry, when the slot corresponding to the selected address in the first entry is empty; and
mapping the hash value to a sub-address and a share value when the slot corresponding to the address in the first entry is not empty, and then selecting a slot corresponding to the sub-address in the second entry, and writing the tag, the share value and the source port for the SMAC address to the slot corresponding to the sub-address in the second entry. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method for looking up a non-symmetric dual-slot address table to transmit a packet, wherein the packet comprises a SMAC address and a DMAC address, and the non-symmetric dual-slot address table has a first entry with m slots and a second entry with n slots, m and n are integers and m is an integer multiple of n, the method comprising steps of:
-
generating a hash value according to the DMAC address;
selecting an address corresponding to the hash value for the non-symmetric dual-slot address table;
transmitting the packet according to a destination port specified in a slot corresponding to the selected address in the first entry, when a tag of the MAC address is consistent with a tag of the SMAC address in a slot corresponding to the said selected address in the first entry; and
transmitting the packet according to a source port specified in a slot corresponding to a corresponding sub-address in the second entry, when the tag and a share value of the DMAC address is consistent with a tag and a share value of a SMAC address stored in a slot corresponding to the sub-address. - View Dependent Claims (10, 11, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
12. A switching apparatus having a plurality of ports, for transmitting a packet having a SMAC address and a DMAC address from a source port of said plurality of ports, the switching apparatus comprising:
-
a memory, having a non-symmetric dual-slot address table, wherein the non-symmetric dual-slot address table has a first entry with m slots and a second entry with n slots, m and n are integers and m is an integer multiple of n, and is used for accessing a plurality of MAC addresses;
a writing device, for writing the SMAC address to the non-symmetric dual-slot address table, wherein a first hash value is generated according to the SMAC address;
an first address corresponding to the first hash value from the non-symmetric dual-slot address table is selected;
a tag and the source port for the SMAC address are written to a slot corresponding to the first address in the first entry, when the slot corresponding to the first address in the first entry is empty; and
the first hash value is mapped to a first sub-address and a first share value when the slot corresponding to the first address in the first entry is not empty, and then a slot corresponding to the first sub-address in the second entry is selected, and the tag, the first share value and the source port of the SMAC address are written to the slot corresponding to the first sub-address in the second entry; and
a transmitting device, for transmitting the packet to a destination port, wherein a second hash value is generated according to the DMAC address;
an second address corresponding to the second hash value is selected for the non-symmetric dual-slot address table;
the packet is transmitted according to the destination port in a slot corresponding the second address in the first entry, when a tag of the MAC address is consistent with a tag of the SMAC address in a slot corresponding to the second address in the first entry; and
the packet is transmitted according to a source port stored in a slot corresponding to a second sub-address in the second entry, when the tag and the second share value of the DMAC address is consistent with a tag and a share value of a SMAC address stored in a slot corresponding to the second sub-address.
-
Specification