Hashing algorithm for network receive filtering
First Claim
1. A network interface device for processing data packets received from a network, for use with a computing device, comprising:
- a memory having stored therein a filter table having a plurality of filter entries, each filter entry including respective comparison criteria and identifying a respective queue in the computing device to which matching incoming data packets are to be delivered;
storage containing a value indicating a first search limit;
logic which, in response to receipt by the network interface device of a first incoming data packet;
calculates a first hash key in dependence upon content of the data packet, the first hash key identifying a first hash bucket in the filter table;
performs a first iterative search of entries in the filter table for a matching entry whose comparison criteria are satisfied by content of the data packet received from the network, the first search beginning in the first hash bucket, proceeding according to a predetermined search algorithm, and terminating in response to identification of a matching entry or reaching of the first search limit, whichever occurs earlier, the first search limit being different than the total number of filter entries that can be reached beginning in the first hash bucket and proceeding using the predetermined search algorithm; and
if a matching entry was identified by the first iterative search before the first search limit was reached, forwards the packet to the receive queue in the computing device that is indicated by the matching entry.
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.
177 Citations
8 Claims
-
1. A network interface device for processing data packets received from a network, for use with a computing device, comprising:
-
a memory having stored therein a filter table having a plurality of filter entries, each filter entry including respective comparison criteria and identifying a respective queue in the computing device to which matching incoming data packets are to be delivered; storage containing a value indicating a first search limit; logic which, in response to receipt by the network interface device of a first incoming data packet; calculates a first hash key in dependence upon content of the data packet, the first hash key identifying a first hash bucket in the filter table; performs a first iterative search of entries in the filter table for a matching entry whose comparison criteria are satisfied by content of the data packet received from the network, the first search beginning in the first hash bucket, proceeding according to a predetermined search algorithm, and terminating in response to identification of a matching entry or reaching of the first search limit, whichever occurs earlier, the first search limit being different than the total number of filter entries that can be reached beginning in the first hash bucket and proceeding using the predetermined search algorithm; and if a matching entry was identified by the first iterative search before the first search limit was reached, forwards the packet to the receive queue in the computing device that is indicated by the matching entry. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
Specification