Network traffic control method and device, network processor and computer program product
By replacing the multi-level arbitration module with linked list structure, the logic complex and timing problems in traditional flow control systems are solved, efficient and flexible credit allocation and scheduling are achieved, and the system's scheduling efficiency and fairness are improved.
Patent Information
- Application Number
- CN202510856917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-02
AI Technical Summary
In the traditional credit feedback-based flow control system, the multi-level arbitration mechanism leads to complex system logic and serious timing implementation problems, and the weights of different queue pairs cannot be set independently, which affects scheduling efficiency.
The linked list structure is used instead of the multi-level arbitration module, and the linked list node is directly associated with the host ID, channel information and queue matching, and the scheduling rate is combined to determine the number of scheduling times and credit allocation, so as to achieve flexible flow control.
It simplifies system logic, avoids timing implementation problems, reduces interaction complexity between modules, improves scheduling efficiency and fairness, supports fast access and update queue status, and realizes the efficiency of credit allocation.
Smart Images

Figure CN120583035A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network traffic control, and in particular to a network traffic control method and device, a network processor, and a computer program product. Background Art
[0002] In traditional credit-based feedback traffic control systems, traffic scheduling usually relies on a multi-level arbitration mechanism, which makes decisions based on different granularities (QP / Channel / Host). For example, Figure 1 The system shown in the figure first determines the final QP credit at the queue pair (QP) level, then at the higher channel level, and finally at the host level. Credit refers to the amount of data that can be sent or received. Each level of multi-level arbitration can choose round-robin scheduling (RR) or weighted round-robin scheduling (WRR). If a QP needs to be deregistered, the corresponding bit must be masked during arbitration to ensure that it does not participate in the arbitration process.
[0003] The implementation of a multi-level arbitration mechanism requires multiple arbitration modules. Each level of arbitration module needs to be designed to handle specific arbitration rules and decisions, which leads to complex system logic. This is especially true when there are too many levels or too many scheduled QPs, which can lead to timing implementation issues. In addition, during scheduling, different QPs have the same weight, and different weights cannot be set for different QPs. Summary of the Invention
[0004] The purpose of this application is to propose a network traffic control method and device, a network processor, and a computer program product to implement network traffic control based on a linked list, simplify system logic, and avoid timing problems.
[0005] To achieve the above objectives, according to a first aspect of the present application, a network traffic control method is provided, the method comprising:
[0006] Obtaining a scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores request information of the request to be scheduled associated with it;
[0007] Determine the number of scheduling of each linked list in the current scheduling cycle according to the scheduling rate of each linked list;
[0008] The requests to be scheduled in each linked list are scheduled according to the scheduling times of each linked list, and credits are allocated to a target scheduling request, wherein the scheduled request is the target scheduling request.
[0009] According to a second aspect of the present application, a network traffic control device is provided, comprising:
[0010] A scheduling rate acquisition module is used to obtain the scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores the request information of the request to be scheduled associated with it;
[0011] A scheduling number determination module, configured to determine the scheduling number of each linked list in a current scheduling period according to the scheduling rate of each linked list;
[0012] The scheduling module is used to schedule the to-be-scheduled requests in each linked list according to the scheduling times of each linked list, and allocate credits to target scheduling requests, wherein the scheduled request is the target scheduling request.
[0013] According to a third aspect of the present application, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions instruct a computer device to perform operations corresponding to the above method.
[0014] The present application provides a network traffic control method and device, a network processor, and a computer program product, which have the following beneficial effects:
[0015] By replacing the multi-level arbitration module with a linked list structure, the timing implementation problems caused by too many levels or a large number of scheduling queues (QP, Queue Pair) in traditional systems are avoided. The linked list method directly associates the "host ID, channel information and queue pair number" corresponding to each queue pair with the linked list node, reducing the complexity of interaction between modules. In addition, the linked list structure supports fast access and update of the queue pair status, and determines the scheduling number of each linked list in the current scheduling cycle based on the scheduling rate of each linked list in the current scheduling cycle. Based on the scheduling number of each linked list, the scheduling requests of each linked list are scheduled, and credits are allocated to the scheduling requests of each linked list, thereby efficiently completing credit allocation.
[0016] Other features and advantages of the present application will be set forth in the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a schematic diagram of a network traffic control method disclosed in the background technology.
[0019] Figure 2 This is a flowchart of a network traffic control method in one embodiment of the present application.
[0020] Figure 3 This is a framework diagram of a network traffic control device in one embodiment of the present application.
[0021] Figure 4 This is a framework diagram of a network traffic control system in one embodiment of the present application. DETAILED DESCRIPTION
[0022] The detailed description of the accompanying drawings is intended to serve as an illustration of the presently preferred embodiment of the present application, and is not intended to represent the only form in which the present application can be implemented. It should be understood that the same or equivalent functions can be accomplished by different embodiments intended to be included within the scope of the present application.
[0023] See Figure 2 One embodiment of the present application provides a network traffic control method, the method comprising:
[0024] Step S10: Obtain the scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores request information of the request to be scheduled associated with it;
[0025] Specifically, different queue pairs (QPs) have different scheduling requirements. Since scheduling resources are limited, in this embodiment, the host can create linked lists with different scheduling rates based on the scheduling requirements of the QP. Each linked list contains several nodes, one node is associated with one request to be scheduled, and one request to be scheduled corresponds to one QP.
[0026] Step S20, determining the number of scheduling of each linked list in the current scheduling cycle according to the scheduling rate of each linked list;
[0027] Specifically, assume the host has three linked lists: High-Speed List HS, Full-Speed List FS, and Low-Speed List LS. The scheduling rate ratio between them is 4:2:1. This means that the High-Speed List has the highest processing power, followed by the Full-Speed List, and finally the Low-Speed List. Based on this 4:2:1 scheduling rate ratio, when scheduling credits, the High-Speed List is scheduled four times as often as the Low-Speed List, and the Full-Speed List is scheduled twice as often as the Low-Speed List.
[0028] The following is the specific scheduling process:
[0029] Assuming that a total of 7 scheduling operations are performed in a scheduling cycle (this number is hypothetical, and the actual number of scheduling operations will be determined based on system requirements and design), based on the scheduling rate ratio of 4:2:1, the number of scheduling operations for the HS, FS, and LS lists in this scheduling cycle can be calculated as follows:
[0030] Number of HS list dispatches = 7 times * (4 / (4+2+1)) = 7*4 / 7 = 4;
[0031] Number of FS list scheduling times = 7 times * (2 / (4+2+1)) = 7*2 / 7 = 2;
[0032] Number of LS list scheduling times = 7 times * (1 / (4+2+1)) = 7*1 / 7 = 1;
[0033] Step S30 , scheduling the requests to be scheduled in each linked list according to the scheduling times of each linked list, and allocating credits to the target scheduling request, wherein the scheduled request is the target scheduling request.
[0034] Specifically, after obtaining the scheduling times of each linked list of the host, scheduling can be performed according to these times. The following is an example of the scheduling process:
[0035] The HS list is scheduled 4 times. Assuming that the HS list has 4 QPs (no priority between QPs), each QP will obtain credit in this cycle. If the number of QPs in the HS list is greater than 4, only 4 QPs will obtain credit in this cycle, and the remaining QPs will obtain credit in subsequent cycles. The FS list is scheduled 2 times. Similarly, assuming that the FS list has 2 QPs (no priority between QPs), each QP will obtain credit according to the number of scheduling times in this cycle. If the number of QPs in the FS list is greater than 2, only 2 QPs will obtain credit in this cycle, and the remaining QPs will obtain credit in subsequent cycles. The LS list is scheduled once. Even if the LS list may have multiple QPs (no priority between QPs), only one QP will obtain credit in this cycle, and the remaining QPs will obtain credit in subsequent cycles.
[0036] Assume that the credit value allocated in each scheduling cycle is fixed. For example, each QP can obtain 100KB of send / receive permission per scheduling. Then in this cycle:
[0037] The QP of the HS linked list can obtain a total credit value of 600KB.
[0038] The QP of the FS linked list can obtain a total credit value of 300KB.
[0039] The QP of the LS list can obtain a total credit value of 100KB.
[0040] Through the above approach, it is possible to ensure that the QP of the high-speed linked list obtains more scheduling opportunities and credit values (the amount of data sent / received), thereby better utilizing its higher processing capacity. At the same time, this also ensures that system resources are allocated according to the predetermined scheduling rate ratio, improving the efficiency and fairness of the overall system.
[0041] Based on the above description, it can be seen that the method of this embodiment replaces the multi-level arbitration module with a linked list structure, avoiding the timing implementation problems caused by too many levels or a large number of scheduling queues (QP) in traditional systems. The linked list method directly associates the "host ID, channel information and queue pair number" corresponding to each queue pair with the linked list node, reducing the complexity of interaction between modules. In addition, the linked list structure supports fast access and update of the status of the queue pair, and determines the number of scheduling of each linked list in the current scheduling cycle based on the scheduling rate of each linked list in the current scheduling cycle. Based on the scheduling number of each linked list, the scheduling requests of each linked list are scheduled, and credits are allocated to the scheduling requests of each linked list, thereby efficiently completing credit allocation.
[0042] In some embodiments, the method further comprises:
[0043] Step S40: Receive and parse the request to be scheduled to obtain corresponding request information and request status; the corresponding request information includes a host ID, a queue pair number (QP_Num), and channel information (Channel_id); the request status includes a credit generation off state (Off) or a credit generation on state (On); when the request status is the credit generation on state, the corresponding request information also includes a scheduling rate (Speed);
[0044] Step S41, when the request state is a credit generation enabled state, determining a target linked list according to the host ID and the scheduling rate, adding a node to the target linked list, and storing the corresponding request information in the added node;
[0045] Step S42: When the request state is the credit generation closed state, determine the target node according to the channel information and the queue pair number, and delete the target node from the corresponding linked list.
[0046] Specifically, the following is a specific example to illustrate the working principle of this embodiment:
[0047] Assume that there is a network system that uses a linked list-based flow control method. There are three hosts in the system, and each host has multiple queue pairs (QPs) for processing network traffic. Now, the scheduling request is processed according to steps S40-S42.
[0048] Assume that the system receives the following request to be scheduled (req_info):
[0049] Request 1: Host ID is Host1, channel ID is Chan1, queue pair number is QP1, and request status is Off.
[0050] Request 2: Host ID is Host2, channel ID is Chan2, queue number is QP4, request status is On, and scheduling rate is HS.
[0051] For request 1, the system parses the host ID as Host1, the channel ID as Chan1, the queue pair number as QP1, and the request status as Off. The system determines the target queue pair QP1 based on the host ID and queue pair number and deletes the node corresponding to QP1 from the high-speed linked list HS, because QP1 was previously active and in the high-speed linked list.
[0052] For request 2, the system resolves the host ID to Host2, the channel ID to Chan2, the queue pair number to QP4, the request state to On, and the scheduling rate to HS. Based on the host ID and scheduling rate, the system determines that the target list is Host2's high-speed list HS. The system adds a node to HS and stores the resolved queue pair number (QP4) in the node. QP4 now becomes an active queue pair in HS and is ready to participate in credit allocation and scheduling.
[0053] Specifically, assume that Host 1's high-speed linked list HS initially contains QP1, QP2, and QP3. Upon receiving Request 1, QP1 is removed from the linked list, and the linked list is updated to include QP2 and QP3. Simultaneously, Host 2's high-speed linked list HS originally contained QP5 and QP6. Upon receiving Request 2, a new node is added to the linked list, storing information about QP4, and the linked list is updated to include QP5, QP6, and QP4. This allows the system to dynamically manage the status of queue pairs, enabling or disabling them based on network traffic demand, thereby achieving flexible flow control.
[0054] For example, node deletion can be done either actively or passively. The active method searches for the corresponding node starting at the head of each linked list and compares them. If the channel ID and queue number match, the search stops, the corresponding node is deleted, and the original linked list is reconnected. The passive method simply records the deleted node information and waits for the subsequent scheduling module to slowly schedule the node. The channel ID and queue number comparison is then performed. While the passive method takes a longer time to delete a node, it can use the wrap_cnt method, which provides rapid feedback on the deleted node. By comparing the wrap_cnt value, the validity of a node can be determined. The linked list can then be removed and repaired. The wrap_cnt method starts with wrap_cnt set to 0. If a close operation is notified, the corresponding QP's wrap_cnt is set to 1. At this point, the linked list storage unit with a wrap_cnt of 0 is considered invalid. Reading and comparing wrap_cnt determines whether the node is valid.
[0055] In some embodiments, determining the number of scheduling times of each linked list in the current scheduling period according to the scheduling rate of each linked list specifically includes:
[0056] The number of times the linked list is scheduled in the current scheduling cycle is proportional to the scheduling rate of the linked list.
[0057] Specifically, high-rate linked lists are generally used for low-latency, high-priority requests, while low-rate linked lists are generally used for high-throughput, low-priority requests. The higher the scheduling rate of the linked list, the more times it is scheduled in the current scheduling cycle. The lower the scheduling rate of the linked list, the fewer times it is scheduled in the current scheduling cycle. This is to achieve a reasonable configuration of the system's limited credit, avoid queue pair (QP) network congestion or resource overload, and prioritize critical business traffic.
[0058] In some embodiments, the corresponding request information further includes weight information;
[0059] The allocating credits to the scheduling requests in each linked list specifically includes:
[0060] If the weight information of any request to be scheduled is n, then scheduling any request to be scheduled requires allocating n unit credit values.
[0061] Specifically, the weight information of the pending scheduling request refers to the weight of the queue pair (QP). In this embodiment, the queue pairs (QPs) corresponding to different nodes in the same linked list can be assigned different weights. As described in the previous embodiment, a linked list can be allocated credits within a scheduling cycle. In this embodiment, a specific method for allocating credits to each QP in the linked list is proposed, namely, allocating a corresponding number of unit credits (unit data volume sent / received) based on the weight information of the pending scheduling request corresponding to each QP.
[0062] In some embodiments, the method further comprises:
[0063] Step S51, receiving and parsing a first display congestion notification (ECN), obtaining a first host ID, first channel information, and a first queue pair number corresponding to the first display congestion notification;
[0064] Specifically, when a queue pair (QP) in the network encounters congestion, it may send an explicit congestion notification (ECN) to the system. After receiving the ECN, the system will parse the notification and extract relevant information, including host ID, channel ID, and queue pair number.
[0065] Step S52: determining a first linked list corresponding to the first explicit congestion notification according to the first host ID, the first channel information, and the first queue pair number, and deleting a node corresponding to the explicit congestion notification from the first linked list;
[0066] Step S53: Adding a node corresponding to the first explicit congestion notification to the second linked list, wherein the scheduling rate of the first linked list is greater than the rate of the second linked list;
[0067] Specifically, based on the parsed host ID, channel ID, and queue pair number, the system determines the target node of the affected data flow, and the system will migrate the target node from its current linked list to the linked list of the next level rate. The host maintains multiple linked lists with different rates, each of which represents a different data transmission rate. When the node is migrated to the linked list of the next level rate (i.e., the deleted node in step S52 and the newly added node in step S53), for example, it is migrated from the high-speed linked list HS to the full-speed linked list FS, or from the full-speed linked list FS to the low-speed linked list LS.
[0068] In some embodiments, the method comprises:
[0069] Step S54: when the first display congestion notification is received, start a timer, and if a second display congestion notification corresponding to the first queue pair number is received again before the timer reaches a preset time, block the second display congestion notification;
[0070] Specifically, when the system receives an explicit congestion notification (ECN) for any queue pair, it starts a timer. The preset time is a predefined interval used to determine when ECN messages from the same queue pair can be processed again. If the system receives another ECN message from the same queue pair before the preset time is reached, the system will filter / screen this notification, that is, it will not process it. This avoids multiple speed reductions for the same queue pair due to receiving multiple ECN messages in a short period of time. This may cause the transmission rate of the queue pair to be excessively reduced, affecting network performance. By ignoring repeated ECN messages, network adjustments become smoother and the transmission rate adjustments of the queue pair will not be too aggressive. In some cases, network congestion may be short-lived, and continuous ECN messages may be caused by instantaneous network fluctuations. The filtering mechanism helps to reduce the impact of such false positives.
[0071] Step S55: If the second congestion indication notification corresponding to the first queue pair number is not received again within the preset time, the node corresponding to the first congestion indication notification is deleted from the second linked list, and the node corresponding to the first congestion indication notification is added to the first linked list;
[0072] Specifically, when the system receives an explicit congestion notification (ECN) from any queue pair, it starts a timer. The preset timer is a predefined interval used to determine when ECN messages from the same queue pair can be processed again. If the system does not receive another ECN message from the same queue pair before the preset timer expires, indicating that the network congestion for the queue pair has been eliminated or alleviated, the original rate of the queue pair should be restored, and the target node should be migrated from its current linked list to the linked list of the previous level, for example, from the full-speed linked list FS to the high-speed linked list HS, or from the low-speed linked list LS to the full-speed linked list FS.
[0073] Another embodiment of the present application provides a network traffic control device, such as Figure 3 As shown, the device includes:
[0074] Scheduling rate acquisition module 1, used to obtain the scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores the request information of the request to be scheduled associated with it;
[0075] Scheduling times determination module 2, configured to determine the scheduling times of each linked list in the current scheduling period according to the scheduling rates of each linked list;
[0076] The scheduling module 3 is configured to schedule the to-be-scheduled requests in each of the linked lists according to the scheduling times of the linked lists, and allocate credits to target scheduling requests, wherein the scheduled requests are the target scheduling requests.
[0077] In some embodiments, the apparatus further comprises:
[0078] a scheduling request receiving module, configured to receive and parse a request to be scheduled to obtain corresponding request information and request status; the corresponding request information includes a host ID, a queue pair number, and channel information; the request status includes a credit generation disabled state or a credit generation enabled state; and when the request status is a credit generation enabled state, the corresponding request information further includes a scheduling rate;
[0079] a linked list node adding module, configured to, when the request state is a credit generation enabled state, determine a target linked list according to the host ID and the scheduling rate, add a new node to the target linked list, and store the corresponding request information in the newly added node;
[0080] The linked list node deletion module is used to determine the target node according to the channel information and the queue pair number when the request status is the credit generation closed state, and delete the target node from the corresponding linked list.
[0081] In some embodiments, the corresponding request information further includes weight information;
[0082] The scheduling module is configured to allocate n credit values to schedule the request if the weight information of the request to be scheduled is n.
[0083] In some embodiments, the apparatus further comprises a congestion notification receiving module;
[0084] The congestion notification receiving module is configured to receive and parse a first display congestion notification, and obtain a first host ID, first channel information, and a first queue pair number corresponding to the first display congestion notification;
[0085] The linked list node deletion module is further configured to determine a first linked list corresponding to the first explicit congestion notification according to the first host ID, the first channel information, and the first queue pair number, and delete the node corresponding to the explicit congestion notification from the first linked list;
[0086] The linked list node adding module is further configured to add a node corresponding to the first explicit congestion notification to the second linked list, wherein a scheduling rate of the first linked list is greater than a rate of the second linked list.
[0087] In some embodiments, the congestion notification receiving module is further configured to start a timer when the first display congestion notification is received, and if a second display congestion notification corresponding to the first queue pair number is received again before the timer reaches a preset time, then shield the second display congestion notification;
[0088] The linked list node deletion module is further configured to delete the node corresponding to the first queue congestion notification from the second linked list if the display congestion notification corresponding to the first queue pair number is not received again within a preset time.
[0089] The linked list node adding module is further configured to add a node corresponding to the first displayed congestion notification to the first linked list if the displayed congestion notification corresponding to the first queue pair number is not received again within a preset time.
[0090] The network traffic control device of this embodiment can be applied to the credit scheduling of multiple hosts. For example, it can be designed as follows: Figure 4 The system shown is configured with a corresponding number of network flow control devices according to the number of hosts, for example, Host_0 network flow control device, Host_1 network flow control device, ..., Host_0 network flow control device. Each network flow control device is respectively used to process the scheduling request of the corresponding host (Host_0, Host_1, ..., Host_N), display congestion notification, and manage the linked list, read the linked list information from the linked list of the corresponding host, and schedule the scheduling request according to the linked list information, thereby realizing the functions of the network flow control device of the above embodiment and executing the steps of the network flow control method of the above embodiment.
[0091] exist Figure 4 In the example, the linked list unit includes each linked list of each host.
[0092] exist Figure 4 In the embodiment, the status request FIFO is used to cache the received requests to be scheduled, and dequeue and process the requests to be scheduled according to the first-in-first-out principle. The dequeued requests to be scheduled are passed to the network traffic control device of the corresponding host for processing, that is, executing steps S40, S41 and S42 in the above embodiment method.
[0093] exist Figure 4 In the embodiment, the ECN request register is used to cache the explicit congestion notification (ECN) of each queue pair and then pass it to the network flow control device of the corresponding host. The network flow control device executes steps S51, S52, S53, S54 and S55 in the above embodiment method according to the received explicit congestion notification (ECN).
[0094] exist Figure 4In the network traffic control device of each host, a host-level scheduler is included, which schedules the scheduled requests associated with the linked list nodes of each host respectively. The scheduled requests determined by the scheduling will enter the scheduled request FIFO of the corresponding host and wait for dequeueing. Each host has a corresponding scheduled request FIFO (Host_0 scheduled request FIFO, Host_1 scheduled request FIFO, ..., Host_N scheduled request FIFO).
[0095] exist Figure 4 In the process, the RR scheduler is further used to perform RR scheduling on each scheduled request FIFO to determine which scheduled request FIFO currently performs the dequeue operation.
[0096] exist Figure 4 In [1], the Shaper controller is used to set the traffic rate limit for each host (Host_0, Host_1, ..., Host_N). The sum of the credits of all current QPs on any host cannot exceed the set host traffic rate limit. The traffic rate limit can limit the rate at which the host sends traffic. This rate limit is implemented through software configuration, and administrators can adjust the rate limit settings for each host in real time without changing the hardware. Because the rate limit is configurable, when the administrator adjusts the rate limit settings of a host, the credits generated by the host will also change accordingly. Credit is a resource in the traffic control system that is used to control the amount of data that a queue pair (QP) can send. For example, if a host's rate limit is increased, it may obtain more credits, allowing its queue pair to send more data.
[0097] Another embodiment of the present application provides a network processor, including the network traffic control device described in the above embodiment.
[0098] Another embodiment of the present application provides a computer program product, including computer program instructions, wherein the computer program instructions instruct a computer device to execute operations corresponding to the network traffic control method described in the above embodiment.
[0099] Specifically, the computer program product includes a series of computer program instructions. These computer program instructions are codes written in a computer program that define how to perform specific operations. These computer program instructions are designed to be loaded onto a computer device and instruct the device to perform specific operations, which are the steps in the network traffic control method described in the above embodiment. In this way, the computer program product of this embodiment provides a complete software solution that can be run on various computer devices to implement the network traffic control method described in the above embodiment.
[0100] While various embodiments of the present application have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many updates and modifications will be readily apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A network traffic control method, characterized in that: The method comprises: Obtaining a scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores request information of the request to be scheduled associated with it; Determine the number of scheduling of each linked list in the current scheduling cycle according to the scheduling rate of each linked list; The requests to be scheduled in each linked list are scheduled according to the scheduling times of each linked list, and credits are allocated to a target scheduling request, wherein the scheduled request is the target scheduling request.
2. The network traffic control method according to claim 1, wherein: The method further comprises: Receive and parse the request to be scheduled to obtain corresponding request information and request status; the corresponding request information includes a host ID, a queue pair number, and channel information; the request status includes a credit generation closed state or a credit generation open state; when the request status is a credit generation open state, the corresponding request information also includes a scheduling rate; When the request state is a credit generation enabled state, determining a target linked list according to the host ID and the scheduling rate, adding a new node to the target linked list, and storing the corresponding request information in the new node; When the request state is a credit generation closed state, a target node is determined according to the channel information and the queue pair number, and the target node is deleted from the corresponding linked list.
3. The method according to claim 1, characterized in that Determining the number of scheduling times of each linked list in the current scheduling period according to the scheduling rate of each linked list specifically includes: The number of times the linked list is scheduled in the current scheduling cycle is proportional to the scheduling rate of the linked list.
4. The method according to claim 2, characterized in that The corresponding request information also includes weight information; The allocating credits for the scheduling request specifically includes: If the weight information of the scheduling request is n, then scheduling any of the pending scheduling requests requires allocating n unit credit values.
5. The network traffic control method according to claim 2, wherein: The method further comprises: Receive and parse a first display congestion notification, and obtain a first host ID, first channel information, and a first queue pair number corresponding to the first display congestion notification; determining a first linked list corresponding to the first explicit congestion notification according to the first host ID, the first channel information, and the first queue pair number, and deleting a node corresponding to the explicit congestion notification from the first linked list; A node corresponding to the first explicit congestion notification is added to the second linked list, wherein a scheduling rate of the first linked list is greater than a rate of the second linked list.
6. The network traffic control method according to claim 5, characterized in that: The method comprises: When the first display congestion notification is received, a timer is started, and if a second display congestion notification corresponding to the first queue pair number is received again before the timer reaches a preset time, the second display congestion notification is blocked; If the second congestion display notification corresponding to the first queue pair number is not received again within the preset time, the node corresponding to the first congestion display notification is deleted from the second linked list, and the node corresponding to the first congestion display notification is added to the first linked list.
7. A network traffic control device, characterized in that: The device comprises: A scheduling rate acquisition module is used to obtain the scheduling rate of each linked list of the host, wherein each linked list includes at least one node, each node is associated with a request to be scheduled, and the node stores the request information of the request to be scheduled associated with it; A scheduling number determination module, configured to determine the scheduling number of each linked list in a current scheduling period according to the scheduling rate of each linked list; The scheduling module is used to schedule the to-be-scheduled requests in each linked list according to the scheduling times of each linked list, and allocate credits to target scheduling requests, wherein the scheduled request is the target scheduling request.
8. The network traffic control device according to claim 7, characterized in that: The device further comprises: a scheduling request receiving module, configured to receive and parse a request to be scheduled to obtain corresponding request information and request status; the corresponding request information includes a host ID, a queue pair number, and channel information; the request status includes a credit generation disabled state or a credit generation enabled state; and when the request status is a credit generation enabled state, the corresponding request information further includes a scheduling rate; a linked list node adding module, configured to, when the request state is a credit generation enabled state, determine a target linked list according to the host ID and the scheduling rate, add a new node to the target linked list, and store the corresponding request information in the newly added node; The linked list node deletion module is used to determine the target node according to the channel information and the queue pair number when the request status is the credit generation closed state, and delete the target node from the corresponding linked list.
9. The device according to claim 8, characterized in that The corresponding request information also includes weight information; The scheduling module is configured to allocate n unit credit values to schedule the request if the weight information of the request to be scheduled is n.
10. The network traffic control device according to claim 8, characterized in that: The apparatus further includes a congestion notification receiving module; The congestion notification receiving module is configured to receive and parse a first display congestion notification, and obtain a first host ID, first channel information, and a first queue pair number corresponding to the first display congestion notification; The linked list node deletion module is further configured to determine a first linked list corresponding to the first explicit congestion notification according to the first host ID, the first channel information, and the first queue pair number, and delete the node corresponding to the explicit congestion notification from the first linked list; The linked list node adding module is further configured to add a node corresponding to the first explicit congestion notification to the second linked list, wherein a scheduling rate of the first linked list is greater than a rate of the second linked list.
11. The network traffic control device according to claim 10, characterized in that: The congestion notification receiving module is further configured to start a timer when the first display congestion notification is received, and if a second display congestion notification corresponding to the first queue pair number is received again before the timer reaches a preset time, shield the second display congestion notification; The linked list node deletion module is further configured to delete the node corresponding to the first queue congestion notification from the second linked list if the display congestion notification corresponding to the first queue pair number is not received again within a preset time. The linked list node adding module is further configured to add a node corresponding to the first displayed congestion notification to the first linked list if the displayed congestion notification corresponding to the first queue pair number is not received again within a preset time.
12. A network processor, characterized in that: A network traffic control device comprising any one of claims 7 to 11.
13. A computer program product, characterized in that The method comprises computer program instructions, wherein the computer program instructions instruct a computer device to perform operations corresponding to the method according to any one of claims 1 to 6.