IP Library Granted Patent US 10,171,419
Granted Patent B2
US 10,171,419 · App. 15/186,477 · Granted Jan 1, 2019

IP route caching with two search stages on prefix length

Inventors: Fima Kravchik (Holon, IL); Pedro Reviriego (Madrid, ES); Salvatore Pontarelli (Rome, IT); Aviv Kfir (Nili, IL); Amir Roitshtein (Holon, IL); Gil Levy (Hod Hasharon, IL)
Assignee: Mellanox Technologies TLC Ltd.
H04L61/6009H04L45/54H04L45/74H04L45/7453H04L67/2842
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,171,419
App. No.
15/186,477
Granted
Jan 1, 2019
Kind
B2
Abstract

A data packet is received in a network element. The network element has a cache memory in which cache entries represent a portion of addresses stored in a main memory, The destination address and the cache entries each comprise a binary number. A first determination is made that a number M of the most significant bits of a cache entry and the destination address are identical. A second determination is made that an additional number M+L of the most significant bits of a cache entry and the destination address are identical. Routing information is then retrieved the cache memory, and the packet processed according to the routing information.

Claims (63)

1. A method, comprising the steps of:

maintaining a routing table of destination addresses in a main memory, the destination addresses comprising binary numbers having respective prefixes of most significant bits;

receiving via a data network a packet having a packet destination address;

providing a cache memory having exactly one table of cache entries stored therein, the cache entries comprising respective cached destination addresses and respective delta values (L),

assigning a global mask size (M), wherein the global mask size specifies a number of most significant bits needed for first comparisons between the packet destination address and the cached destination addresses, and the delta value specifies a number of additional most significant bits needed for second comparisons between the packet destination address and the cached destination address;

deriving the delta values by determining a maximum prefix length of the prefixes of the destination addresses in the routing table that are compatible with the respective cached destination addresses;

in a first search of the table of cache entries making a determination that in one of the first comparisons M most significant bits of the cached destination address of a first cache entry and the packet destination address are identical;

computing a sum of the global mask size and the delta value of the first cache entry to yield a new number (M+L);

performing the second comparisons in a second search of the table of cache entries; and

when in one of the second comparisons the new number (M+L) of most significant bits of the cached destination address of a second cache entry and the packet destination address are identical, performing the steps of:

retrieving routing information from the cache memory; and

processing the packet according to the routing information.

2. The method according to claim 1 , further comprising:

upon a failure to determine that in one of the second comparisons the new number (M+L) of most significant bits of the cached destination address and the packet destination address are identical adding a new entry to the table of cache entries, the new entry comprising the new number (M+L) of most significant bits of the packet destination address.

3. The method according to claim 1 , wherein deriving the delta values comprises subtracting the global mask size from the maximum prefix length of the prefixes of the destination addresses in the routing table that are compatible with the respective cached destination addresses.

4. The method according to claim 3 , wherein the maximum prefix length is determined when populating the table with a new entry.

5. The method according to claim 1 , wherein the cache entries are represented in the cache memory as a hash table and the steps of performing the first search and the second search comprise hash lookups to the hash table.

6. The method according to claim 5 , wherein the cache entries are represented in the cache memory as a multi-way hash table.

7. The method according to claim 1 , further comprising iteratively adjusting the global mask size while new packets are received.

8. The method according to claim 7 , wherein assigning a global mask size is performed by:

at different test values of the global mask size determining a number of cache entries required to cover an address space; and

assigning the global mask size to one of the different test values that corresponds to a lowest number of the determined cache entries.

9. The method according to claim 7 , wherein assigning a global mask size is performed by:

at different test values of the global mask size determining a number of cache entries required to cover an address space; and

assigning the global mask size to one of the different test values that corresponds to a largest coverage of the address space when selecting a number of entries equal to a cache size.

10. The method according to claim 7 , wherein adjusting the global mask size is performed by:

assigning the global mask size to a test value during a predefined time interval;

measuring a hit rate in the cache memory at the test value;

iterating the steps of assigning a global mask size and measuring a hit rate at different test values; and

reassigning the global mask size to one of the different test values that corresponds to a highest hit rate.

11. An apparatus, comprising:

a network element connected to a data network;

a processor in the network element;

a main memory;

maintaining a routing table of destination addresses in the main memory;

a cache memory accessible to the processor, having exactly one table of cache entries stored therein, the cache entries comprising respective cached destination addresses and respective delta values (L), the destination addresses of the routing table and the cache entries comprising binary numbers having respective prefixes of most significant bits,

wherein the network element is configured for:

receiving via the data network a packet having a packet destination address;

assigning a global mask size (M), wherein the global mask size specifies a number of most significant bits needed for first comparisons between the packet destination address and the cached destination addresses, and the delta value specifies a number of additional most significant bits needed for second comparisons between the packet destination address and the cached destination address;

deriving the delta values by determining a maximum prefix length of the prefixes of the destination addresses in the routing table that are compatible with the respective cached destination addresses;

in a first search of the table of cache entries making a determination that in one of the first comparisons M most significant bits of the cached destination address of a first cache entry and the packet destination address are identical;

computing a sum of the global mask size and the delta value of the first cache entry to yield a new number (M+L);

performing the second comparisons in a second search of the table of cache entries; and

when in one of the second comparisons the new number (M+L) of most significant bits of the cached destination address in a second cache entry and the packet destination address are identical, performing the steps of:

retrieving routing information from the cache memory; and

processing the packet according to the routing information.

12. The apparatus according to claim 11 , further comprising:

upon a failure to determine that in one of the second comparisons the new number (M+L) of most significant bits of the cached destination address and the packet destination address are identical adding a new entry to the table of cache entries, the new entry comprising the new number (M+L) of most significant bits of the packet destination address.

13. The apparatus according to claim 11 , wherein deriving the delta values comprises subtracting the global mask size from the maximum prefix length of the prefixes of the destination addresses in the routing table that are compatible with the respective cached destination addresses.

14. The apparatus according to claim 13 , wherein the maximum prefix length is determined when populating the table with a new entry.

15. The apparatus according to claim 11 , wherein the cache entries are represented in the cache memory as a hash table and the steps performing the first search and the second search comprise hash lookups to the hash table.

16. The apparatus according to claim 11 , wherein the processor is operative for iteratively adjusting the global mask size while new packets are received.

17. The apparatus according to claim 16 , wherein the processor is operative for assigning a global mask size by:

at different test values of the global mask size determining a number of cache entries required to cover an address space; and

assigning the global mask size to one of the different test values that corresponds to a lowest number of the determined cache entries.

18. The apparatus according to claim 16 , wherein the processor is operative for assigning a global mask size by:

at different test values of the global mask size determining a number of cache entries required to cover an address space; and

assigning the global mask size to one of the different test values that corresponds to a largest coverage of the address space when selecting a number of entries equal to a cache size.

19. The apparatus according to claim 16 , wherein the processor is operative for adjusting the global mask size by:

assigning the global mask size to a test value during a predefined time interval;

measuring a hit rate in the cache memory at the test value;

iterating the steps of assigning a global mask size and measuring a hit rate at different test values; and

reassigning the global mask size to one of the different test values that corresponds to a highest hit rate.

Assignments (4)
MERGER Recorded Dec 15, 2021
From: MELLANOX TECHNOLOGIES TLV LTD.
To: MELLANOX TECHNOLOGIES, LTD.
Reel/Frame 058517/0564 →
RELEASE OF SECURITY INTEREST IN PATENT COLLATERAL AT REEL/FRAME NO. 42962/0859 Recorded Jul 13, 2018
From: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
To: MELLANOX TECHNOLOGIES, LTD.; MELLANOX TECHNOLOGIES TLV LTD.; MELLANOX TECHNOLOGIES SILICON PHOTONICS INC.
Reel/Frame 046551/0459 →
SECURITY INTEREST Recorded Jun 23, 2017
From: MELLANOX TECHNOLOGIES, LTD.; MELLANOX TECHNOLOGIES TLV LTD.; MELLANOX TECHNOLOGIES SILICON PHOTONICS INC.
To: JPMORGAN CHASE BANK, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 042962/0859 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2016
From: KRAVCHIK, FIMA; REVIRIEGO, PEDRO; PONTARELLI, SALVATORE; KFIR, AVIV; ROITSHTEIN, AMIR; LEVY, GIL
To: MELLANOX TECHNOLOGIES TLV LTD.
Reel/Frame 038949/0530 →
Continuity (1)
Related Publication 20170366502A1 · Dec 21, 2017