System and method for facilitating management of dynamically triggered operations in a network interface controller

By managing trigger operations in the command queue outside the NIC, commands are issued only when conditions are met, avoiding local buffering, solving the problem of inefficiency in NIC processing a large number of trigger operations, and achieving efficient command management and performance improvement.

CN115686879BActive Publication Date: 2024-09-24HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111267935.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-07-28
Filing Date
2021-10-29
Publication Date
2024-09-24
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

When existing network interface controllers (NICs) manage trigger operations, local buffering is prone to occur, resulting in low efficiency. Especially when processing a large number of trigger operations, frequent storage and reset are required, causing unnecessary overhead.

Method used

By determining the location of trigger conditions and command sets in the command queue outside the NIC, commands are fetched and issued from the command queue only when the trigger conditions are met, avoiding storage inside the NIC, and using batch processing and reuse of trigger conditions to reduce local storage. and reset.

Benefits of technology

It achieves efficient management of trigger operations while avoiding local buffering, supports a large number of trigger operations without the need for large storage modules, and improves the efficiency and performance of the NIC.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115686879B_ABST
    Figure CN115686879B_ABST
Patent Text Reader

Abstract

The present disclosure relates to systems and methods for facilitating dynamic triggered operation management in a network interface controller. A system for facilitating efficient command management in a network interface controller (NIC) is provided. During operation, the system can determine a trigger condition at the NIC and a position of a command set corresponding to the trigger condition in a command queue. The command queue can be external to the NIC. The position can correspond to the end of the command set in the command queue. The system can then determine at the NIC whether the trigger condition has been met. If the trigger condition is met, the system can retrieve the corresponding command in the command set from the command queue and issue the command from the NIC until the position is reached, thereby bypassing local storage of the command set before the trigger condition is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to communication networks. More particularly, the present disclosure relates to a method and system for dynamic triggered operation management in a network interface controller (NIC). Summary of the invention

[0002] According to one aspect of the present disclosure, a method for facilitating efficient command management in a network interface controller (NIC) is provided, the method comprising: determining, by the NIC, a trigger condition and a position of a command set corresponding to the trigger condition in a command queue, wherein the command queue is external to the NIC and wherein the position corresponds to an end of the command set in the command queue; determining, by the NIC, whether the trigger condition has been met; and in response to meeting the trigger condition, obtaining a corresponding command in the command set from the command queue and issuing the command from the NIC until the position is reached, thereby bypassing local storage of the command set before the trigger condition is met.

[0003] According to another aspect of the present disclosure, a network interface controller (NIC) is provided, comprising: a host interface coupled to a host device; and a control circuit, the control circuit facilitating a trigger logic block and an execution logic block; wherein the trigger logic block is used to: determine a trigger condition and a position of a command set corresponding to the trigger condition in a command queue, wherein the command queue is in a memory device of the host device, and wherein the position corresponds to an end of the command set in the command queue; and determine whether the trigger condition has been met; and wherein the execution logic block is used to: in response to meeting the trigger condition, obtain a corresponding command in the command set from the command queue and issue the command from the NIC until the position is reached, thereby bypassing local storage of the command set before the trigger condition is met. BRIEF DESCRIPTION OF THE DRAWINGS

[0004] Figure 1 An exemplary network according to an aspect of the present application is illustrated.

[0005] Figure 2A An exemplary NIC chip according to an aspect of the present application is illustrated.

[0006] Figure 2B An exemplary architecture of a NIC according to one aspect of the present application is illustrated.

[0007] Figure 3A An exemplary dynamic triggered operation management process in a NIC according to an aspect of the present application is illustrated.

[0008] Figure 3BAn exemplary batch-retrieval process of a triggered operation of a NIC according to an aspect of the present application is illustrated.

[0009] Figure 3C An exemplary reset process of a batch fetch of a triggered operation of a NIC according to an aspect of the present application is illustrated.

[0010] Figure 4A A flow chart illustrating a process by which a NIC manages triggered operations from a command queue is presented in accordance with an aspect of the present application.

[0011] Figure 4B A flow chart illustrating a process for a NIC to fetch and issue a batch of commands without local buffering is presented in accordance with an aspect of the present application.

[0012] Figure 4C A flow chart illustrating a process for batch processing of NIC rearming trigger operations in accordance with one aspect of the present application is presented.

[0013] Figure 5 An exemplary computer system equipped with a NIC that facilitates dynamic triggered operation management according to an aspect of the present application is illustrated.

[0014] In the drawings, like reference numerals refer to like drawing elements. DETAILED DESCRIPTION

[0015] The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a specific application and its requirements. Various modifications to the disclosed examples will be apparent to those skilled in the art, and the general principles defined herein may be applied to other examples and applications without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the examples shown, but is intended to be consistent with the maximum scope consistent with the claims.

[0016] As network-enabled devices and applications become more prevalent, various types of traffic and increasing network loads continue to place higher performance demands on the underlying network architecture. For example, applications such as high-performance computing (HPC), media streaming, and the Internet of Things (IoT) can generate different types of traffic with unique characteristics. Therefore, in addition to traditional network performance indicators such as bandwidth and latency, network architects continue to face challenges such as scalability, versatility, and efficiency.

[0017] Host devices such as HPC nodes may be equipped with one or more high-capacity NICs. Typically, such NICs may be Ethernet NICs that can provide low latency. Such NICs may facilitate data transfers to and from user space buffers without intervention from the operating system of the host device. For example, a NIC may provide both separate network atomic operations (e.g., floating point addition) and trigger operations. Trigger operations provide applications on the host device with the ability to set network operations that can be asynchronously triggered by completing other network operations without the involvement of the application.

[0018] One aspect of the present technology may provide a system for facilitating efficient command management in a network interface controller (NIC). During operation, the system may determine a trigger condition at the NIC and a position of a command set corresponding to the trigger condition in a command queue. The command queue may be external to the NIC. The position may correspond to an end of the command set in the command queue. The system may then determine at the NIC whether the trigger condition has been met. If the trigger condition is met, the system may retrieve a corresponding command in the command set from the command queue and issue the command from the NIC until the position is reached, thereby bypassing local storage of the command set until the trigger condition is met.

[0019] In a variation of this aspect, the system may obtain a trigger command indicating the trigger condition and the position in the command queue.Then, the system may generate an entry in a data structure including the trigger condition and the position.

[0020] In a further variation, the system may obtain the trigger command by determining that the trigger command exists in a second command queue and retrieving the trigger command from the second command queue. The second command queue may also be external to the NIC.

[0021] In a variation of this aspect, the command set may include multiple command subsets. A corresponding command subset may be associated with a triggering sub-condition of the command subset and a position indicating the end of the command subset in the command queue. The system may then generate an entry in a data structure including the triggering sub-condition and the position of the command subset.

[0022] In a further variation, the entry of the command subset may also include a next entry indicator, the next entry indicator indicating that a second entry of a second command subset exists in the data structure. If the trigger sub-condition is met, the system may issue the command subset. Subsequently, the system may determine whether a second trigger sub-condition of the second command subset has been met.

[0023] In a further variation, the system may combine the plurality of command subsets into a triggered operation group based on one or more bundling conditions.Then, the system may assign an identifier to the triggered operation group, wherein a corresponding command subset is associated with the identifier.

[0024] In a variation of this aspect, the position may be a target write pointer value of the command queue. The system may then retrieve the corresponding command from the command queue by updating the write pointer of the command queue with the target write pointer value and moving the read pointer of the command queue until the write pointer is reached.

[0025] In a further variation, the system may determine whether to reset the command set based on a reset counter.The system may then reset the command set by resetting the read pointer and the write pointer and decrementing the reset counter.

[0026] In a further variation, the system may further reset the command set by deriving the trigger condition from a base condition (eg, a base value).

[0027] In a variation of this aspect, the trigger condition may correspond to a threshold value.The system may then determine whether the trigger condition has been met by determining whether a counter value has reached the threshold value.

[0028] The examples described herein solve the problem of efficiently managing trigger operations while avoiding local buffering in the NIC by: (i) waiting for a trigger condition to satisfy a set of trigger operations; (ii) obtaining and issuing each of the set of trigger operations without storing the trigger operations in the NIC's internal buffer; and (iii) reusing the same trigger condition for the trigger operation already stored in the command queue when issuing the entire set. Avoiding local buffering can allow the NIC to efficiently support a large number of trigger operations without requiring a large storage module in the NIC. To facilitate batch processing, control flow is passed to the NIC. Based on batch processing and reusing trigger conditions, the NIC can avoid storing a large number of trigger operations locally and avoid resetting the trigger conditions.

[0029] Typically, a host device of a NIC may issue a data operation command (e.g., a "GET" or "PUT" command of a remote direct memory access (RDMA)) to the NIC. Thus, the host device may transmit a command (e.g., a direct memory access (DMA) descriptor of the command) to the NIC. If the host device needs to transmit a large number of commands to the NIC, an application running on the host device may store the commands in a command queue of the host device. The host device may maintain the command queue in a command queue memory segment of a memory device of the host device. When storing a command such as a trigger operation, the application may update a write pointer that notifies the NIC of the insertion of a new trigger operation.

[0030] Then, the trigger operation unit (TOU) of the NIC can obtain the trigger operation from the command queue based on the read pointer, store the operation in the internal buffer of the TOU and update the read pointer. The TOU can be equipped with a dedicated internal buffer for storing the complete length of the command of the corresponding trigger operation. The TOU can store the trigger operation until the trigger condition of the trigger operation is met. In some embodiments, the internal buffer can be implemented as a linked list on a memory device of the NIC. The linked list can also include the trigger condition of the trigger operation. Therefore, each element of the linked list may require 64 bytes to 128 bytes of storage.

[0031] When a NIC issues a trigger operation (i.e., issues a command to trigger an operation), the trigger operation may be processed by a NIC of another host device. If an application needs to use the trigger operation again, the application may reinsert the trigger operation into the command queue. However, many operations (e.g., collective operations) may repeatedly use the same operation mode. In addition, an application may also repeatedly use the same operation mode. Therefore, setting up trigger operations that are subsequently repeated may result in unnecessary overhead. Moreover, an application may require a large number of trigger operations. Therefore, it may be inefficient to store such a large number of trigger operations in the NIC while waiting for the trigger condition to be met.

[0032] To solve this problem, the NIC may support a trigger command that may include a trigger condition and a write pointer. The trigger condition may indicate when a trigger operation set is issued, and the write pointer may indicate the end of the trigger operation set in the command queue. The application may continue to place the trigger operation in the command queue of a regular command. Instead of updating the write pointer, the application may place the trigger command in a second command queue in the command queue segment. The trigger command may indicate a write pointer associated with the trigger operation, thereby shifting the control flow to the TOU. The TOU of the NIC may obtain the trigger command from the second command queue and store the information in the trigger command in a local trigger operation table. The information may include one or more of the trigger condition, the write pointer, and the identifier of the command queue. In some embodiments, the table may be implemented as a linked list on the NIC, and the corresponding entries of the table may be elements of the linked list.

[0033] The TOU may monitor trigger conditions. The trigger condition may be a threshold indicating the completion of other related operations. For example, if the trigger operation depends on data from n nodes, the threshold may be n. When data is received from each such node, the NIC's counter may be incremented. The counter may be based on a non-negative integer. When the counter value reaches n, the TOU may determine that the trigger condition has been met. When the trigger condition is met, the TOU may allow the NIC to obtain each of the trigger operations (i.e., each corresponding command) and issue the obtained trigger operations without storing the trigger operations in the TOU's internal buffer. Issuing a trigger operation may include inserting the trigger operation into a packet and sending the packet to the corresponding remote node. The TOU may then increment the read pointer, obtain the next trigger operation, and issue the obtained trigger operation. The TOU may continue this process until the read pointer reaches the write pointer of the entry. In this way, the NIC may issue trigger operations without storing them in an internal buffer.

[0034] Typically, a trigger operation set may include multiple subsets, each subset having a corresponding threshold value. The threshold value of each such trigger operation subset may be the same or may be different. An application may bundle each such trigger operation subset together based on one or more bundling conditions. Examples of bundling conditions include, but are not limited to, explicit definitions from users (e.g., based on an application programming interface (API)) and NIC automatically detecting that the threshold value of a sequential command is the same. A trigger operation set may be referred to as a trigger group (TG). The NIC may assign an identifier to a corresponding TG. Each subset of a TG may be associated with the same TG identifier. Thus, a trigger operation table may include a TG identifier.

[0035] In addition, if the application repeatedly reuses the same set of trigger operations, instead of reissuing the trigger operations, the application can indicate the number of times the trigger operations of the TG should be repeated. The TOU can maintain a mapping of corresponding TG identifiers and counters, which indicate the number of times the trigger operations should be repeated in the basic table. The basic table can also be implemented as a linked list. When all trigger operations in the TG are issued, the TOU can check whether the counter has a non-zero positive value. If the counter has a non-zero positive value, the TOU can wait for the completion of the issuance of the corresponding trigger operations of the TG, decrement the counter and reset the trigger operations of the TG. Resetting includes resetting the read pointer and the write pointer to the initial value (e.g., a zero value). In this way, the NIC can efficiently use the trigger operations already stored in the command queue, thereby allowing the application to avoid repeatedly reissuing the same set of trigger operations.

[0036] In this disclosure, the term "switch" is used in a general sense, and it can refer to any stand-alone or structural switch operating in any network layer. "Switch" should not be interpreted as limiting the examples of the present invention to Layer 2 networks. Any device that can forward traffic to an external device or another switch can be referred to as a "switch". Any physical or virtual device that can forward traffic to a terminal device (e.g., a virtual machine or switch operating on a computing device) can be referred to as a "switch". Examples of "switch" include, but are not limited to, a Layer 2 switch, a Layer 3 router, a routing switch, a component of a Gen-Z network, or a structural switch comprising multiple similar or heterogeneous smaller physical and / or virtual switches.

[0037] The term "packet" refers to a group of bits that can be transmitted together on a network. "Packet" should not be interpreted as limiting the examples of the present invention to layer 3 networks. "Packet" can be replaced by other terms that refer to a group of bits, such as "message", "frame", "cell", "datagram" or "transaction". In addition, the term "port" can refer to a port that can receive or transmit data. "Port" can also refer to hardware, software and / or firmware logic that can facilitate the operation of the port.

[0038] The phrase "trigger operation" refers to a command issued by an application for a trigger operation. In the present disclosure, the phrases "trigger operation" and "trigger operation command" are used interchangeably.

[0039] In the present disclosure, Figure 1 The description is related to the network architecture and combined with Figure 2A The description that follows provides more details regarding the architecture and operation associated with a NIC that supports efficient command management.

[0040] Figure 1An exemplary network according to one aspect of the present application is illustrated. In this example, a network 100 of switches (which may also be referred to as a "switch fabric") may include switches 102, 104, 106, 108, and 110. Each switch may have a unique address or ID within the switch fabric 100. Various types of devices and networks may be coupled to the switch fabric. For example, a storage array 112 may be coupled to the switch fabric 100 via switch 110; an InfiniBand (IB)-based HPC network 114 may be coupled to the switch fabric 100 via switch 108; multiple end hosts (such as host 116) may be coupled to the switch fabric 100 via switch 104; and an IP / Ethernet network 118 may be coupled to the switch fabric 100 via switch 102. Typically, a switch may have an edge port and a fabric port. An edge port may be coupled to a device outside the fabric. A fabric port may be coupled to another switch within the fabric via a fabric link. Typically, traffic may be injected into the switch fabric 100 via an ingress port of an edge switch and leave the switch fabric 100 via an egress port of another (or the same) edge switch. The ingress link can couple the NIC of the edge device (e.g., HPC end host) to the ingress edge port of the edge switch. The switch fabric 100 can then transmit the traffic to the egress edge switch, which in turn can pass the traffic to the destination edge device via another NIC.

[0041] Figure 2A FIG. 1 illustrates an exemplary NIC chip according to an aspect of the present application. Figure 1 In the example of FIG. 1 , NIC chip 200 may be a custom application specific integrated circuit (ASIC) designed for host 116 to work with switch fabric 100. In this example, chip 200 may provide NIC 202. A corresponding NIC of chip 200 may be equipped with a host interface (HI) (e.g., an interface for connecting to a host processor) and a NIC for coupling to a host processor. Figure 1 The NIC 202 may include a high-speed network interface (HNI) for communicating with the links of the switch structure 100. For example, the NIC 202 may include a HI 210 and an HNI 220.

[0042] In some embodiments, HI 210 may be a peripheral component interconnect (PCI) or a peripheral component interconnect express (PCIe) interface. HI 210 may be coupled to a host via a host connection 201, which may include N (e.g., N may be 16 in some chips) PCle Gen4, PCle Gen5, and PCle Gen6 channels capable of operating at signaling rates of up to 16 Gbps, 32 Gbps, and 64 Gbps per channel, respectively. HNI 210 may facilitate a high-speed network connection 203, which may be coupled to a host computer. Figure 1 The HNI 210 can communicate using links in the switch structure 100. The HNI 210 can operate at a total rate of 100 Gbps, 200 Gbps, 400 Gbps, or 800 Gbps using M (for example, in some chips, M can be 4) full-duplex serial lanes. Based on non-return-to-zero (NRZ) modulation or pulse amplitude modulation 4 (PAM4), each of the M channels can operate at X Gbps or Y Gbps, respectively. For example, 400G Ethernet can use 100 Gbps PAM4 (i.e., Y=100). The HNI 220 can support the Institute of Electrical and Electronics Engineers (IEEE) 802.3 Ethernet-based protocols and enhanced frame formats that provide support for small messages at higher rates.

[0043] NIC 202 can support one or more of the following: point-to-point messaging based on message passing interface (MPI), remote memory access (RMA) operations, unloading and progress of bulk data collective operations, and Ethernet packet processing. In addition, the RMA operations supported by NIC 202 can include PUT, GET, and atomic memory operations (AMO). NIC 202 can provide reliable transmission. For example, if NIC 202 is a source NIC, NIC 202 can provide a retry mechanism for idempotent operations. In addition, connection-based error detection and retry mechanisms can be used for command operations (ordered operation) that can manipulate target states. The hardware of NIC 202 can maintain the state required for the retry mechanism. In this way, NIC 202 can reduce the burden on the host (e.g., software). The policy for stipulating the retry mechanism can be specified by the host via software, thereby ensuring the flexibility of NIC 202.

[0044] In addition, the NIC 202 can facilitate trigger operations, general offload mechanisms, and the progression of related operation sequences (such as bulk data collection). The NIC 202 can support an application programming interface (API) (e.g., a free structure API) that facilitates Figure 1The switch fabric 100 provides fabric communication services to applications running on the host 116. The NIC 202 may also support low-level network programming interfaces, such as portal APIs. In addition, the NIC 202 may provide efficient Ethernet packet processing, which may include efficient transmission when the NIC 202 is a sender, flow manipulation when the NIC 202 is a target, and checksum calculations. Moreover, the NIC 202 may support virtualization (e.g., using containers or virtual machines).

[0045] Figure 2B An exemplary architecture of a NIC according to one aspect of the present application is illustrated. In NIC 202, the port macro of HNI 220 can facilitate low-level Ethernet operations, such as physical coding sublayer (PCS) and media access control (MAC). In addition, NIC 202 can provide support for link layer retry (LLR). NIC 202 may include a command queue (CQ) unit 230. CQ unit 230 may be responsible for obtaining and issuing host-side commands. CQ unit 230 may include command queue 232 and scheduler 234. Command queue 232 may include two independent queues for initiator commands (PUT, GET, etc.) and target commands (Append, Search, etc.), respectively. Command queue 232 may be implemented as a circular buffer maintained in the memory of NIC 202. Applications running on the host can directly write to command queue 232. Scheduler 234 may include two separate schedulers for initiator commands and target commands, respectively. Initiator commands are classified into stream queues 236 based on hash functions. One of the flow queues 236 may be assigned to a unique flow. In addition, the CQ unit 230 may further include a trigger operation module (or logic block) 238, which is responsible for queuing and dispatching trigger commands.

[0046] Figure 3A An exemplary dynamic trigger operation management process in a NIC according to one aspect of the present application is illustrated. In this example, a host device 300 may be equipped with a NIC 330. The device 300 may include a processor 302, a memory device 304, and an interface system 306. The HI 332 of the NIC 330 may be coupled to the interface system 306 of the device 300. The NIC 330 may be coupled to a network 340 via an HNI 336. In some embodiments, the HI 332 may be a PCIe interface, and the interface system 306 may be a PCIe system that provides a slot for the HI 332. The NIC 330 may also include a CQ unit 334 for managing input commands from the device 300, such as in conjunction with Figure 2ADuring operation, the device 300 may issue a command 320 for an operation (eg, an RDMA operation). To transmit the command 320, the host 300 may generate a command descriptor (eg, a DMA descriptor) and transmit the command 320 to the NIC 330.

[0047] If the command 320 is one of a large number of commands, the device 300 may store the command 320 in a CQ memory segment 312 in the memory device 304. The segment 312 may store one or more CQs 352 and 354. The command 320 may be stored in the CQ 352. When the NIC 330 has resources available for the next command, the NIC 330 may request the command from the device 300. If the command 320 is the next command, the processor 302 may transmit the command 320 to the NIC 330 via the HI 332. Here, the NIC 330 may read the command from the memory device 304 of the host 300. In some embodiments, the device driver 308 of the NIC 330 running on the operating system of the host 300 may facilitate communication between the host device 300 and the NIC 330.

[0048] When the application 310 running on the device 300 issues a command for the NIC 330 (the command may include a trigger operation), the command may be stored in the CQ 352 of the segment 312. The device 300 may then notify the NIC 330 of the command by advancing the write pointer of the CQ 352. The NIC 330 may then issue a read operation to the CQ 352 via the HI 332 and advance the prefetch pointer of the CQ 352. The TOU 334 of the NIC 330 may then obtain the trigger operation from the CQ 352 based on the read pointer, store the operation in the internal buffer 342 of the TOU 334 and update the read pointer. The buffer 342 may be a dedicated buffer for storing the full length of the command of the corresponding trigger operation. The TOU 334 may store the trigger operation in the buffer 342 until the trigger condition of the trigger operation is met. In some embodiments, the buffer 334 may be implemented as a linked list on a memory device of the NIC 330. The linked list may also include the trigger condition of the trigger operation. Therefore, each element of the linked list will require 64 bytes to 128 bytes of storage.

[0049] When NIC 330 issues a trigger operation, the trigger operation can be processed by the NIC of another host device. Issuing a trigger operation may include inserting the trigger operation into a packet and sending the packet to the corresponding remote node via network 340. If application 310 needs to use the trigger operation again, application 310 can reinsert the trigger operation into CQ 352. However, many operations (such as collective operations) may repeatedly use the same operating mode. In addition, application 310 may also repeatedly use the same operating mode. Therefore, setting up subsequent repeated trigger operations may cause unnecessary overhead. Moreover, application 310 may require a large number of trigger operations. Therefore, it may be inefficient to store such a large number of trigger operations in buffer 342 while waiting for the trigger condition to be met.

[0050] To address this problem, the application 310 may issue a set of trigger operations 322 and store these trigger operations in the CQ 352 without advancing the corresponding write pointer. The application 310 may also issue a trigger command 324 that may include a trigger condition and a write pointer. The trigger condition may indicate when the set of trigger operations 322 is issued, and the write pointer may indicate the end of the set of trigger operations 322 in the CQ 352. The application 310 may store the command 324 in the CQ 354 and advance the write pointer of the CQ 354. In response, the NIC 330 may obtain the command 324 from the CQ 354 and advance the read pointer of the CQ 354. The TOU 334 may then store the command 324 in a trigger operation (TO) table 344. In some embodiments, the table 344 may be implemented as a linked list in a local memory device of the NIC 330.

[0051] By waiting for the trigger condition to be satisfied, the NIC 330 can efficiently manage the set of triggered operations 322 while avoiding local buffering in the buffer 342. In response to the trigger condition being satisfied, the TOU 334 can obtain each of the set of triggered operations from the CQ 352. The NIC 330 can then issue the trigger operation without storing the trigger operation in the buffer 342. The TOU 334 can then advance the read pointer and obtain the next trigger operation of the set of triggered operations 322. In other words, to facilitate batch processing, the control flow is transferred from the application 310 to the NIC 330. When issuing the entire set, the TOU 334 can reuse the same trigger condition from the table 344 for the set of triggered operations 322 that has already been stored in the CQ 352. Based on batch processing and reusing trigger conditions, the NIC 330 can avoid storing a large number of trigger operations locally and avoid resetting the trigger conditions.

[0052] Figure 3BAn exemplary batch-retrieval process of trigger operations for a NIC according to an aspect of the present application is illustrated. Application 310 may continue to set trigger operations 322 in CQ 352. Instead of updating write pointer 316, application 310 may place command 324 in CQ 354 in segment 312. Command 324 may include write pointer indicator 396, which may be a target write pointer value indicating what write pointer 316 of CQ 352 should be when trigger operation set 322 is issued. TOU 334 may retrieve command 324 from CQ 354 and store information in command 324 in table 344. The information may include one or more of: trigger condition 372; write pointer indicator 374 (e.g., value of write pointer indicator 396) indicating the end of trigger operation set 322 in CQ 352; and CQ identifier 376 (e.g., identifier of CQ 352).

[0053] The TOU 354 may then monitor a trigger condition 372, which may be a threshold indicating completion of other related operations. The NIC 330 may maintain a counter corresponding to a respective such threshold. When the counter reaches the threshold specified in the trigger condition 372 of the table 344, the TOU 334 may determine that the trigger condition 372 has been met. When the trigger condition 372 is met, the TOU may update the write pointer 316 using the write pointer indicator 396. The TOU 334 may then allow the NIC 330 to obtain each trigger operation (i.e., each corresponding command) in the trigger operation set 322 and issue the obtained trigger operation without storing the trigger operation in the buffer 342. Subsequently, the CQ unit 338 of the NIC 330 may increment the read pointer 314, thereby allowing the NIC 330 to obtain the next trigger operation from the CQ 352 and issue the obtained trigger operation. TOU 334 and CQ unit 338 may continue this process until read pointer 314 reaches write pointer 316 (eg, the location indicated by write pointer indicator 396). In this manner, NIC 330 may issue trigger operation sets 322 without storing these trigger operations in internal buffer 342.

[0054] In some embodiments, the trigger operation set 322 may include multiple subsets 362, 364, and 366. Each of the subsets may be associated with a corresponding trigger condition (e.g., a threshold) and a write pointer indicator. The trigger condition of each such trigger operation subset may be referred to as a trigger sub-condition. These trigger sub-conditions may be the same or may be different. This allows the trigger operation set 322 to represent a complex set of trigger operations, which have different trigger conditions but generally have the same repetitive pattern. The TOU 334 may generate and maintain entries for each of the subsets 362, 364, and 366 in the table 344. In this case, the TOP table 344 may also include a next pointer 376 that may indicate whether there is a subsequent trigger operation subset. If there is a subsequent subset, the value of the next pointer 376 may indicate the next entry in the table 344 that stores information associated with the subsequent subset. If the table 344 is implemented as a linked list, the value of the next pointer 376 may be a pointer to the next element (or node) of the linked list.

[0055] In this example, the TOU 334 may monitor the value of the trigger condition 372 in the first entry of the table 344. When the trigger condition 372 of the subset 362 is met (e.g., the counter reaches a value of 5), the TOU 334 signals the NIC 330 to obtain a trigger operation from the CQ 352, as indicated by the value of the CQ identifier 376 in the corresponding entry of the table 344. To do so, the TOU 334 may update the write pointer 316 using the write pointer indicator 392. Accordingly, the NIC 330 may obtain the trigger operation indicated by the read pointer 314 and issue the trigger operation. The CQ unit 338 may then increment the read pointer 314, which allows the NIC 330 to obtain the next trigger operation indicated by the read pointer 314 and issue the trigger operation. The TOU 334 may repeat this process until the read pointer 314 reaches the write pointer 316 (e.g., the position indicated by the write pointer indicator 392).

[0056] Based on the value of the next pointer 376 in the entry, the TOU 334 can determine another entry in the table 344, indicating the presence of another subset. Accordingly, the TOU 334 can monitor the value of the trigger condition 372 in the next entry of the table 344. In the same manner, when the trigger condition 372 of the subset 364 is met (e.g., the counter reaches a value of 12), the TOU 334 can update the write pointer 316 using the write pointer indicator 394. The NIC 330 can then obtain each trigger operation of the subset 364 and issue the obtained trigger operation. The TOU 334 and the CQ unit 338 can repeat this process until the read pointer 314 reaches the write pointer 316 (e.g., the position indicated by the write pointer indicator 394). Based on the value of the next pointer 376 in the second entry, the TOU 334 can determine the presence of another entry in the table 344.

[0057] When the trigger condition 372 of the subset 366 is met (e.g., the counter reaches a value of 17), the TOU 334 can update the write pointer 316 with the write pointer indicator 396. Then, the NIC 330 can obtain each trigger operation of the subset 364 and issue the obtained trigger operation. The TOU 334 can repeat this process until the read pointer 314 reaches the write pointer 316 (e.g., the location indicated by the write pointer indicator 396). Based on the value of the text pointer 376 in the third entry (e.g., a predetermined value, such as NULL), the TOU 334 can determine that the entire set of trigger operations 322 has been issued. In this way, the TOU 334 can facilitate efficient processing of trigger operations in the NIC 330 without storing the trigger operations in the buffer 342.

[0058] Figure 3CAn exemplary reset process of batch-retrieval of trigger operations of a NIC according to one aspect of the present application is illustrated. Application 310 may issue subsets 362, 364, and 366 of trigger operations separately (i.e., not as part of trigger operation set 322). Subsets 362, 364, and 366 may then be bundled together based on one or more bundling conditions. Examples of bundling conditions include, but are not limited to, explicit definitions from a user and automatic detection of correlations between subsets 362, 364, and 366 by NIC 330. Explicit definitions may be based on user input to application 310 via an API. On the other hand, NIC 330 may determine correlations based on similarity thresholds of subsets 362, 364, and 366. NIC 330 may determine correlations because subsets 362, 364, and 366 are for specific sub-operations of application 310. Based on this combination, trigger operation set 322 may be referred to as a trigger group or TG. NIC 330 (or application 310) may assign identifiers to corresponding TGs. Each subset of TGs may be associated with the same TG identifier.

[0059] Thus, table 344 may include TG identifier 370. For example, subsets 362, 364, and 366 may be associated with a TG identifier value of 0. Thus, the value of TG identifier 370 for each entry in table 344 associated with triggered operation set 322 may be 0. Assume that application 310 places another triggered operation set 328 in CQ 356 in CQ memory segment 312. Application 310 may then issue a trigger command 326 that may include a trigger condition and a write pointer. The trigger condition may indicate when to issue the triggered operation set 328, and the write pointer may indicate the end of the triggered operation set 328 in CQ 356. TOU 334 may retrieve command 326 from CQ 354 and store the information in command 326 in table 344.

[0060] Assume that the triggered action set 328 includes three subsets. Accordingly, the TOU 334 can generate three corresponding entries in the table 344. If the triggered action set 328 is associated with the TG identifier value 1, the value of the TG identifier 370 of each entry associated with the triggered action set 328 in the table 344 can be 1. In addition, the CQ identifier 376 of each entry associated with the triggered action set 328 can correspond to the CQ 356. In this way, the table 344 can store one or more entries for each triggered action set from the application 310. The entries in each of the sets can include the same TG identifier. The NIC 330 can maintain a separate counter for managing the trigger conditions of each triggered action set.

[0061] In addition, if the application 310 repeatedly reuses the trigger operation set 322 instead of reissuing the trigger operation set 322, the application 310 can indicate the number of times the trigger operation set 322 should be repeated. The TOU 334 can maintain a mapping of the TG identifier (i.e., value 0) of the trigger operation set 322 and a counter, which indicates the number of times the trigger operation set 322 should be repeated or reset. The TOU 334 can maintain the mapping in the basic table 346. The table 346 can also be implemented as a linked list. For the corresponding TG, the table 346 may include a TG identifier 382, ​​a basic trigger condition 384, a trigger condition increment 386, and a reset count 388. If the trigger operation set 322 is to be repeated seven times, then these trigger operations should be reset seven times. Therefore, the entry of the trigger operation set 322 may include a TG identifier 0 and a reset count value 7.

[0062] Resetting a counter indicating a trigger condition (e.g., to a value of 0) may result in a race condition. Therefore, instead of resetting the counter, the NIC 330 may continue to increment the counter value. For example, if the set of triggered operations depends on data from n nodes, the threshold value may be n. When the counter value reaches n, the TOU 334 may determine that the trigger condition has been met. The NIC 330 may then obtain and issue each operation in the set of triggered operations. If the triggered operation is to be repeated when data from n nodes is received again, the subsequent threshold value may be 2n. Accordingly, the basic trigger condition may be n, and the trigger condition increment may also be n. For the set of triggered operations 322, the initial value of the counter is 0. In addition, when the threshold value reaches 17, all operations in the set of triggered operations 322 are issued. Accordingly, for the set of triggered operations 322, the values ​​of the basic trigger condition 384 and the trigger condition increment 386 may be 0 and 17, respectively. For the first reset and the second reset, the value of the basic trigger condition 384 may be set to 17 and 34, respectively (i.e., incremented by 17 for each reset).

[0063] When all trigger operations in trigger operation set 322 are issued, next pointer 376 in the corresponding entry of table 344 may include a "REARM" value. Figure 3BAs described, the REARM value may be a predefined value indicating that the trigger operation should be reset. The TOU 334 may then determine the associated TG identifier from the TOP table 344. The TOU 334 may look up the TG identifier in the table 346 and identify the corresponding entry. The TOU 334 may determine whether the reset counter value in the entry has a non-zero positive value. If the counter has a non-zero positive value, the TOU 334 may wait for the completion of the issuance of the corresponding trigger operation of the trigger operation set 322, decrement the counter value and reset the trigger operation set 322. Resetting includes resetting the read pointer and the write pointer to an initial value (e.g., a zero value). The TOU 334 may also update the value of the basic trigger condition by the value of the trigger condition increment of the entry.

[0064] Assume that the trigger operation set 328 is not repeated by the application 310. Thus, the next pointer 376 in the corresponding entry of the table 344 may include a "DONE" value (e.g., a predefined value) that is different from the REARM value. Based on the DONE value, the TOU 334 may determine that the trigger operation set 328 is not repeated. Instead of the DONE value, the entry may include a REARM value. The TOU 334 may then determine that the corresponding value of the retry count 388 in the table 346 is 0. If the DONE value is used, the trigger operation set 328 may not have a corresponding entry in the table 346. In this way, the NIC 330 can efficiently use the trigger operations already stored in the command queue 352, thereby allowing the application 310 to avoid repeatedly reissuing the same trigger operation.

[0065] Figure 4A A flow chart according to one aspect of the present application is presented that illustrates a process by which a NIC manages a trigger operation from a command queue. During operation, the NIC may receive a trigger command (operation 402) and assign a trigger group identifier to the trigger command (operation 404). The NIC may use information from the received trigger command to generate an entry in a TO table (operation 406). Similarly, the NIC may use information from the received trigger command to generate an entry in a base table (operation 408).

[0066] Figure 4B A flow chart according to one aspect of the present application is presented, which illustrates a process for a NIC to obtain and issue a batch of commands without local buffering. During operation, the NIC may obtain a basic value in a basic table based on a TG identifier (operation 422). The NIC may then calculate a trigger condition based on the basic trigger condition (e.g., calculate a threshold based on a basic threshold) (operation 424). The NIC may monitor the trigger condition in the current entry in the TO table (operation 426) and check whether the trigger condition is met (operation 428). In some embodiments, the trigger condition is that a counter value reaches a threshold.

[0067] If the trigger condition is not met, the NIC may continue to monitor the trigger condition in the current entry in the TO table (operation 426). On the other hand, if the trigger condition is met, the NIC may update the write pointer of the command queue based on the write pointer indicator specified in the entry (operation 430). The NIC may then obtain a trigger operation (e.g., when the CQ unit of the NIC moves a read pointer) and issue the obtained trigger operation without storing the trigger operation in a local buffer (operation 432). The NIC may check whether the read pointer has reached the write pointer (operation 434). If the read pointer has not reached the write pointer, the NIC may continue to obtain the next trigger operation by moving the read pointer and issue the obtained trigger operation without storing the trigger operation in a local buffer (operation 432).

[0068] On the other hand, if the read pointer has reached the write pointer, the NIC may determine whether the next entry is indicated by the next pointer in the entry (operation 436). If the next entry is indicated in the entry, the NIC may select the current entry based on the next pointer specified in the entry (operation 438). The NIC may then monitor the trigger condition in the updated current entry in the TO table (operation 426). On the other hand, if the next entry is not indicated, the NIC may determine whether a reset is indicated in the entry (operation 440). If a reset is indicated in the entry, the NIC may initiate a reset process (operation 442). Otherwise, the NIC has completed issuing a trigger operation.

[0069] Figure 4C A flow chart according to one aspect of the present application is presented, which illustrates a process for batch processing of a NIC reset trigger operation. During operation, the NIC may identify an entry in a base table based on a TG identifier (operation 452) and obtain a resetting count from the entry (operation 454). The NIC may then determine whether the resetting count is greater than zero (operation 456). If the resetting count is not greater than zero (i.e., has become zero), the NIC may release the corresponding entry in the base table and the TO table (operation 464). However, if the resetting count is greater than zero, the NIC may update the base trigger condition based on the trigger condition increment value specified in the entry (operation 458).

[0070] The NIC may check whether the read pointer has reached the write pointer (operation 460). If the read pointer has not reached the write pointer, the NIC may wait for the command queue to be empty (operation 462) and continue to check whether the read pointer has reached the write pointer (operation 460). On the other hand, if the read pointer has reached the write pointer, the NIC may decrement the retry count in the entry (operation 466) and reset the read pointer and the write pointer (e.g., to an initial value, such as a value of 0) (operation 468).

[0071] Figure 5 An exemplary computer system equipped with a NIC that facilitates dynamic trigger operation management according to an aspect of the present application is illustrated. Computer system 550 may include a processor 552, a memory device 554, and a storage device 556. The memory device 554 may include a volatile memory device (e.g., a dual in-line memory module (DIMM)). In addition, computer system 550 may be coupled to a keyboard 562, a pointing device 564, and a display device 566. The storage device 556 may store an operating system 570. An application 572 may operate on the operating system 570. The memory device 554 may include CQs 542 and 544. The application 572 may place a trigger operation in CQ 542 and place a trigger command in CQ 544.

[0072] The computer system 550 may be equipped with a host interface coupled to a NIC 520 that facilitates efficient command management. The NIC 520 may provide one or more HNIs to the computer system 550. The NIC 520 may be coupled to the switch 502 via one of the HNIs. The NIC 520 may include a trigger operation logic block 530, such as in conjunction with Figure 3A , Figure 3B and Figure 3C The trigger operation logic block 530 may include a command logic block 532, a trigger logic block 534, an execution logic block 536, and a reset logic block 538. The command logic block 532 may obtain a trigger command from the CQ 544 and fill in corresponding entries in the local TO table and the basic table. The command logic block 532 may also combine related trigger operations into a TG based on one or more bundling conditions and assign corresponding TG identifiers.

[0073] The trigger logic block 534 may determine whether the trigger conditions of the trigger operation set (or subset) in the CQ 542 have been met. The execution logic block 536 may obtain the corresponding trigger operation from the trigger operation set and issue the trigger operation without storing the trigger operation in a local buffer. The execution logic block 536 may also determine whether the trigger operation set should be reset. The reset logic block 538 may reset the trigger operation set by updating the basic trigger conditions, decrementing the reset counter, and resetting the read pointer and write pointer of the CQ 542. If the trigger operation set is not reset, the reset logic block 538 may release the entry associated with the trigger operation set.

[0074] The data structures and codes described in this specific embodiment are generally stored on a computer-readable storage medium, which can be any device or medium that can store code and / or data for use by a computer system. Computer-readable storage media include, but are not limited to, volatile memory, non-volatile memory, magnetic storage devices, and optical storage devices (such as magnetic disks, tapes, CDs (compact disks), DVDs (digital versatile disks or digital video disks)), or other media capable of storing computer-readable media now known or later developed.

[0075] The methods and processes described in the detailed description section may be embodied as code and / or data, which may be stored in a computer-readable storage medium as described above. When a computer system reads and executes the code and / or data stored on a computer-readable storage medium, the computer system executes the methods and processes embodied as data structures and codes and stored in the computer-readable storage medium.

[0076] The methods and processes described herein may be performed by and / or included in hardware modules or devices. These modules or devices may include, but are not limited to, application specific integrated circuit (ASIC) chips, field programmable gate arrays (FPGAs), dedicated or shared processors that execute specific software modules or codes at specific times, and / or other programmable logic devices now known or later developed. When the hardware modules or devices are activated, these hardware modules or devices perform the methods and processes included therein.

[0077] The previous description of the examples of the present invention is presented for illustration and description purposes only. The description is not intended to be exhaustive or to limit the present disclosure. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art. The scope of the present invention is defined by the appended claims.

Claims

1. A method for facilitating efficient command management in a network interface controller (NIC), the method comprising: determining, by the NIC, a trigger condition and a position of a command set corresponding to the trigger condition in a command queue, wherein the command queue is external to the NIC, and wherein the position corresponds to a last command of the command set in the command queue; determining, by the NIC, whether the trigger condition has been met; and In response to satisfying the trigger condition, a corresponding command in the command set is obtained from the command queue and the command is issued from the NIC until the position is reached, thereby avoiding local storage of the command set before the trigger condition is satisfied.

2. The method of claim 1, further comprising: obtaining a trigger command indicating the trigger condition and the position in the command queue; as well as An entry is generated in a data structure including the trigger condition and the position.

3. The method of claim 2, wherein: Obtaining the trigger command further includes: Determining that the trigger command exists in a second command queue outside the NIC; and The trigger command is obtained from the second command queue.

4. The method of claim 1, wherein: The command set includes a plurality of command subsets, wherein a corresponding command subset is associated with a trigger sub-condition of the command subset and a position indicating a last command of the command subset in the command queue; and The method further comprises generating an entry in a data structure comprising the trigger sub-condition and the location of the command subset.

5. The method of claim 4, wherein: the entry including the location of the subset of commands further including a next entry indicator indicating that a second entry of a second subset of commands exists in the data structure; and Wherein, the method further comprises: issuing the subset of commands in response to satisfying the trigger sub-condition; and Determine whether a second trigger sub-condition of the second command subset has been satisfied.

6. The method of claim 4, further comprising: combining the plurality of command subsets into a trigger operation group based on one or more bundling conditions; as well as An identifier is assigned to the group of triggered operations, wherein a corresponding subset of commands is associated with the identifier.

7. The method of claim 1, wherein: The position is a target write pointer value of the command queue; Wherein, obtaining the corresponding command from the command queue further includes: updating a write pointer of the command queue using the target write pointer value; and The read pointer of the command queue is moved until the write pointer is reached.

8. The method of claim 7, further comprising: determining whether to reset the command set based on a reset counter; as well as Reset the command set by: Resetting the read pointer and the write pointer; as well as The reset counter is decremented.

9. The method of claim 1, wherein: The trigger condition corresponds to a threshold value; Wherein, determining whether the trigger condition has been met further includes determining whether the counter value has reached the threshold.

10. A network interface controller NIC, comprising: A host interface coupled to a host device; as well as A control circuit, wherein the control circuit is configured to control the trigger logic block and the execution logic block; Wherein, the trigger logic block is used for: determining a trigger condition and a position of a command set corresponding to the trigger condition in a command queue, wherein the command queue is in a memory device of the host device, and wherein the position corresponds to a last command of the command set in the command queue; and determining whether the trigger condition has been met; and The execution logic block is used to: in response to satisfying the trigger condition, obtain the corresponding command in the command set from the command queue and issue the command from the NIC until reaching the position, thereby avoiding local storage of the command set before satisfying the trigger condition.

11. The network interface controller NIC according to claim 10, wherein: The control circuit is further configured to control a command logic block, wherein the command logic block is used to: obtaining a trigger command indicating the trigger condition and the position in the command queue; and An entry is generated in a data structure including the trigger condition and the position.

12. The network interface controller NIC according to claim 11, wherein: The command logic block is used to obtain the trigger command in the following manner: Determining that the trigger command exists in a second command queue outside the NIC; and The trigger command is obtained from the second command queue.

13. The network interface controller NIC according to claim 10, wherein: The command set includes a plurality of command subsets, wherein a corresponding command subset is associated with a trigger sub-condition of the command subset and a position indicating a last command of the command subset in the command queue; and Wherein, the control circuit is further configured to control a command logic block, wherein the command logic block is used to generate an entry in a data structure including the trigger sub-condition and the position of the command subset.

14. The network interface controller NIC according to claim 13, wherein: the entry including the location of the subset of commands further including a next entry indicator indicating that a second entry of a second subset of commands exists in the data structure; Wherein, the execution logic block is further used to issue the command subset in response to satisfying the trigger sub-condition; and The trigger logic block is further used to determine whether a second trigger sub-condition of the second command subset has been met.

15. The network interface controller NIC according to claim 13, wherein: The command logic block is further configured to: combining the plurality of command subsets into a triggered operation group based on one or more bundling conditions; and An identifier is assigned to the group of triggered operations, wherein a corresponding subset of commands is associated with the identifier.

16. The network interface controller NIC according to claim 10, wherein: The position is a target write pointer value of the command queue; The execution logic block is used to obtain the corresponding command from the command queue in the following manner: updating a write pointer of the command queue using the target write pointer value; and The read pointer of the command queue is moved until the write pointer is reached.

17. The network interface controller NIC according to claim 16, wherein: The control circuit is further configured to control a reset logic block, wherein the reset logic block is used to: determining whether to reset the command set based on a reset counter; and Reset the command set by: resetting the read pointer and the write pointer; and The reset counter is decremented.

18. The network interface controller NIC according to claim 10, wherein: The trigger condition corresponds to a threshold value; The trigger logic block is used to determine whether the trigger condition has been met by determining whether the counter value has reached the threshold.