Hashing algorithm for network receive filtering
First Claim
1. A method for processing data packets received from a network, comprising the steps of:
- receiving from a computing device an indication of a first maximum extent-of-search and an indication of a second maximum extent-of-search;
iteratively searching a filter table a first time for a matching entry having first comparison criteria that are satisfied by the content of a first incoming data packet received from the network; and
where a matching entry is identified in the step of searching a first time, after no more than a number of iterations indicated by the first maximum extent-of-search, delivering the packet to a receive queue in the computing device that is indicated by the matching entry,iteratively searching the filter table a second time for an entry having comparison criteria that are satisfied by the content of a second incoming data packet received from the network;
where a second matching entry is identified in the step of searching a second time, after no more than a number of iterations indicated by the second maximum extent-of-search, delivering the packet to a receive queue in the computing device that is indicated by the second matching entry;
iteratively searching the filter table for a matching entry having comparison criteria that are satisfied by the content of a third incoming data packet received from the network;
where no matching entry is identified in the step of searching a third time, after the number of iterations indicated by the first maximum extent-of-search, delivering the packet to a default receive queue in the host;
iteratively searching the filter table a fourth time for a matching entry having comparison criteria that are satisfied by the content of a fourth incoming data packet received from the network; and
where no matching entry is identified in the step of searching a fourth time, after the number of iterations indicated by the second maximum extent-of-search, delivering the packet to a default receive queue in the host.
11 Assignments
0 Petitions
Accused Products
Abstract
Roughly described, a network interface device is assigned a maximum extent-of-search. A hash function is applied to the header information of each incoming packet, to generate a hash code for the packet. The hash code designates a particular subset of the table within which the particular header information should be found, and an iterative search is made within that subset. If the search locates a matching entry before the search limit is exceeded, then the incoming data packet is delivered to the receive queue identified in the matching entry. But if the search reaches the search limit before a matching entry is located, then device delivers the packet to a default queue, such as a kernel queue, in the host computer system. The kernel is then responsible for delivering the packet to the correct endpoint.
38 Citations
49 Claims
-
1. A method for processing data packets received from a network, comprising the steps of:
-
receiving from a computing device an indication of a first maximum extent-of-search and an indication of a second maximum extent-of-search; iteratively searching a filter table a first time for a matching entry having first comparison criteria that are satisfied by the content of a first incoming data packet received from the network; and where a matching entry is identified in the step of searching a first time, after no more than a number of iterations indicated by the first maximum extent-of-search, delivering the packet to a receive queue in the computing device that is indicated by the matching entry, iteratively searching the filter table a second time for an entry having comparison criteria that are satisfied by the content of a second incoming data packet received from the network; where a second matching entry is identified in the step of searching a second time, after no more than a number of iterations indicated by the second maximum extent-of-search, delivering the packet to a receive queue in the computing device that is indicated by the second matching entry; iteratively searching the filter table for a matching entry having comparison criteria that are satisfied by the content of a third incoming data packet received from the network; where no matching entry is identified in the step of searching a third time, after the number of iterations indicated by the first maximum extent-of-search, delivering the packet to a default receive queue in the host; iteratively searching the filter table a fourth time for a matching entry having comparison criteria that are satisfied by the content of a fourth incoming data packet received from the network; and where no matching entry is identified in the step of searching a fourth time, after the number of iterations indicated by the second maximum extent-of-search, delivering the packet to a default receive queue in the host. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. A method for controlling a network interface device, for use with a host computing device having a plurality of network data receive queues, comprising the steps of:
-
programming a receive filter table in a memory accessible to the network interface device, each entry in the receive filter table identifying a receive queue to which incoming packets are to be delivered if their content satisfies criteria indicated by the entry, wherein a first entry in the receive filter table contains an indication of a first receive queue and an indication of first criteria for testing against incoming packets and a second entry in the receive filter table contains an indication of a second receive queue and an indication of second criteria for testing against incoming packets; programming a memory in the network interface device with a first maximum extent-of-search which indicates a first maximum number of search iterations that the network interface device should perform while searching for an entry having a first set of comparison fields that all match corresponding fields in the header of a first incoming data packet received from the network and programming the network interface device with a second maximum extent-of-search which indicates a second maximum number of search iterations that the network interface device should perform while searching for an entry having a second set of comparison fields that all match corresponding fields in the header of a second incoming data packet received from the network, the network interface device iteratively searching a filter table a first time for a matching entry having first comparison criteria that are satisfied by the content of a first incoming data packet received from the network; where a matching entry is identified in the step of searching a first time, after no more than a number of iterations indicated by the first maximum extent-of-search, the network interface device delivering the packet to a receive queue in the computing device that is indicated by the matching entry; the network interface device iteratively searching the filter table a second time for an entry having comparison criteria that are satisfied by the content of a second incoming data packet received from the network; where a second matching entry is identified in the step of searching a second time, after no more than a number of iterations indicated by the second maximum extent-of-search, the network interface device delivering the packet to a receive queue in the computing device that is indicated by the second matching entry; the network interface device iteratively searching the filter table for a matching entry having comparison criteria that are satisfied by the content of a third incoming data packet received from the network; where no matching entry is identified in the step of searching a third time, after the number of iterations indicated by the first maximum extent-of-search, the network interface device delivering the packet to a default receive queue in the host; the network interface device iteratively searching the filter table a fourth time for a matching entry having comparison criteria that are satisfied by the content of a fourth incoming data packet received from the network; and where no matching entry is identified in the step of searching a fourth time, after the number of iterations indicated by the second maximum extent-of-search, the network interface device delivering the packet to a default receive queue in the host. - View Dependent Claims (33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46)
-
-
47. A method for processing data packets received from a network by a network interface device, for use with a plurality of processors each having a respective kernel receive queue, comprising the steps of:
-
the network interface device iteratively searching a filter table for a matching entry having first comparison criteria that are satisfied by the content of a first incoming data packet received from the network; and where no matching entry is identified in the step of searching after no more than a number of iterations indicated by a first maximum extent-of-search, selecting a first kernel receive queue of a first one of the processors in dependence upon the content of the first incoming data packet; and delivering the first data packet to the selected first kernel receive queue;
further comprising the steps of;iteratively searching the filter table a second time for an entry having comparison criteria that are satisfied by the content of a second incoming data packet received from the network; and where no matching entry is identified in the step of searching a second time, after no more than a number of iterations indicated by a second maximum extent-of-search, selecting a second kernel receive queue of a second one of the processors in dependence upon the content of the second incoming data packet and delivering the second data packet to the selected second kernel receive queue. - View Dependent Claims (48, 49)
-
Specification