×

Hash collision resolution with key compression in a MAC forwarding data structure

  • US 8,312,066 B2
  • Filed: 11/30/2010
  • Issued: 11/13/2012
  • Est. Priority Date: 11/30/2010
  • Status: Active Grant
First Claim
Patent Images

1. A method performed by a network element including a media access control (MAC) forwarding control module that looks up MAC address and interface (I/F) identifier pairs (MAC-I/F pairs) stored in a MAC forwarding data structure, the method comprising the steps of:

  • receiving at a physical port of the network element a packet that was sent by another network element and that includes a MAC address to lookup in the MAC forwarding data structure;

    generating a first tier hash index from the received MAC address with a first hash function;

    accessing a first tier bucket in a first tier data structure at the first tier hash index;

    determining the first tier bucket'"'"'s contents;

    in the case that the first tier bucket contains a null, returning a null;

    in the case that the first tier bucket contains one of the MAC-I/F pairs, retrieving the MAC-I/F pair from the first tier bucket, comparing the received MAC address to the retrieved MAC-I/F pair'"'"'s MAC address and;

    in the case that the received MAC address matches the MAC-I/F pair'"'"'s MAC address, returning the retrieved MAC-I/F pair'"'"'s interface identifier, wherein the interface identifier identifies an interface within the network element to which the packet should be forwarded, andin the case that the received MAC address does not match the retrieved MAC-I/F pair'"'"'s MAC address, returning null; and

    in the case that the first tier bucket contains a second tier data structure address and a mask bit list;

    generating a second tier hash index from the received MAC address and the mask bit list, accessing a second tier bucket in a second tier data structure, wherein the second tier data structure is stored at the second tier data structure address and the second tier bucket stored at the second tier hash index, determining contents of the second tier bucket, in the case that the second tier bucket contains a null, returning a null, in the case that the second tier bucket contains one of the stored MAC-I/F pairs, retrieving the MAC-I/F pair from the second tier bucket, comparing the received MAC address to the retrieved M AC-I/F pair'"'"'s MAC address and;

    in the case that the received MAC address matches the retrieved MAC-I/F pair'"'"'s MAC address, returning the retrieved MAC-I/F pair'"'"'s interface identifier, wherein the interface identifier identifies an interface within the network element to which the packet should be forwarded, andin the case that the received MAC address does not match the retrieved MAC-I/F pair'"'"'s MAC address, returning null;

    whereby each MAC-I/F pair lookup requires, at most, two memory accesses because the second tier lookup is a deterministic lookup with only a single memory access.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×