Flow-based rate limiting

By allocating a dedicated sending queue for each communication flow in the cloud network and implementing flow rate limiting, network congestion and security issues in the cloud network are solved, and fine management and security assurance of tenant communication flows are achieved.

CN108881065BActive Publication Date: 2024-08-27INTEL CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201810410087.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2017-05-08
Filing Date
2018-04-27
Publication Date
2024-08-27
Estimated Expiration
2038-04-27

AI Technical Summary

Technical Problem

In a cloud network environment, it is difficult for existing technologies to implement fine-grained rate limiting for each tenant's communication flow, leading to network congestion and security issues. Especially when multiple destination communication flows exist, it is difficult to effectively manage and prevent malicious code. attack.

Method used

Adopt a flow-based rate limiting mechanism, allocate a dedicated sending queue to each flow through the sending pipeline and scheduler in the network interface card, and implement flow rate limiting based on the source and destination tuples of the flow to ensure the security and safety of data transmission. efficiency.

Benefits of technology

Enables fine-grained rate control for each communication flow, reducing network congestion, enhancing security, preventing the spread of malicious data, and improving the overall performance and reliability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108881065B_ABST
    Figure CN108881065B_ABST
Patent Text Reader

Abstract

A mechanism for maintaining flow rate limits in a service operating in a single root input / output virtualization (SR‑IOV) environment is disclosed. A send pipeline assigns a dedicated send queue to a flow. A scheduler assigns flow send bandwidth to the dedicated send queue to implement flow rate limits. The send pipeline assigns the dedicated send queue to the flow after receiving packets of the flow. A queue identifier (ID) for the dedicated send queue is forwarded to a lease process that is a source of the flow to support forwarding packets of the flow to the correct send queue. The send pipeline maintains security by comparing the packet destination of the packet with the destination of the flow associated with the dedicated send queue. Packets in a dedicated destination queue that have a destination that does not match the destination of the flow can be discarded.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] In a cloud network environment, multiple entities communicate via common channels. For example, various software entities may operate on common hardware. Thus, such entities must share hardware in a manner that allows each entity to perform its intended function without excessive delay. Various communication protocols allow data to be communicated between entities across a cloud network. However, routing data for each entity without considering the communication of other entities may result in traffic congestion, communication delays, and / or data loss in the form of packet loss due to memory space limitations, timeouts, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0002] The concepts described in this application are depicted by way of example and not by way of limitation in the accompanying drawings. For simplicity and clarity of illustration, elements are not depicted to scale in the drawings unless otherwise noted.

[0003] Figure 1 is a schematic diagram of an example of a cloud network.

[0004] Figure 2 is a diagram of an example architecture for applying flow rate limiting to flows.

[0005] Figure 3 A mechanism for implementing port rate limiting, lease rate limiting, and flow rate limiting in the scheduler using credits is depicted.

[0006] Figure 4 is a schematic diagram of a system for applying port rate limiting, lease rate limiting, and flow rate limiting to communications leaving a server.

[0007] Figure 5 is a flow chart of an example method for applying a flow rate limit to a flow.

[0008] Figure 6 is a schematic diagram of an example server for use in a cloud network. DETAILED DESCRIPTION

[0009] Although the concept of the present disclosure is susceptible to various modifications and alternative forms, specific embodiments thereof have been shown in the drawings by way of example and will be described in detail in this application. However, it should be understood that there is no intention to limit the concept of the present disclosure to the specific form disclosed, but on the contrary, it is intended to cover all modifications, equivalents and alternatives consistent with the present disclosure and the appended claims.

[0010] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but each embodiment may necessarily or necessarily include the particular feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, such feature, structure, or characteristic may be employed in conjunction with another disclosed embodiment regardless of whether such feature is explicitly described in conjunction with such other disclosed embodiment.

[0011] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions (e.g., computer program products) carried by or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. A machine-readable storage medium is implemented as any storage device, mechanism, or other physical structure (e.g., volatile or non-volatile memory, media disc, or other media device) for storing or sending information in a machine-readable form.

[0012] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, such features may be arranged in a manner and / or order that is different from the manner and / or order shown in the illustrative drawings. In addition, the inclusion of structural and method features in a particular drawing does not imply that such features are required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0013] In a virtualized cloud service provider network, the hypervisor layer can provide communication services such as packet monitoring, metering, and modification based on tunneling schemes / rules. At higher speeds (e.g., greater than 40 Gigabits per second (Gbps)), single root input / output virtualization (SR-IOV) is used to isolate and dedicate peripheral component interconnect high-speed (PCI-E) resources to the corresponding lease process. In such a system, the system hardware can perform communication services in a trusted mode to increase the speed. Such services may include applying access control lists (ACLs) to discard or allow communication flows based on control plane policies, managing tunnel endpoints to modify packet headers to include tunnel information, and providing rate limits and / or bandwidth guarantees to communication flows based on quality of service (QoS) requirements. Such rate limits can be used to manage network congestion. For example, port rate limits can limit the amount of data transmitted across ports from a specified server. In addition, by limiting the amount of data transmitted from the lease process, a lease rate limit can be applied to limit the amount of data transmitted by the specified lease process. However, there may be situations where a finer granularity rate limit can be expected. For example, a lease process (e.g., a virtual machine (VM), a container, etc.) may simultaneously maintain multiple communication flows with multiple destinations. In such a case, even if both the port and lease rate limits satisfy the corresponding tenants, a particular flow may cause network congestion downstream. Rate limiting based on a per-flow basis presents certain challenges. For example, allowing each tenant to limit the rate of its own flow may be unsatisfactory because such a scheme would require that each tenant be considered a trusted entity. Such a scheme would provide security considerations in the event that a tenant becomes compromised by malicious code and presents a danger to other tenants. In addition, because hardware components must browse the packet header before determining which flow the packet belongs to, a pure hardware implementation for rate limiting may be unsatisfactory. In this way, preprocessing of a certain number of packets must occur before scheduling, which results in the need to use dual schedulers, a large amount of on-chip storage for partially retrieved and postponed packets, and a complex processing structure. In addition, unless a multi-scheduler coordination mechanism is adopted, such a scheme may output packets out of order.

[0014] Disclosed in the present application is a flow-based rate limiting mechanism that overcomes the above concerns. A corresponding dedicated send queue is assigned to a flow based on the flow destination. Then, a flow rate limit is applied to the queue to control the send rate of the flow contained in the queue. The send pipeline and scheduler in the network interface card can be used to implement the flow rate limit. The send pipeline and scheduler receive the flow rate for the flow from the hypervisor. When the first packet for the flow is received by the send pipeline, the send pipeline assigns a dedicated send queue to the flow. For example, a parser in the send pipeline determines a connection entry identifier (ID) associated with the flow and maps the connection entry ID to the queue ID of the dedicated send queue. Then, the send queue ID is forwarded back to the lease process used as the source of the flow. The lease process directs the flow to the dedicated send queue based on the send queue ID. The scheduler allocates flow send bandwidth to the dedicated send queue to implement flow rate limiting. Flows are assigned to the dedicated send queue based on source and destination tuples, tunnel IDs, etc. In addition, the send pipeline can implement security for flows traversing the dedicated send queue. For example, the send pipeline can compare the packet destination with the destination of the flow assigned to the dedicated send queue. If the destination is different, the packet is potentially malicious (e.g., attempting to avoid flow rate limiting) and can be dropped. Repeated packet drops can indicate a compromised lease process, and the send pipeline can interrupt service to the tenant and provide an alert to the administrator to maintain the integrity of the remaining network.

[0015] Figure 1 1 is a schematic diagram of an example of a cloud network 100 that may be hosted in a data center. It should be noted that the cloud network 100 is simplified for clarity of discussion and that the cloud network in operation employs a plurality of Figure 1 . The cloud network 100 provides network services to the leasing process 113 and / or the end user. Such services may include computing services, security services, storage services, communication services, hosting services, etc. The cloud network 100 includes servers, such as a local server 110 and a remote server 140 coupled via a network of switches 130. The servers may also be coupled via additional routers, gateways, cables, optical cables, etc. The local server 110 includes a hypervisor 111 for managing system virtualization. The local server 110 operates in SR-IOV 112 mode and thus provides dedicated communication resources (e.g., VMs) for the leasing process 113. The leasing process 113 communicates outside the local server 110 via a network interface card (NIC) 120 coupled to one or more ports 121.

[0016] The local server 110 may be a computing device that provides computing and / or storage services. The local server 110 includes various hardware resources for providing such services. For example, such hardware resources may include a processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a cache memory, a read-only memory (ROM), a random access memory (RAM), network communication resources, etc. The local server may be used to operate multiple rental processes 113 (e.g., VMs, containers, applications, etc.) on hardware resources. The local server 110 uses tenants 113 to execute instructions to provide the services of the local server 110. The rental process 113 may be a component that is divided and / or virtualized and operated by using the hardware resources of the local server 110. For example, the rental process 113 may include VMs, containers, etc. The local server 110 may operate in SR-IOV112 mode. SR-IOV 112 is a hardware operation mode in which communication-related hardware resources such as PCI-E communication resources are isolated and dedicated to the corresponding tenants 113 to increase the operating speed. Specifically, SR-IOV 112 is a specification that allows multiple processes to use a single PCI-E interface while bypassing direct access to the corresponding hypervisor 111. This allows reducing signaling overhead and increasing communication speed. The local server 110 can operate the hypervisor 111. The hypervisor 111 is a software, firmware, and / or hardware component that creates, manages, and / or operates a leased process 113. The hypervisor 111 can be used as an operating platform for the leased process 113. For example, the hypervisor 111 can create, configure, manage, and / or delete a leased process, such as by allocating and configuring communication hardware resources for a tenant via managing SR-IOV 112.

[0017] The lease process 113 communicates with a remote entity outside the local server 110 via a network interface card (NIC) 120. The NIC 120 can be coupled to the local server 110. For example, the NIC 120 can be coupled to a hardware resource that operates the lease process 113, in some cases via a PCI-E bus. The NIC 120 is any computer hardware component that couples a computer such as the local server 110 to a network. The NIC 120 includes a transmit pipeline for processing packets from the lease process 113 during transmission over the network (e.g., transmission to the remote server 140). The NIC 120 also includes a receive pipeline for processing packets received via the network (e.g., received from the remote server 140). The NIC 120 also includes a memory organized as a queue for storing packets being sent and / or received during processing. The NIC 120 also includes one or more ports 121. The port 121 is an endpoint of communication. Port 121 may be a hardware connector and / or logic component operating on hardware for identifying processes and / or network services. For example, port 121 may be divided into a plurality of logical ports associated with an address such as an Internet Protocol (IP) address, and the corresponding port number is associated with a specified network service. Port 121 may be shared by a leased process 113 for transmitting data across a network.

[0018] The remote server 140 can be substantially similar to the local server 110. It should be noted that the terms local and remote are labels used for the purpose of discussion clarity. As used in this application, local indicates a communication entity and remote indicates an entity that exchanges data with the communication entity. The remote server 140 includes a lease process 141, which is substantially similar to the lease process 113. The lease processes 113 and 141 communicate via a network of switches 130. The switch 130 can be any network component that forwards packets / frames and / or streams 131-132 of packets / frames between the servers 110 and 140, for example, via cables and / or optical cables. Streams 131-132 are any sequence of related packets / frames between common endpoints, for example, as part of a communication session between the local lease process 113 and the remote lease process 141.

[0019] Network congestion may occur across the network of switches 130 when communications between a specified set of endpoints monopolize network resources by using so much bandwidth that communications between other endpoints are impaired. Rate limiting is used to reduce congestion by maintaining a maximum data transfer over time between endpoints, which achieves fairness between communications. For example, port rate limiting implements a maximum bandwidth limit that can be allocated to communications traversing port 121. Port rate limiting ensures that the local server 110 does not monopolize bandwidth to the detriment of other unrelated servers communicating across the network 100. In addition, lease rate limiting can be used as a subset of port rate limiting. Lease rate limiting implements a maximum bandwidth limit that can be allocated to a specified lease process 113. Lease rate limiting ensures that no lease process 113 monopolizes bandwidth to the detriment of other lease processes 113.

[0020] NIC 120 also implements rate limiting per stream 131-132. In some cases, congestion may occur in switch 130 due to stream 131 or 132 using most of the bandwidth allocated to local server 110 and leasing process 113. For example, when considered together, streams 131-132 between leasing process 113 and leasing process 141 can comply with port rate limiting and leasing rate limiting. However, stream 131 can use most of the bandwidth allocated to port 121 and leasing process 113, while stream 132 can use a relatively small amount of bandwidth. Such a scenario can lead to congestion along the network path of transmission stream 131, while the network path of transmission stream 132 is not fully utilized. Stream rate limiting (e.g., communication bandwidth rate limiting applied on a per-stream basis) allows a single stream such as stream 131 to receive a limited bandwidth allocation to resolve congestion specific to the stream. An example mechanism for implementing stream rate limiting is discussed in more detail below.

[0021] It should be noted that for the purpose of discussing the embodiments disclosed in this application, cloud network 100 is depicted as a greatly simplified diagram. Those skilled in the art will recognize that cloud network 100 includes many additional components that are not directly related to the embodiments discussed in this application. Such components may still be desirable for the proper operation of cloud network 100. The present disclosure should be interpreted as including all such components and / or features as needed to support the operation of the embodiments disclosed in this application.

[0022] Figure 22 is a schematic diagram of an example architecture 200 for applying flow rate limiting to flows (e.g., flows 131-132 of network 100). Architecture 200 may be partially included in a NIC such as NIC 120. Architecture 200 includes a lease process 213, a memory 222 organized into a plurality of transmit queues 223, a scheduler 221 coupled to the transmit queues 223, and a transmit pipeline 225 including a parser 226 and a communication endpoint (EP) 227. Lease process 213 is substantially similar to lease process 113 and operates on hardware such as one or more processors and / or processor clusters in a server (e.g., local server 110). The NIC including scheduler 221, memory 222, and Tx pipeline 225 is coupled to lease process 213 via an interface such as a PCI-E interface, an on-chip interface, etc. An interface may be a mechanism for communicating between hardware components. It should be noted that the NIC can be an expansion card, a separate chip on a separate die, part of a system on a chip (SoC), and / or an interface integrated with the processor on a common die.

[0023] Memory 222 is any memory for storing data transmitted between the lease process 213 and the NIC via an interface. For example, packets traversing the interface are stored in memory 222 while waiting for further processing before being transmitted over the network. The lease process 213 can write packets to memory 222 via direct memory access (DMA). Memory 222 is organized into send queues 223. The send queues 223 store packets from tenants operating on the server until such packets can be sent across the network. The order of transmission from the send queues can be determined by the scheduler 221. The send queues 223 include a default queue 228. For resource management purposes, the lease process 213 can communicate with the send queues 223 via a PCI-Express physical function (PF). When a send queue 223 has not yet been assigned to a connection, for example, to carry a stream, a stream packet from the lease process 213 can be sent to the default queue 228.

[0024] The packets in the default queue 228 are transmitted to the Tx pipeline 225 coupled to the transmit queue 223. The Tx pipeline 225 includes many components and has been simplified for the purpose of clarity. In addition to other components, the Tx pipeline 225 may include a parser 226 and an EP 227. The parser 226 is any component designed to browse the packet routing (or frame switching) information from the packet / frame header. The parser 226 browses the packets from the default queue 228 to determine the connection entry ID associated with the packet flow. The parser accesses / maintains the mapping table that associates the connection to the dedicated transmit queue 224 on the NIC, which will be discussed in more detail below. After receiving the packet of the flow in the default queue 228, the parser obtains the connection entry ID associated with the flow from the packet. If the connection entry ID of the packet from the default queue 228 is associated with the dedicated transmit queue 224, the parser 226 can determine that the packet is in the wrong transmit queue 223 and discards the packet because the packet may be malicious. For any packets that are not dropped, the connection entry ID is forwarded to EP 227. It should also be noted that a rate limit may be assigned to the default queue 228 to reduce the likelihood that malicious programs will attempt to violate the non-dedicated nature of the default queue 228. It should be noted that the parser 226 may also browse packets from the dedicated transmit queue 224 and may drop packets in the erroneous dedicated transmit queue 224.

[0025] EP 227 is any component used as a communication endpoint, for example, as an endpoint of a communication tunnel. For example, EP 227 can be used as an IP tunnel endpoint for communicating between a local server and a remote server across an IP network. EP 227 is designed to perform actions related to various streams based on the connection entry ID from parser 226. When receiving the connection entry ID for a new stream, EP 227 assigns at least one of a plurality of send queues 223 to the stream as a dedicated send queue 224. Each stream can be defined according to a tuple. Tuples include the source (e.g., lease process 213) of a stream and the destination (e.g., remote server / lease process) of a stream. Thus, a dedicated send queue 224 can be assigned based on the destination of the stream, based on the source / destination tuple of the stream and / or based on tunnels (e.g., tunnel rules / schemes) associated with the stream such as IP tunnels, virtual local area networks (VLAN) tunnels, virtual extensible local area networks (VXLAN) tunnels, etc. For example, EP 227 can assign the send queue 223 as a dedicated send queue 224 by the following operations: determining the queue ID of the unused queue 223; mapping the connection entry ID from the parser 226 to the queue ID of the unused send queue 223 to assign the queue as a dedicated send queue 224; and storing the mapping in a mapping table on the NIC. EP 227 can also transmit the dedicated send queue 224 to the source of the flow. For example, EP 227 can send the queue ID of the dedicated send queue 224 to the lease process 213 (and / or the hypervisor) so that the lease process 213 addresses the further packets of the flow to the specified dedicated send queue 224. In such a case, the queue ID of the dedicated send queue can be sent as part of the completion message after the packet is sent from the default queue 228. As another example, each time a flow packet is received from a remote entity, the send queue ID can be forwarded to the corresponding source. The send queue ID can be stored in the programmable metadata in the received packet. In another example, each time a packet is received from a source via an interface, the send queue ID can be sent to the source. The source (eg, the lease process 213) may store the queue ID as part of the connection context structure, such as in the socket and / or a private hash / lookup table.

[0026] Once the stream is assigned to the dedicated transmit queue 224, the scheduler 221 can manage the stream according to the flow rate by managing the rate of the packets sent from the dedicated transmit queue 224. Before receiving the first stream packet, the flow rate limit for the stream can be received. For example, the flow rate can be received from a management program such as a management program 111 of the management program of the source of the management program 111 that manages the lease process 213 operated on the local server 110 and used for the stream. EP 227 can receive the flow rate, and when assigning the dedicated transmit queue 224, the flow rate limit is related to the stream. Thus, EP 227 can assign the dedicated transmit queue 224 to the stream based on the flow rate limit. Therefore, the Tx pipeline 225 can send the flow packet from the dedicated transmit queue 224 through the network, for example, via a port such as port 121. The Tx pipeline 225 can send packets from the dedicated transmit queue 224 according to the instruction from the scheduler 221, and thus the port rate limit, the lease rate limit and the flow rate limit can be implemented.

[0027] Scheduler 221 is any component designed to arbitrate packet / frame switching in a communication network.Scheduler 221 can be coupled to transmit queue 223.Scheduler 221 can also receive, for example, port rate limits for ports, lease rate limits for leased processes 213, and stream rate limits for streams from a hypervisor.Scheduler 221 distributes the transmit bandwidth from transmit queue 223 across Tx pipeline 225.Such distribution is performed based on various rate limits.Thereby, scheduler 221 distributes stream transmit bandwidth to dedicated transmit queue 224, to implement stream rate limits for the streams assigned to the dedicated transmit queue.

[0028] In summary, by assigning a specified flow from the lease process 213 to a dedicated transmit queue 224, the scheduler 221 and the Tx pipeline 225 can apply a flow-specific rate limit to the flow. The flow rate limit can be applied without requiring the NIC to browse the header of the packet before scheduling or maintaining a dual scheduling system. In addition, the NIC can maintain security by causing the parser 226 to discard packets sent to the wrong transmit queue 223. In addition to discarding packets that are incorrectly sent to the default queue 223, the parser 223 can also discard packets that are sent to an incorrect dedicated transmit queue 224. For example, the parser 223 can periodically check packets in various transmit queues 223 such as a dedicated transmit queue 224 and / or a default queue 228. When the destination of an outflow packet from a dedicated transmit queue 224 does not match the destination of the flow associated with the dedicated transmit queue 224, the parser 223 can discard the outflow packet. In addition, the parser 223 may discard an outgoing packet from the default queue 228 when the outgoing packet is part of a flow assigned to one of the dedicated transmit queues 224. In other words, for each packet in the incorrect transmit queue 223, the parser 226 discards the packet and / or notifies the scheduler 221 and / or other components in the Tx pipeline 225.

[0029] It should also be noted that the architecture 200 can be configured to change the lease process 213 associated with a dedicated transmit queue 224 in operation. For example, a flow being transmitted from an initial source can be dynamically moved to a second source (e.g., between lease processes 213). In such a case, the Tx pipeline 225 can receive instructions for such a move (e.g., from a hypervisor, one or more of the lease processes 213, etc.), such as at the parser 226 and / or via the scheduler 221. The Tx pipeline 225 can reassign the dedicated transmit queue 224 of the flow from the initial source to the second source to change the association of the flow.

[0030] Figure 3A mechanism 300 for implementing port rate limiting, lease rate limiting, and flow rate limiting in a scheduler such as scheduler 221 using credits is depicted. The scheduler receives a port, a lease process, and a flow rate limit, and assigns corresponding port credits 360, lease credits 361, and queue credits, respectively. The credits indicate the amount of bandwidth that can be allocated to communications affected by the corresponding limits. For example, a port credit 360 can be assigned to a port to ensure that the aggregate data sent through the port does not exceed the port rate limit. Since multiple lease processes can communicate through the same port, the port credit 360 can be subdivided into lease credits 361 between tenants. Lease credits are set according to the lease rate limit. Such a scheme ensures that a tenant does not exceed its lease rate limit and that the aggregate communication of the tenant does not exceed the port rate limit. Since multiple flows may originate from the same lease process, the lease credit 361 is subdivided in the queue credit 363 for the above flow. The queue credit 363 is assigned according to the corresponding flow rate limit. Therefore, queue credit 363 guarantees that stream is limited by its flow rate limit, and does not exceed the lease rate limit for the corresponding lease process and does not exceed the port rate limit for the port. Like this, when the packet stored in the transmit queue is sent by the port, the scheduler can implement the port rate limit for communication via the port, the lease rate limit for communication from the lease process used as the source of the stream, and the flow rate limit for the stream stored in the dedicated transmit queue. In addition, the port rate limit is set to a value greater than the lease rate limit. The lease rate limit is also set to a value greater than the flow rate limit.

[0031] Figure 44 is a schematic diagram of a system 400 for applying port rate limiting, lease rate limiting, and flow rate limiting to communications leaving a server such as local server 110. System 400 depicts the composite functionality of architecture 200. Local server 110 may use VM 413 as a leasing process. VM 413 communicates via NIC 420 and SR-IOV NIC resource 412 dedicated to VM 413. Such communication may occur via PCI-E interface 427. From the leasing process perspective, VM 413 communicates via NIC 420 by communicating with a virtual machine device queue (VMDQ) in VM soft switch 470. Flows traversing VMDQ 471 are depicted as thick arrows. VM soft switch 470 routes packets in VMDQ 471 according to send queue 428. Send queue 428 is used to schedule packets sent through port 421 according to the lease rate limit. From the perspective of the flow, VM 413 communicates via SR-IOV NIC resource 412, as shown by the non-bold arrow. Such routing is handled by hardware and can be handled in a manner transparent to VM soft switch 470. System 400 uses flow table 472 to assist in managing such flows. The flow traverses send queue 428. As shown, at the hardware level, the flow receives a separate send queue 428, even when the flow comes from a public VM 413. As described above, a separate send queue 428 can be implemented using a dedicated send queue 224. The flow receives a per-target flow rate limit, where the target is a destination, network and / or tunnel. Such a scheme allows system 400 to respond to congestion, even when the rate limit based on the port and / or lease process is not exceeded.

[0032] Figure 5 Flowchart of an exemplary method 500 for applying flow rate limiting to a flow, for example by using a local server with a NIC that uses a dedicated transmit queue, scheduler, and Tx pipeline, for example, local server 110, NIC 120, dedicated transmit queue 224, scheduler 221, and Tx pipeline 225, respectively. Method 500 can be used to implement system 400, for example, based on credits of mechanism 300.

[0033] In box 510, receive flow rate limit, lease rate limit and / or port rate limit. Flow rate limit can indicate bandwidth limit for flow, lease rate limit can indicate bandwidth limit for lease process, and port rate limit can indicate bandwidth limit for port. Rate limit can be received at NIC. Such rate limit can be provided by hypervisor. Rate limit can be stored in NIC in the form of table to be accessed by Tx pipeline and / or scheduler. Packets of flow can be received, for example, via default queue. In box 520, dedicated transmit queue is assigned to flow based on the destination of flow. Queues can be assigned by communication EP in transmit pipeline based on data from parser. In box 530, dedicated transmit queue for flow can be transmitted to the source of flow, for example, to tenant and / or hypervisor. Communication of box 530 can be completed by EP, Tx pipeline, scheduler or any other component on NIC.

[0034] In box 540, a packet of a flow is received at a dedicated send queue. In box 550, the transmission of the packet in the dedicated send queue can be scheduled by a scheduler. The transmission of the packet can be scheduled to implement a flow rate limit for the flow, a lease rate limit for the source of the tenant / flow, and a port rate limit for the port. In box 560, the send pipeline and / or the parser can browse the packets in the dedicated send queue. When the destination of the outflow packet stored in the dedicated send queue does not match the destination of the flow associated with the dedicated send queue, the outflow packet can be discarded by the NIC, the send pipeline and / or the parser. Security can be maintained by discarding such packets and / or notifying the parser to shut down the corresponding virtual function. Since the packet in the error queue may be an indication of a malicious program that attempts to destroy the rate limit, such an action is taken. In box 570, the packet in the dedicated send queue is sent according to the schedule created by the scheduler to implement various rate limits.

[0035] Figure 6 is a schematic diagram of an example server 600 for use in cloud network 100, such as local server 110 in cloud network 100. For example, server 600 may operate lease process 113 and include NIC 120 designed according to architecture 200 that uses mechanism 300 for providing functionality of system 400 according to method 500. Thus, server 600 may be used to apply flow rate limiting (e.g., individual rate limits for each flow) when multiple flows are transmitted simultaneously from a common lease source.

[0036] The server 600 includes a communication port 611, which can be any electrical port and / or optical port, or a logical subdivision thereof, configured to send and / or receive streams (e.g., packets) of data. The communication port 611 is coupled to and / or implemented in a NIC 612, which can be substantially similar to the NIC 120 and can include a scheduler 221, a transmit queue 223, and a Tx pipeline 225. The NIC 612 can apply a flow rate limit to a flow transmitted from a leased process running on a processor 615 by implementing the method 500 and / or any other method, mechanism, device, and / or system disclosed in the present application. The NIC 612 can be coupled to the processor 615 via a PCI-E interface. The processor 615 can be implemented as a general-purpose processor, an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a field-programmable gate array (FPGA), etc. The processor 615 is configured to execute instructions from the memory 617 and can perform any method and / or associated steps indicated by the instruction, such as operating a rental process such as a virtual machine and / or container and / or operating a management program. In some embodiments, the rental process and / or management program can also be implemented in whole or in part in the memory 617. The memory 617 can be implemented as a processor cache, a random access memory (RAM), a read-only memory (ROM), a solid-state memory, a hard disk drive, or any other memory type. The memory 617 is used as a non-temporary medium for storing data, computer program products, and other instructions, and providing such data / products / instructions to the processor 615 as needed for calculation. In some examples, the processor 615 and the memory 617 can be implemented on the NIC 612 to store and execute a computer program product on the NIC 612. The user control 613 is coupled to the processor 615. User controls 613 may include a keyboard, mouse, trackball, and / or any other control that may be used by a user to interact with the leasing process and / or a management program for managing flows and / or rate limits, such as flow rate limits, port rate limits, and / or lease rate limits. Such interaction may be performed via a display coupled to server 600.

[0037] It should be noted that the term packet is used in this application to discuss data routed from the NIC via the Open Systems Interconnection (OSI) layer three IP protocol and data exchanged as frames according to the OSI layer two protocol. The term packet used in this application should not be interpreted to exclude the use of other protocols such as OSI layer two exchanges. As discussed in this application, the term packet should be interpreted broadly to include such protocols.

[0038] The aspects disclosed in this application can be operated on specially created hardware, on firmware, digital signal processors, or on specially programmed general-purpose computers, which include processors that operate according to programmed instructions. The term processor as used in this application is intended to include microprocessors, microcomputers, application-specific integrated circuits (ASICs), and dedicated hardware controllers. One or more aspects of the present invention can be implemented in computer-usable data and computer-executable instructions, such as in one or more program modules executed by one or more computers (including monitoring modules) or other devices. In general, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types when executed by processors in computers or other devices. Computer executable instructions can be stored on non-temporary computer-readable media such as hard disks, optical disks, removable storage media, solid-state memory, random access memory (RAM), three-dimensional intersection points (3DXP), etc. As will be understood by one of the skilled in the art, the functions of program modules can be combined or distributed in various aspects as needed. In addition, functions can be implemented in firmware or hardware equivalents such as integrated circuits, field programmable gate arrays (FPGAs), etc., in whole or in part. Certain data structures may be used to more efficiently implement one or more aspects of the present invention, and such data structures are contemplated within the scope of the computer-executable instructions and computer-usable data described in this application.

[0039] Example

[0040] The following provides illustrative examples of the technology disclosed in this application. Embodiments of the above technology may include any one or more and any combination of the examples described below.

[0041] Example 1 includes an apparatus for applying a flow rate limit to a flow, the apparatus comprising: a memory; a send pipeline coupled to the memory, the send pipeline being used to: assign at least one of a plurality of send queues in the memory as a dedicated send queue to the flow based on a destination of the flow, transmit the dedicated send queue to a source of the flow, and send packets of the flow from the dedicated send queue; and a scheduler coupled to the send queue, the scheduler being used to allocate flow send bandwidth to the dedicated send queue to implement flow rate limit for the flow.

[0042] Example 2 includes the apparatus described in Example 1, further comprising at least one port for sending packets stored in the send queue, wherein the scheduler implements a port rate limit for communications via the port and a lease rate limit for communications from the source of the flow, and the port rate limit and the lease rate limit are set to a value greater than the flow rate limit.

[0043] Example 3 includes the apparatus of Example 2, wherein the dedicated send queue is further assigned based on a tuple for the flow, the tuple including a source of the flow and a destination of the flow.

[0044] Example 4 includes the apparatus of Examples 1-3, wherein the dedicated send queue is further assigned based on a tunnel associated with the flow.

[0045] Example 5 includes the apparatus of Examples 1-4, further comprising a parser to discard the outgoing packet of the flow when a destination of the outgoing packet of the flow does not match a destination of a flow associated with the dedicated transmit queue.

[0046] Example 6 includes the apparatus of Examples 1-5, further comprising a parser to discard the outgoing packet from the default queue when a destination of the outgoing packet of the flow does not match a destination of the flow associated with the dedicated send queue.

[0047] Example 7 includes the apparatus of Examples 1-6, further comprising a parser for sending a notification to shut down a virtual function associated with the flow when an outgoing packet of the flow is stored in a sending queue and the outgoing packet includes a destination that does not match a destination assigned to the sending queue.

[0048] Example 8 includes the apparatus of Examples 1-7, wherein the transmit pipeline is further configured to receive a packet of the flow, obtain a connection entry identifier (ID) associated with the flow from the packet, and map the connection entry ID to a queue ID of the dedicated transmit queue.

[0049] Example 9 includes the apparatus of Examples 1-8, wherein the apparatus is a network interface card coupled to a server for operating multiple lease processes on dedicated hardware resources in a single root input / output virtualization (SR-IOV) mode.

[0050] Example 10 includes the apparatus of Examples 1-9, wherein the source of the flow is a leasing process operating on a server, and transmitting the dedicated send queue to the source of the flow includes transmitting a queue identifier (ID) of the dedicated send queue to the leasing process so that the leasing process addresses packets of the flow to the dedicated send queue.

[0051] Example 11 includes the apparatus of Examples 1-10, wherein the send pipeline comprises a tunnel endpoint for associating the flow rate limit with the flow and assigning the dedicated send queue to the flow.

[0052] Example 12 includes the apparatus of Examples 1-11, wherein the flow rate limit is received from a hypervisor managing a lease process serving as a source for the flow.

[0053] Example 13 includes the apparatus of Examples 1-12, wherein the send pipeline communicates the dedicated send queue to a source of the flow via a send complete message for an initial packet of the flow.

[0054] Example 14 includes the apparatus of Examples 1-12, wherein the send pipeline communicates the dedicated send queue to the source of the flow via metadata in packets received from the destination of the flow.

[0055] Example 15 includes the apparatus of Examples 1-14, wherein the send pipeline is further for reassigning the dedicated send queue from an initial source to a second source to change the affinity of the flow between the initial source and the second source.

[0056] Example 16 includes a method for applying a flow rate limit to a flow, the method comprising: receiving a flow rate limit for the flow; assigning, by a sending pipeline, a dedicated sending queue to the flow based on a destination of the flow; transmitting the dedicated sending queue to a source of the flow; sending packets of the flow from the dedicated sending queue; and allocating flow sending bandwidth to the dedicated sending queue by a scheduler to implement the flow rate limit for the flow.

[0057] Example 17 includes the method of Example 16, further comprising: forwarding packets from the dedicated send queue through a port limited by a port rate limit, wherein the port rate limit is set to a value greater than the flow rate limit; and forwarding packets from the source of the flow limited by a lease rate limit, wherein the lease rate limit is set to a value greater than the flow rate limit.

[0058] Example 18 includes the method of Examples 16-17, wherein the dedicated send queue is further assigned based on a tuple for the flow, the tuple including a source of the flow and a destination of the flow.

[0059] Example 19 includes the method of Examples 16-18, wherein the dedicated send queue is further assigned based on a tunnel associated with the flow.

[0060] Example 20 includes the method of Examples 16-19, further comprising discarding the outgoing packet from the dedicated transmit queue when a destination of the outgoing packet of the flow does not match a destination of a flow associated with the dedicated transmit queue.

[0061] Example 21 includes the method of Examples 16-20, further comprising discarding the outgoing packet from the default queue when a destination of the outgoing packet of the flow matches a destination of the flow associated with the dedicated send queue.

[0062] Example 22 includes the method of Examples 16-21, further comprising, when an outbound packet of the flow is stored in a transmit queue and the outbound packet includes a destination that does not match a destination assigned to the transmit queue, sending a notification to shut down a virtual function associated with the flow.

[0063] Example 23 includes the method of Examples 16-22, wherein assigning the dedicated send queue to the flow includes: receiving packets of the flow at a parser, obtaining a connection entry identifier (ID) associated with the flow from the packets, and mapping the connection entry ID to a queue ID of the dedicated send queue.

[0064] Example 24 includes the method of Examples 16-23, wherein the method is implemented on a network interface card coupled to a server, the server being configured to operate multiple lease processes on dedicated hardware resources in a single root input / output virtualization (SR-IOV) mode.

[0065] Example 25 includes the method of Examples 16-24, wherein the source of the flow is a leasing process operating on a server, and transmitting the dedicated send queue to the source of the flow includes transmitting a queue identifier (ID) of the dedicated send queue to the leasing process so that the leasing process addresses packets of the flow to the dedicated send queue.

[0066] Example 26 includes the method of Examples 16-25, wherein assigning the dedicated send queue to the flow comprises associating the flow rate limit with the flow and assigning the dedicated send queue to the flow based on the flow rate limit.

[0067] Example 27 includes the method of Examples 16-26, wherein the flow rate limit is received from a hypervisor that manages a lease process that is the source of the flow.

[0068] Example 28 includes the method of Examples 16-26, wherein the dedicated send queue is communicated to a source of the flow via a send complete message for an initial packet of the flow.

[0069] Example 29 includes the method of Examples 16-26, wherein the dedicated send queue is communicated to the source of the flow via metadata in packets received from the destination of the flow.

[0070] Example 30 includes the method of Examples 16-26, further comprising reassigning the dedicated send queue from an initial source to a second source to change the association of the flow between the initial source and the second source.

[0071] Example 31 includes a system for applying a flow rate limit to a flow, the system comprising: one or more processors for implementing a lease process serving as a source of the flow; and a network interface card comprising: a memory; a send pipeline coupled to the memory, the send pipeline being used to: assign at least one of a plurality of send queues as a dedicated send queue to the flow based on a destination of the flow, transmit the dedicated send queue to the lease process, and send packets of the flow from the dedicated send queue; and a scheduler coupled to the send queue, the scheduler being used to allocate flow send bandwidth to the dedicated send queue to implement flow rate limit for the flow.

[0072] Example 32 includes the system of Example 31, wherein the processor is further for implementing a hypervisor, the hypervisor for communicating the flow rate limit to the network interface card.

[0073] Example 33 includes the system of Examples 31-32, wherein the network interface card further includes at least one port for sending packets stored in the send queue, wherein the scheduler implements a port rate limit for communications via the port and a lease rate limit for communications from the lease process, and the port rate limit and the lease rate limit are set to a value greater than the flow rate limit.

[0074] Example 34 includes the system of Examples 31-33, wherein the dedicated send queue is further assigned based on a tuple for the flow, the tuple including a source of the flow and a destination of the flow.

[0075] Example 35 includes the system of Examples 31-34, wherein the dedicated send queue is further assigned based on a tunnel associated with the flow.

[0076] Example 36 includes the system of Examples 31-35, wherein the transmit pipeline further comprises a parser to discard the outgoing packet when a destination of the outgoing packet does not match a destination of the flow associated with the dedicated transmit queue.

[0077] Example 37 includes the systems of Examples 31-36, wherein the transmit pipeline further comprises a parser for discarding the outgoing packets from the default queue when a destination of the outgoing packets of the flow matches a destination of the flow associated with the dedicated transmit queue.

[0078] Example 38 includes the system of Examples 31-37, wherein the sending pipeline further includes a parser for sending a notification to shut down a virtual function associated with the flow when an outgoing packet of the flow is stored in a sending queue and the outgoing packet includes a destination that does not match a destination assigned to the sending queue.

[0079] Example 39 includes the system of Examples 31-38, wherein the transmit pipeline is further for: receiving a packet of the flow, obtaining a connection entry identifier (ID) associated with the flow from the packet, and mapping the connection entry ID to a queue ID of the dedicated transmit queue.

[0080] Example 40 includes the system of Examples 31-39, wherein the processor operates the lease process on dedicated hardware resources and communicates with a network interface card in a single root input / output virtualization (SR-IOV) mode.

[0081] Example 41 includes the system of Examples 31-40, wherein transmitting the dedicated send queue to the leasing process comprises transmitting a queue identifier (ID) of the dedicated send queue to the leasing process such that the lease addresses packets of the flow to the dedicated send queue.

[0082] Example 42 includes the system of Examples 31-41, wherein the send pipeline comprises a tunnel endpoint for associating the flow rate limit with the flow and assigning the dedicated send queue to the flow.

[0083] Example 43 includes the system of Examples 31-42, wherein the send pipeline communicates the dedicated send queue to a source of the flow via a send complete message for an initial packet of the flow.

[0084] Example 44 includes the system of Examples 31-42, wherein the send pipeline communicates the dedicated send queue to the source of the flow via metadata in packets received from the destination of the flow.

[0085] Example 45 includes the systems of Examples 31-44, wherein the send pipeline is further used to reassign the dedicated send queue from an initial source to a second source to change the association of the stream between the initial source and the second source. The previously described versions of the disclosed subject matter have many advantages that have been described or will become apparent to those of ordinary skill. Even so, not all of these advantages or features are required in all versions of the disclosed apparatus, system, or method.

[0086] In addition, this textual description mentions specific features. It should be understood that the disclosure in this specification includes all possible combinations of these specific features. For example, when a specific feature is disclosed in the context of a specific aspect or embodiment, the feature can also be used in the context of other aspects and embodiments to the extent possible.

[0087] Furthermore, when the present application refers to a method having two or more defined steps or operations, the defined steps or operations may be performed in any order or simultaneously, unless the context excludes these possibilities.

[0088] Although particular embodiments of the present invention have been depicted and described for purposes of illustration, it will be appreciated that various modifications can be made without departing from the spirit and scope of the invention. Accordingly, the present invention should not be limited, except as in the appended claims.

Claims

1. An apparatus for applying a flow rate limit to a flow, the apparatus comprising: Memory; A send pipeline coupled to the memory, the send pipeline being configured to: assigning at least one of a plurality of send queues in the memory as a dedicated send queue to the flow based on a destination of the flow, transmitting the dedicated send queue to a source of the flow, and sending packets of the flow from the dedicated send queue, and A scheduler coupled to the transmit queue is configured to allocate flow transmit bandwidth to the dedicated transmit queue to implement flow rate limiting for the flow.

2. The apparatus according to claim 1, further comprising at least one port for transmitting packets stored in the transmit queue, wherein The scheduler enforces a port rate limit for communications via the port and a lease rate limit for communications from a source of the flow, the port rate limit and the lease rate limit being set to values ​​greater than the flow rate limit.

3. The device according to claim 1, wherein: The dedicated send queue is further assigned based on a tuple for the flow, the tuple including a source of the flow and a destination of the flow.

4. The device according to claim 1, wherein: The dedicated send queue is further assigned based on a tunnel associated with the flow.

5. The apparatus of claim 1, further comprising a parser configured to discard the outgoing packet when a destination of the outgoing packet of the flow does not match a destination of the flow associated with the dedicated transmit queue.

6. The apparatus of claim 1, further comprising a parser for discarding the outgoing packet from a default queue when a destination of the outgoing packet of the flow matches a destination of the flow associated with the dedicated transmit queue.

7. The apparatus according to claim 1, further comprising a parser for sending a notification to shut down a virtual function associated with the flow when an outgoing packet of the flow is stored in a sending queue and the outgoing packet includes a destination that does not match a destination assigned to the sending queue.

8. The device according to claim 1, wherein: The sending pipeline is further used for: receiving packets of the stream, obtaining from the packet a connection entry identifier (ID) associated with the flow, and The connection entry ID is mapped to a queue ID of the dedicated send queue.

9. The device according to claim 1, wherein: The apparatus is a network interface card coupled to a server for operating multiple lease processes on dedicated hardware resources in a single root input / output virtualization (SR-IOV) mode.

10. The device according to claim 1, wherein: The source of the flow is a leasing process operating on a server, and transmitting the dedicated send queue to the source of the flow includes transmitting a queue identifier (ID) of the dedicated send queue to the leasing process so that the leasing process addresses packets of the flow to the dedicated send queue.

11. The device according to claim 1, wherein: The send pipeline includes a tunnel endpoint for associating the flow rate limit with the flow and assigning the dedicated send queue to the flow.

12. The device according to claim 1, wherein: The send pipeline communicates the dedicated send queue to a source of the flow via a send complete message for an initial packet of the flow.

13. The device according to claim 1, wherein: The send pipeline communicates the dedicated send queue to a source of the flow via metadata in packets received from a destination of the flow.

14. The device according to claim 1, wherein: The send pipeline is further configured to reassign the dedicated send queue from an initial source to a second source to change the association of the flow between the initial source and the second source.

15. A method for applying a flow rate limit to a flow, the method comprising: receiving a flow rate limit for the flow; assigning, by a send pipeline, a dedicated send queue to the flow based on a destination of the flow; transmitting the dedicated send queue to a source of the flow; sending packets of the flow from the dedicated send queue; as well as Flow send bandwidth is allocated to the dedicated send queue by a scheduler to implement flow rate limiting for the flow.

16. The method according to claim 15, further comprising: forwarding packets from the dedicated transmit queue through a port limited by a port rate limit, the port rate limit being set to a value greater than the flow rate limit; as well as Packets from the source of the flow limited by a lease rate limit set to a value greater than the flow rate limit are forwarded.

17. The method according to claim 15, wherein: Assigning the dedicated send queue to the flow comprises: receiving packets of the stream at a parser, obtaining from the packet a connection entry identifier (ID) associated with the flow, and The connection entry ID is mapped to a queue ID of the dedicated send queue.

18. The method according to claim 15, wherein: The source of the flow is a leasing process operating on a server, and transmitting the dedicated send queue to the source of the flow includes transmitting a queue identifier (ID) of the dedicated send queue to the leasing process so that the leasing process addresses packets of the flow to the dedicated send queue.

19. The method according to claim 15, wherein: Assigning the dedicated send queue to the flow includes associating the flow rate limit with the flow and assigning the dedicated send queue to the flow based on the flow rate limit.

20. The method according to claim 15, wherein: The dedicated transmit queue is communicated to the source of the flow via metadata in packets received from the destination of the flow.