CN-122001808-A - Resource management in a network interface controller with hardware link aggregation
Abstract
The present disclosure relates to resource management in a network interface controller with hardware link aggregation. An example network interface controller, NIC, includes a first resource configured to supply a first traffic, a second resource configured to supply a second traffic, a load balancer coupled to the first resource and the second resource configured to balance the first traffic and the second traffic between a first port circuit and a second port circuit of a link aggregation group, LAG, using a hash function, and remote direct memory access, RDMA, logic configured to divide a work request into a first set of work requests for a first data packet hashed to the first port circuit and a second set of work requests for a second data packet hashed to the second port circuit using the hash function, the RDMA logic configured to supply the first set of work requests to the first resource and the second set of work requests to the second resource.
Inventors
- J.W.Huang
- S. Mupavalap
Assignees
- 安华高科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251031
- Priority Date
- 20241101
Claims (20)
- 1. A network interface controller NIC, comprising: a first resource configured to provision a first service; A second resource configured to provision a second service; a load balancer coupled to the first resource and the second resource, the load balancer configured to balance the first traffic and the second traffic between a first port circuit and a second port circuit of a link aggregation group LAG using a hash function, and Remote direct memory access, RDMA, logic configured to divide work requests into a first set of work requests for a first data packet hashed to the first port circuit and a second set of work requests for a second data packet hashed to the second port circuit using the hash function, the RDMA logic configured to supply the first set of work requests to the first resource and the second set of work requests to the second resource.
- 2. The NIC of claim 1, further comprising: A bus interface having a first physical function and a second physical function; wherein in response to a first RDMA job received via the first physical function, the RDMA logic is configured to add a portion of the first set of job requests for a portion of the first data packet to a first group and to add a portion of the second set of job requests for a portion of the second data packet to a second group; Wherein in response to a second RDMA operation received via the second physical function, the RDMA logic is configured to add another portion of the first set of operation requests to another portion of the first data packet to a third group, and to add another portion of the second set of operation requests to another portion of the second data packet to a fourth group.
- 3. The NIC of claim 2, wherein the first group and the third group are configured to be input to the first resource, and wherein the second group and the fourth group are configured to be input to the second resource.
- 4. The NIC of claim 1, wherein a first resource comprises a first queue configured to receive the first set of work requests and a first buffer configured to assemble the first data packet based on the first set of work requests, and wherein the second resource comprises a second queue configured to receive the second set of work requests and a second buffer configured to assemble the second data packet based on the second set of work requests.
- 5. The NIC of claim 1, wherein the RDMA logic includes a hash operator configured to divide the work request using the hash function.
- 6. The NIC of claim 5, wherein the hash operator comprises firmware executed by a central processing unit CPU.
- 7. The NIC of claim 5, wherein the hash operator is configured to obtain a table from the load balancer and divide the work requests into the first set of work requests for the first data packet hashed to the first port and the second set of work requests for the second data packet hashed to the second port using a result of the hash function applied to the table.
- 8. A method of managing resources in a network interface controller, NIC, in a computer, the method comprising: supplying a first service from a first resource of the NIC; supplying a second service from a second resource of the NIC; balancing the first traffic and the second traffic between a first port circuit and a second port circuit of a link aggregation group LAG using a hash function; Dividing, at remote direct memory access, RDMA, logic of the NIC, work requests into a first set of work requests for a first data packet hashed to the first port circuit and a second set of work requests for a second data packet hashed to the second port circuit using the hash function; Supplying the first set of work requests to the first resource, and The second set of work requests is supplied to the second resource.
- 9. The method as recited in claim 8, further comprising: Receive a first RDMA job via a first physical function of the NIC; Adding a portion of the first set of work requests to a first group and a portion of the second set of work requests to a second group to a portion of the first data packet; receiving a second RDMA operation via a second physical function of the NIC, and Another portion of the first set of work requests for another portion of the first data packet is added to a third group and another portion of the second set of work requests for another portion of the second data packet is added to a fourth group.
- 10. The method as recited in claim 9, further comprising: inputting the first group and the third group to the first resource, and The second group and the fourth group are input to the second resource.
- 11. The method of claim 8, wherein a first resource comprises a first queue configured to receive the first set of work requests and a first buffer configured to assemble the first data packet based on the first set of work requests, and wherein the second resource comprises a second queue configured to receive the second set of work requests and a second buffer configured to assemble the second data packet based on the second set of work requests.
- 12. The method of claim 8, wherein the RDMA logic includes a hash operator configured to divide the work request using the hash function.
- 13. The method of claim 12, wherein the hash operator comprises firmware executed by a central processing unit, CPU.
- 14. The method of claim 12, wherein the hash operator is configured to obtain a table from the load balancer and divide the work requests into the first set of work requests for the first data packet hashed to the first port and the second set of work requests for the second data packet hashed to the second port using a result of the hash function applied to the table.
- 15. A computer, comprising: a hardware platform comprising a central processing unit CPU, a memory and a network interface controller NIC, and Software executing on the hardware platform; Wherein the NIC comprises: a first resource configured to provision a first service; A second resource configured to provision a second service; a load balancer coupled to the first resource and the second resource, the load balancer configured to balance the first traffic and the second traffic between a first port circuit and a second port circuit of a link aggregation group LAG using a hash function, and Remote direct memory access, RDMA, logic configured to divide a work request from the software into a first set of work requests for a first data packet hashed to the first port circuit and a second set of work requests for a second data packet hashed to the second port circuit using the hash function, the RDMA logic configured to supply the first set of work requests to the first resource and the second set of work requests to the second resource.
- 16. The computer of claim 15, further comprising: a bus configured to couple the NIC to the CPU and the memory; Wherein the NIC further includes a bus interface coupled to the bus, the bus interface having a first physical function and a second physical function; wherein in response to a first RDMA operation received via the first physical function, the RDMA logic is configured to add a portion of the first set of operation requests for a portion of the first data packet to a first group and add a portion of the second set of operation requests for a portion of the second data packet to a second group, and Wherein in response to a second RDMA operation received via the second physical function, the RDMA logic is configured to add another portion of the first set of operation requests to another portion of the first data packet to a third group, and to add another portion of the second set of operation requests to another portion of the second data packet to a fourth group.
- 17. The computer of claim 16, wherein the first group and the third group are configured to be input to the first resource, and wherein the second group and the fourth group are configured to be input to the second resource.
- 18. The computer of claim 15, wherein a first resource comprises a first queue configured to receive the first set of work requests and a first buffer configured to assemble the first data packet based on the first set of work requests, and wherein the second resource comprises a second queue configured to receive the second set of work requests and a second buffer configured to assemble the second data packet based on the second set of work requests.
- 19. The computer of claim 15, wherein the RDMA logic includes a hash operator configured to divide the work request using the hash function.
- 20. The computer of claim 19, wherein the hash operator comprises firmware executed by another central processing unit, CPU, of the NIC.
Description
Resource management in a network interface controller with hardware link aggregation Technical Field The present disclosure relates to resource management in a network interface controller with hardware link aggregation. Background A Network Interface Controller (NIC) may be a hardware component in a computer that connects the computer to a computer network. The computer may be an electronic device for storing and processing data. A computer network (hereinafter referred to as a network) may be a system of connected computers. The NIC may include port circuitry that couples the NIC to a transmission medium of the network. Port circuitry (hereinafter port) may be circuitry that provides a point of data entry (e.g., data input), data exit (e.g., data output), or both. For example, a port of a NIC may include physical layer circuitry (PHY) as well as other circuitry (examples discussed below). The PHY may be a circuit, such as a transceiver, that implements physical layer functions, such as layer 1 of the Open Systems Interconnection (OSI) model. Some NICs may contain multiple ports. A NIC with multiple ports may contain multiple connections to the network (where a connection may be referred to as a link). Link aggregation may be a combination of multiple links (referred to as aggregation). A Link Aggregation Group (LAG) may be a logical entity that represents an aggregation of multiple links. The NIC may group its ports to provide one end of the LAG. A network device connected to the NIC may group some of its ports to provide the other end of the LAG. Other terms known in the art for describing the concept of link aggregation include relay (trunking), bundling, binding, channeling (channeling), and grouping (teaming). For clarity by way of example, the description herein will use the term link aggregation. Link aggregation may increase overall throughput relative to the use of a single link and may provide redundancy without losing network connectivity even if all but one link fails. The NIC may include LAG-supporting hardware (hereinafter LAG hardware). LAG hardware may balance traffic transmissions among the ports of the LAG. The NIC may include a set of transmission resources for each port. The type of transmission resource is discussed further below. At least a portion of the transmission resources may be a pipeline. A pipeline may be a set of resources connected in series, with the input of one resource being dependent on the output of another resource. LAG hardware may balance traffic provided by the set of transmission resources among the ports of the LAG. For example, the NIC may include two ports designated a and B and two sets of transmission resources designated 1 and 2 as part of the LAG. LAG hardware may balance traffic supplied by transmission resource group 1 between ports a and B (e.g., packets from transmission resource group 1 may sometimes be transmitted by port a and at other times by port B). LAG hardware may also balance packets supplied by transmission resource group 2 between ports a and B (e.g., packets from transmission resource group 2 may sometimes be transmitted by port a and at other times by port B). The NIC may be coupled to an expansion bus of the computer. Peripheral component interconnect express (PCIe) is a well-known and widely used standard for expansion buses in computers. In a PCIe architecture, a peripheral device may appear as multiple logical devices, where each logical device may be referred to as a function (or PCIe function). Each function may present its own configuration space, resources, and capabilities to software in the computer. For example, a NIC may have separate functions for each port, where each of the functions includes a separate set of transmission resources. Thus, continuing with the example above, the NIC may have a function a for port a, e.g., with transmission resource group 1, and a function B for port B, e.g., with transmission resource group 2. Software in the computer may not know that some ports of the NIC are part of the LAG. Continuing with the example above, the software may provide the sequence of first data packets to the NIC via function a, and then provide the sequence of second data packets for transmission via port a. The NIC may process the first data packet and the second data packet over the set of transmission resources 1 associated with function a. LAG hardware may determine that the second data packet is to be transmitted via port a as desired by the software. However, the LAG hardware may determine that the first data packet is to be transmitted via port B of the LAG that is not known to the software. Therefore, the software cannot arrange in advance which port of the NIC transmits which packets. The NIC may include flow control functionality in which a port may temporarily suspend transmission of data packets to prevent congestion in the network. In the example, port B may suspend transmission of data packets. In this case,