Networks enable computers and other devices to communicate. For example, networks can carry data representing video, audio, e-mail, and so forth. Typically, data sent across a network is divided into smaller messages known as packets. By analogy, a packet is much like an envelope you drop in a mailbox. A packet typically includes “payload” and a “header”. The packet's “payload” is analogous to the letter inside the envelope. The packet's “header” is much like the information written on the envelope itself. The header can include information to help network devices handle the packet appropriately. For example, the header can include an address that identifies the packet's destination.
A series of related packets can form a connection. A connection is often identified by a combination of different portions of a packet known as a tuple. For example, a tuple is commonly formed by a combination of source and destination information of a packet header.
A variety of networking protocols maintain state information for a connection. For example, the Transmission Control Protocol (TCP) stores state data for a connection in a Transmission Control Block (TCB). A TCB includes state data such as the last received byte, the last successfully transmitted byte, and so forth. Typically, connection state data is accessed and, potentially, updated for each packet in a connection. In a multi-processor system, this can create contention issues between processors handling packets for the same connection. That is, for example, different processors handling data for the same connection may each attempt to access a connection's state data at the same time, creating requirements for data locking and introducing delay as the processors wait for access to the connection state data.
In a multi-processor system, processors may vie for access to the same connection state information. Contention between the processors, however, can be reduced by mapping respective connections to the respective processors. For example, a network interface controller (NIC) may perform a hash on a tuple of a received packet and use the hash to determine a processor to handle a given packet. Directing packets having the same tuple to the same processor can help pin down state information to the same processor. This can enable the processor to retain the state data for a connection in local processor memory (e.g., cache memory) and reduce contention between processors trying to access the same connection state data.
Intermediate nodes in a network such as a security gateway, firewall, switch, or router may handle data traveling in both directions of a duplex (i.e., bi-directional) connection. For example,
In the example shown in
A NIC 104a, 104b may use an asymmetric hash that yields a different hash value for a packet in a connection depending on the direction the packet travels (e.g., a hash where hash (Source A, Destination B) does not equal hash (Source B, Destination A)). In this case, the NICs 104a, 104b may map packets belonging to the same connection to different processors 102a-102n due to the different hash values derived for packets traveling different directions in the same connection. This may undermine a goal of reducing contention between processors 102a-102n for connection state data. That is, if packet 110a is mapped to processor 102a and packet 110b is mapped to processor 102n, then processors 102a and 102n may both vie for access to the connection state data for the connection between nodes A and B.
As shown in
The output of circuitry 202a and 202b is then combined. For example, the output of hash circuitry 202a and 202b may undergo a combination operation 204 such as a logical AND and/or XOR. Thus, in this sample implementation, the circuitry 200 can form a symmetric hash from asymmetric hash engines/functions 202a, 202b. This can enable the circuitry 200 to use commonly implemented asymmetric hash engines (e.g., Toeplitz hash engines) to generate a symmetric hash, lowering the design cost of the circuitry 200.
While
Once determined, a symmetric hash value may then be used to determine a processor mapped to a packet's connection. For example, a mask may be applied to the symmetric hash value and may be used as a lookup value into an indirection table that associates the masked hash values to processor numbers. The resulting processor number from the indirection table may be adjusted, for example, by incrementing by a base core/processor number. After a processor is determined for a packet, the packet may be queued, for example, in a processor specific queue. An interrupt may then be generated to the processor. Potentially, interrupt moderation may be used to reduce the number of interrupts signaled.
While
A NIC, such as NIC 300, can be configured to operate in either symmetric or asymmetric hash mode. For example, a NIC may be configured to use a particular hash function (e.g., Toeplitz) and/or whether to generate a symmetric or asymmetric hash. For instance, this configuration may be performed via a network driver executed by a processor. For example, the network driver may specify an object identifier with the desired configuration values/selection of asymmetric or symmetric hash.
While
The term packet as used herein encompasses protocol data units (PDUs) for a wide variety of network protocols featuring a header and payload. A packet may be an encapsulated or encapsulating packet. Further, a given tuple may feature data from zero or more encapsulated packet headers and may or may not feature data from an encapsulating packet header. The techniques described above may be implemented in a variety of software and/or hardware architectures. The term circuitry as used herein includes hardwired circuitry, digital circuitry, analog circuitry, programmable circuitry, and so forth. The programmable circuitry may operate on computer programs.
Other embodiments are within the scope of the following claims.
Number | Name | Date | Kind |
---|---|---|---|
6389468 | Muller et al. | May 2002 | B1 |
6453360 | Muller et al. | Sep 2002 | B1 |
6483804 | Muller et al. | Nov 2002 | B1 |
6484209 | Momirov | Nov 2002 | B1 |
6650640 | Muller et al. | Nov 2003 | B1 |
6683873 | Kwok et al. | Jan 2004 | B1 |
6973040 | Ricciulli | Dec 2005 | B1 |
7043494 | Joshi et al. | May 2006 | B1 |
7162740 | Eastlake, III | Jan 2007 | B2 |
7219228 | Lin | May 2007 | B2 |
7529242 | Lyle | May 2009 | B1 |
7620046 | Ronciak et al. | Nov 2009 | B2 |
7669234 | Buer | Feb 2010 | B2 |
20020144004 | Gaur et al. | Oct 2002 | A1 |
20030043810 | Boduch et al. | Mar 2003 | A1 |
20030043825 | Magnussen et al. | Mar 2003 | A1 |
20030226032 | Robert | Dec 2003 | A1 |
20040030757 | Pandya | Feb 2004 | A1 |
20050091412 | Pinkerton et al. | Apr 2005 | A1 |
20050182841 | Sharp | Aug 2005 | A1 |
20060034310 | Connor | Feb 2006 | A1 |
20060083227 | Eldar | Apr 2006 | A1 |
20060085554 | Shah et al. | Apr 2006 | A1 |
20060285494 | Li et al. | Dec 2006 | A1 |
20070127581 | Connor et al. | Jun 2007 | A1 |
20070234310 | Zhang et al. | Oct 2007 | A1 |
20080077792 | Mann | Mar 2008 | A1 |
20090007150 | Li et al. | Jan 2009 | A1 |
20100091774 | Ronciak et al. | Apr 2010 | A1 |
Number | Date | Country |
---|---|---|
1367799 | Dec 2003 | EP |
Number | Date | Country | |
---|---|---|---|
20090323692 A1 | Dec 2009 | US |