Matching port pick for RSS disaggregation hashing
First Claim
1. A method for managing communications, the method comprising:
- receiving, at a Processing Unit (PU) within a plurality of PUs, a first network packet from a network interface controller (NIC) card that is configured to perform a Receive Side Scaling (RSS) hash to select the PU;
generating a first flow key based on data within the first network packet;
selecting an initial source port number;
generating a second flow key using the initial source port number and source network address information internal to the PU;
performing a first RSS hash on at least a portion of the first flow key, and a second RSS hash on at least a portion of the second flow key;
determining a delta error between the first RSS hash and the second RSS hash;
when the delta error is determined to be non-zero, performing actions including;
using the delta error as an index to a swizzle table to identify a local port correction value that is based on an initialization vector, wherein the swizzle table is populated with local port correction values that are valid for initialization vectors employed for selecting initial source port numbers;
performing an exclusive-or on the initial source port number and the local port correction value to generate a modified source port number; and
generating network packets using the source network address information internal to the PU and the modified source port number, to ensure that a second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet, wherein the modified source port number is employed to generate headers for the network packets; and
when the delta error is determined to be zero, generating network packets using the source network address information internal to the PU and the initial source port number to ensure that the second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments are directed towards selecting a local port number for server side connections that hash to a same processor as a matching client side flow on a multiprocessor device using Receive Side Scaling (RSS) for the disaggregation hash. A hash of a flow key is computed with an initial port number. An exclusive-or (XOR) distance is computed to a desired hash, using least significant bits. An XOR is performed on a corrected pre-computed collision value, to transform the source port number to a value that hashes correctly with other elements within the flow key. The transformed source port number may then be inserted into network packets sent to a server device, such that the transformed source port number can be used in a returning RSS hash to again select the same processor.
22 Citations
19 Claims
-
1. A method for managing communications, the method comprising:
-
receiving, at a Processing Unit (PU) within a plurality of PUs, a first network packet from a network interface controller (NIC) card that is configured to perform a Receive Side Scaling (RSS) hash to select the PU; generating a first flow key based on data within the first network packet; selecting an initial source port number; generating a second flow key using the initial source port number and source network address information internal to the PU; performing a first RSS hash on at least a portion of the first flow key, and a second RSS hash on at least a portion of the second flow key; determining a delta error between the first RSS hash and the second RSS hash; when the delta error is determined to be non-zero, performing actions including; using the delta error as an index to a swizzle table to identify a local port correction value that is based on an initialization vector, wherein the swizzle table is populated with local port correction values that are valid for initialization vectors employed for selecting initial source port numbers; performing an exclusive-or on the initial source port number and the local port correction value to generate a modified source port number; and generating network packets using the source network address information internal to the PU and the modified source port number, to ensure that a second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet, wherein the modified source port number is employed to generate headers for the network packets; and when the delta error is determined to be zero, generating network packets using the source network address information internal to the PU and the initial source port number to ensure that the second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A network device, comprising:
-
at least one network interface controller (NIC) card configured to perform a Receive Side Scaling (RSS) hash to select a destination processor unit (PU) within the network device for network packets; and a plurality of processor units (PUs), each PU having at least one processor that is configured to perform actions, including; receiving a first network packet through the at least one NIC card; generating a first flow key based on data within the first network packet; selecting an initial source port number; generating a second flow key using the initial source port number and source network address information internal to the PU; performing a first RSS hash on at least a portion of the first flow key, and a second RSS hash on at least a portion of the second flow key; determining a delta error between the first RSS hash and the second RSS hash; when the delta error is determined to be non-zero, performing actions including; using the delta error as an index to a swizzle table to identify a local port correction value that is based on an initialization vector, wherein the swizzle table is populated with local port correction values that are valid for initialization vectors employed for selecting initial source port numbers; performing an exclusive-or on the initial source port number and the local port correction value to generate a modified source port number; and generating network packets using the source network address information internal to the PU and the modified source port number, to ensure that a second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet, wherein the modified source port number is employed to generate headers for the network packets; and when the delta error is determined to be zero, generating network packets using the source network address information internal to the PU and the initial source port number to ensure that the second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A non-transitory computer readable storage device, having computer-executable instructions stored thereon, that in response to execution by a processor unit (PU) within a plurality of PUs with a network device, cause the PU to perform operations, comprising:
-
receiving, at the Processing Unit (PU) within the plurality of PUs, a first network packet through from a network interface controller (NIC) card that is configured to perform a Receive Side Scaling (RSS) hash to select the PU; generating a first flow key based on data within the first network packet; selecting an initial source port number; generating a second flow key using the initial source port number and source network address information internal to the PU; performing a first RSS hash on at least a portion of the first flow key, and a second RSS hash on at least a portion of the second flow key; determining a delta error between the first RSS hash and the second RSS hash; when the delta error is determined to be non-zero, performing actions including; using the delta error as an index to a swizzle table to identify a local port correction value that is based on an initialization vector, wherein the swizzle table is populated with local port correction values that are valid for initialization vectors employed for selecting initial source port numbers; performing an exclusive-or on the initial source port number and the local port correction value to generate a modified source port number; and generating network packets using the source network address information internal to the PU and the modified source port number, to ensure that a second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet, wherein the modified source port number is employed to generate headers for the network packets; and when the delta error is determined to be zero, generating network packets using the source network address information internal to the PU and the initial source port number to ensure that the second network packet returning to the network device is hashed using the RSS in the NIC to select the same PU as having received the first network packet. - View Dependent Claims (15, 16, 17, 18, 19)
-
Specification