IP Library Granted Patent US 9,680,748
Granted Patent B2
US 9,680,748 · App. 14/487,056 · Granted Jun 13, 2017

Tracking prefixes of values associated with different rules to generate flows

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 9,680,748
App. No.
14/487,056
Granted
Jun 13, 2017
Kind
B2
Abstract

Some embodiments provide a method for a forwarding element that forwards packets. The method receives a packet and consults a tree structure to identity a prefix length associated with an IP address in the packet header. The method skips lookup of each subtable with a set of IP addresses that have a different prefix length than the identified prefix length. The method identifies a matching rule from a particular subtable. The method generates a flow based on the matching rule. The flow is used to process packets that have the same prefix.

Claims (38)

1. A method for a forwarding element that forwards packets, the method comprising:

receiving a packet;

identifying a prefix length associated with an IP address in a header of the packet by traversing a tree structure to count a number of bits of the packet header IP address that match a set of values in the tree structure, the tree structure comprising sets of values for comparing to one or more bits of the packet header, each set of values corresponding to an IP address in a rule for matching against the packet header IP address;

identifying a matching rule corresponding to the packet header IP address by looking up a first set of subtables comprising rules matching IP addresses with up to the identified prefix length, wherein lookups of a second set of subtables comprising rules matching IP addresses longer than the identified prefix length are skipped; and

generating a flow entry based on the matching rule, wherein the flow entry is used to process packets that have a prefix length up to the identified prefix length.

2. The method of claim 1 , wherein identifying the matching rule comprises:

determining that a particular subtable includes at least one rule with a set of IP addresses that have a prefix length up to the identified prefix length; and

performing a lookup of the particular subtable to find the matching rule.

3. The method of claim 1 , wherein each IP address is one of an IPv4 address and an IPv6 address.

4. The method of claim 1 , wherein the tree structure is a binary tree.

5. The method of claim 4 , wherein the binary tree is a compressed binary tree.

6. The method of claim 1 further comprising maintaining a count of each node of the tree structure that is associated with at least one rule.

7. The method of claim 1 , wherein the tree structure is further traversed to identify a number of bits that is to be un-wildcarded in a wildcard mask.

8. The method of claim 7 , wherein the generated flow is a megaflow that is used to process other packets that match each un-wildcarded bit of the wildcard mask.

9. A computing device comprising:

at least one processing unit; and

a storage, which stores a program that when executed by the at least one processing unit implements a forwarding element, the program comprising sets of instructions for:

receiving a packet;

identifying a prefix length associated with an IP address in a header of the packet by traversing a tree structure to count a number of bits of the packet header IP address that match a set of values in the tree structure, the tree structure comprising sets of values for comparing to one or more bits of the packet header, each set of values corresponding to an IP address in a rule for matching against the packet header IP address;

identifying a matching rule corresponding to the packet header IP address by looking up a first set of subtables comprising rules matching IP addresses with up to the identified prefix length, wherein lookups of a second set of subtables comprising rules matching IP addresses longer than the identified prefix length are skipped; and

generating a flow entry based on the matching rule, wherein the flow entry is used to process packets that have a prefix length up to the identified prefix length.

10. The computing device of claim 9 , wherein each IP address is one of an IPv4 address and an IPv6 address.

11. The computing device of claim 9 , wherein the tree structure is a binary tree.

12. The computing device of claim 11 , wherein the binary tree is a compressed binary tree.

13. A non-transitory machine readable medium storing a program that when executed by at least one processing unit forwards packets, the program comprising sets of instructions for:

receiving a packet;

identifying a prefix length associated with an IP address in a header of the packet by traversing a tree structure to count a number of bits of the packet header IP address that match a set of values in the tree structure, the tree structure comprising sets of values for comparing to one or more bits of the packet header, each set of values corresponding to an IP address in a rule for matching against the packet header IP address;

identifying a matching rule corresponding to the packet header IP address by looking up a first set of subtables comprising rules matching IP addresses with up to the identified prefix length, wherein lookups of a second set of subtables comprising rules matching IP addresses longer than the identified prefix length are skipped; and

generating a flow entry based on the matching rule, wherein the flow entry is used to process packets that have a prefix length up to the identified prefix length.

14. The non-transitory machine readable medium of claim 13 , wherein the set of instructions for identifying the matching rule comprises sets of instructions for:

determining that a particular subtable includes at least one rule with a set of IP addresses that have a prefix length up to the identified prefix length; and

performing a lookup of the particular subtable to find the matching rule.

15. The non-transitory machine readable medium of claim 13 , wherein each IP address is one of an IPv4 address and an IPv6 address.

16. The non-transitory machine readable medium of claim 13 , wherein the tree structure is a binary tree.

17. The non-transitory machine readable medium of claim 16 , wherein the binary tree is a compressed binary tree.

18. The non-transitory machine readable medium of claim 13 , wherein the program further comprises a set of instructions for maintaining a count of each node that is associated with at least one rule.

19. The non-transitory machine readable medium of claim 13 , the program further comprising a set of instructions for traversing the tree structure to identify a number of bits that is to be un-wildcarded in a wildcard mask.

20. The non-transitory machine readable medium of claim 19 , wherein the generated flow is a megaflow that is used to process other packets that match each un-wildcarded bit of the wildcard mask.

Assignments (2)
MERGER Recorded Jan 27, 2025
From: NICIRA, INC.
To: VMWARE LLC
Reel/Frame 070187/0487 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 25, 2014
From: JACKSON, ETHAN J.; RAJAHALME, JARNO
To: NICIRA, INC.
Reel/Frame 034266/0066 →