Technologies for scalable packet sending and receiving

A network device with a shared ring buffer and hardware-managed descriptors addresses bottlenecks in packet processing, improving scalability and throughput by offloading core processing, enabling efficient packet handling across multiple stages.

DE112017003294B4Active Publication Date: 2024-10-17INTEL CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
DE112017003294
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2016-06-30
Filing Date
2017-05-31
Publication Date
2024-10-17
Estimated Expiration
2037-05-31

AI Technical Summary

Technical Problem

Existing systems face bottlenecks in packet processing due to a single core handling receive and send operations, limiting scalability and throughput when moving packet pointers between network interface cards and application queues.

Method used

Implementing a network device with a shared ring buffer and dedicated hardware components to manage receive and send descriptors independently of packet arrival and departure rates, offloading core processing to hardware threads for efficient packet handling.

Benefits of technology

This approach reduces bottlenecks by allowing simultaneous processing of packets across multiple stages, enhancing scalability and throughput without relying on software threads, thus optimizing network communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Network device (106) for processing packets, the network device comprising: one or more processors (210) containing a plurality of cores (232, 234, ..., 246); a network interface controller (218) NIC coupled to the one or more processors; and one or more storage devices (222) on which a plurality of instructions are stored which, when executed by the one or more processors, cause the network device to: construct a ring (1020, 1120) in a memory of the one or more storage devices, (404) wherein the ring is defined as a circular buffer and contains a plurality of slots for storing entries representative of packets; generate and assign receive descriptors to the slots in the ring, (606) wherein each receive descriptor contains a pointer to a corresponding memory buffer for storing packet data;Determine whether the receive descriptors are available in the ring, (624); Copy the receive descriptors from the ring to a NIC receive queue, (626), and in response to the determination that the receive descriptors are available in the ring; Determine whether the NIC has received one or more packets, (628); and Copy, using direct memory access DMA (636), and in response to the determination that the NIC has received one or more packets, packet data of the one or more received packets from the NIC to the memory buffers associated with the receive descriptors in the NIC receive queue allocated to the slots in the ring, (634).
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATION

[0001] This application claims priority to US Utility Patent Application Serial No. 15 / 199,110, with entitled ´´TECHNOLOGIES FOR SCALABLE PACKET RECEPTION AND TRANSMISSION´´, which was submitted on 30 June 2016 became. BACKGROUND

[0002] Document US 2006 / 0174251 A1 discloses a method for managing a data transmission queue, for Use with a host and a network interface device. Roughly speaking, the host writes data buffer Descriptors into a send descriptor queue, and the network interface device writes events to the host when it has finished processing a send data buffer. Each of the Transfer completion event descriptors notify the host of the completion of a variety of Transmission data buffers.

[0003] Document WO 2014 / 113063 A1 discloses a context-switching cache system that supports a plurality of offload processors connected to a memory bus, each offload processor having a cache with an associated cache state, a context memory coupled to the offload processors and a Scheduling circuit configured to facilitate the transfer of a cache state between at least one of the offload processors and the context memory.

[0004] In typical systems, problems can arise if all packet pointers used by a network interface card, from a thread running on a core of a processor, taken from a receive descriptor location and placed in a queue for processing by an application. This process creates a bottleneck on a core and prevents scalability when a throughput exceeds the exceeds the capacity of the single core to move the receive data pointers to the application queue. In addition, in typical systems, a bottleneck also exists when sending packets, since a single core a thread to perform a similar process of moving data from an application queue to a Network interface card used for sending.

[0005] To achieve the object, the invention proposes network devices for processing packets according to Claims 1 and 22, a method for processing packets according to claim 12 and one or more machine-readable storage media according to claim 23. Preferred embodiments are described in the dependent claims described. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] The concepts described herein are shown in the accompanying figures by way of example and not by way of limitation. For the sake of simplicity and clarity of illustration, elements shown in the figures are not necessarily in the Drawn to scale. Where considered appropriate, reference symbols are repeated in the figures to indicate corresponding or specify analogous elements. Fig. 1 is a simplified block diagram of at least one embodiment of a system that provides Network device for providing scalable receiving and sending of packets; Fig. 2 is a simplified block diagram of at least one embodiment of a network device of the System of Fig. 1; Fig. 3 is a simplified block diagram of at least one embodiment of an environment provided by the Network device of Fig. 1 and Fig. 2 can be set up Fig. 4-5 are a simplified flow diagram of at least one embodiment of a method for Processing of packets that can be performed by the network device of Fig. 1 and Fig. 2; Fig. 6-7 are a simplified flow diagram of at least one embodiment of a method for receiving of data packets, which can be performed by the network device of Fig. 1 and Fig. 2; Fig. 8-9 are a simplified flow diagram of at least one embodiment of a method for outputting of packets that can be performed by the network device of Fig. 1 and Fig. 2; Fig. 10 is a simplified diagram of processes performed by components within the network device of Fig. 1 and Fig. 2 in at least one embodiment of a method for receiving data packets be performed; Fig. 11 is a simplified diagram of processes performed by components within the network device of Fig. 1 and Fig. 2 in at least one other embodiment of a method for receiving data packets; Fig. 12 is a simplified diagram of processes performed by components within the network device of Fig. 1 and Fig. 2 in at least one embodiment of a method for outputting data packets be carried out; and Fig. 13 is a simplified diagram of processes performed by components within the network device of Fig. 1 and Fig. 2 in at least one other embodiment of a method for dispensing data packets. DETAILED DESCRIPTION OF THE DRAWINGS

[0007] While the concepts of the present disclosure are susceptible to various modifications and alternative forms are subject to, specific embodiments thereof are shown as examples in the drawings and are described here described in detail. However, it should be understood that the concepts of the present disclosure are not limited to the particular forms disclosed, but on the contrary all modifications, equivalents and Alternatives in accordance with the present disclosure and the appended claims.

[0008] References in the description to ´´an embodiment´´, ´´an illustrative embodiment´´ etc., indicate that the described embodiment has a particular feature, structure or characteristic may include, but each embodiment may or may not necessarily include that particular feature, that particular structure or property. Furthermore, such phases do not necessarily refer to the same embodiment. Furthermore, if a particular feature, structure or property in connection with an embodiment described, it is assumed that it is within the knowledge of a person skilled in the art to identify such a feature, to implement such a structure or feature in conjunction with other embodiments, whether expressly described or not. In addition, it should be clear that items that are listed in the form ´´at least one A, B and C´´ may mean (A); (B); (C); (A and B); (A and C); (B and C); or (A, B and C). Likewise, items contained in of the form ´´at least one of A, B or C´´, (A); (B); (C); (A and B); (A and C); (B and C); or (A, B and C) mean.

[0009] The disclosed embodiments may, in some cases, be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions be made by a transitory or non-transitory, machine-readable (e.g. computer-readable) are carried or stored on a data storage medium that is used by one or more processors can be read or executed. A machine-readable data storage medium can be any Data storage device, mechanism or other physical structure for storing or transmitting information in be embodied in a form that can be implemented by a machine (e.g. a volatile or non-volatile memory, a media disk or other media device).

[0010] In the drawings, some structural or process features may be shown in specific arrangements and / or It should be clear, however, that such special arrangements and / or sequences are not Rather, in some embodiments, such features may be implemented in a different manner and / or be arranged in a different order than shown in the illustrative figures. In addition, the inclusion of a structural or procedural feature in a particular figure does not mean that such a feature will be present in all embodiments, and may not be included in some embodiments or may have different features be combined.

[0011] Referring now to Fig. 1, in one illustrative embodiment, a system 100 for Providing scalable receiving and sending of packets a source endpoint node 102 and a Destination endpoint nodes 108 connected by one or more network devices 106 over a network 104 in Communication. In use, the network device 106 facilitates the transmission of network packets (e.g. based on the type of workload, information flow, etc.) between the source endpoint node 102 and the Destination endpoint node 108 over the network 104. As described in more detail herein, the illustrative network device 106 a shared ring (ie, a circular buffer) in memory and assigns cores of one or more processors of the network device 106 to different stages of a processing pipeline. In the illustrative embodiment, the stages include one or more Input stages, one or more processing stages and one or more output stages. The input stages carry out a Priming process in which the input stages allocate buffers in main memory to store packet data and Generate receive descriptors. Each receive descriptor contains an instruction to receive a packet and a pointer to the buffer for storing the packet data. The input stages then add these receive descriptors as Entries for slots of the common sam used ring in turn. Furthermore, the input stages can perform a query process to Provide receive descriptors from the ring of a network interface controller (NIC), which also acts as a host Fabric Interface (HFI). The NIC then stores data using direct memory access (DMA) buffers the data from received packets.

[0012] The work stages perform operations ('worker functions') on the received packet data, such as Compression, decompression, encryption, decryption, firewall services and / or other functions, and update metadata associated with the corresponding entries in the slots of the ring to The output stages also generate send descriptors and add them to the slots in the ring in sequence. The transmit descriptors are similar to the receive descriptors, as they Instruction to the NIC (i.e. an instruction to send a packet) and a pointer to a memory buffer that contains the packet data to be sent. If the metadata of an entry in a slot indicates that the work stages Once the processing of the packet data has been completed and the packet data is ready for transmission, the output stage copies the Packet data using DMA to the NIC. It should be understood that in the illustrative embodiment, the Input and output stages fill the slots in the ring with receive descriptors and transmit descriptors at a rate that is independent of the rate at which packets are actually received and / or sent by the NIC, thereby bottleneck that exists in typical systems. In other words, a supply of Receive descriptors and transmit descriptors and the associated memory buffer is made available before the NIC uses them. As further described in more detail herein, in some embodiments, to further To provide efficiencies, operations of the input and output stages by hardware components of the NIC itself implemented, rather than by software threads running on cores of the processor.

[0013] The source endpoint node 102 may be implemented as any type of computing or computing device that capable of performing the functions described herein, including, without limitation, a computer, a Desktop computer, a smartphone, a workstation, a laptop computer, a notebook computer, a tablet Computer, a mobile computing device, a portable computing device, a network application, a web application, a distributed computing system, a processor-based system and / or a consumer electronics device. Likewise, the destination endpoint node 108 may be embodied as some type of computing or computing device that capable of performing the functions described herein, including, without limitation, a computer, a Desktop computer, a smartphone, a workstation, a laptop computer, a notebook computer, a tablet Computer, a mobile computing device, a portable computing device, a network application, a web application, a distributed computing system, a processor-based system and / or a consumer electronics device. Each of the source endpoint node 102 and the destination endpoint node 108 may contain components that generally found in a computing device, such as a processor, memory, an input / output Subsystem, data storage, communication circuit, etc.

[0014] The network 104 may be embodied as a type of wired or wireless communication network, containing radio networks (e.g. Global System for Mobile Communications (GSM), 3G, Long Term Evolution (LTE), Worldwide Interoperability for Microwave Access (WiMAX), etc.), digital subscriber line (DSL) networks, Cable networks (e.g. coaxial networks, fiber networks, etc.), telephony networks, local area networks (LANs) or Wide area networks (WANs), global networks (e.g., the Internet), or any combination thereof. In addition the network 104 may include a number of network devices 106 necessary to facilitate communication between the source endpoint node 102 and the destination endpoint node 108.

[0015] Each network device 106 may be embodied as a type of computing device that facilitates wired and / or wireless network communications between the source endpoint node 102 and the destination endpoint node 108. For example, the network devices 106 may be configured as a (e.g., standalone, Rack-mounted, blade, etc.) server, a router, a switch, a network hub, an access point, a data storage device, a computing device, a multiprocessor system, a (e.g. physical or virtual) Network application, a computer, a desktop computer, a smartphone, a workstation, a laptop computer, a Notebook computer, tablet computer, mobile computing device or any other computing device embodied capable of processing network packets. As shown in Fig. 2, an illustrative Network device 106 includes a central processing unit (CPU) 210, a main memory 212, an input / output (I / O) subsystem 214 and a communication circuit 216. Of course, in other embodiments The network device 106 may contain other or additional components, such as those typically found in a computer (e.g., data storage, display, etc.). Additionally, in some embodiments, a or more of the illustrative components may be inserted into another component or otherwise form part of it. For example, in some embodiments, the main memory 212, or parts of it, be inserted into the CPU 210.

[0016] The CPU 210 may be embodied as a type of processor capable of performing the functions described herein The CPU 210 may be implemented as one or more single- or multi-core processors, a microcontroller, or other processor or other processing / control circuitry. In some embodiments, the CPU 210 as a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a Graphics processing unit (GPU), reconfigurable hardware or hardware circuitry, or other specialized be embodied, contained, or coupled to hardware to enable performance of the methods described herein functions. In the illustrative embodiment, the CPU 210 is embodied as a processor that a set 230 of several cores 232, 234, 236, 238, 240, 242, 244 and 246. While in Fig. 2 eight cores illustrated, it should be understood that in other embodiments, the CPU 210 may include a different number of cores Likewise, the main memory 212 may be a type of volatile (e.g., dynamic random access memory (DRAM) etc.) or non-volatile memory or data storage capable of performing the functions described herein functions. In some embodiments, all or part of the main memory 212 may be CPU 210. In operation, the main memory 212 can store various data and software that of the operation of the network device 106, such as ring data, packet data, stage data, NIC- Queue data, operating systems, applications, programs, libraries and drivers.

[0017] The I / O subsystem 214 may be embodied as circuitry and / or components to provide input / output Operations with the CPU 210, the main memory 212 and other components of the network device 106 to For example, the I / O subsystem 214 may be configured as memory control hubs, input / output control hubs, integrated sensor hubs, firmware devices, communication links (ie point-to-point links, bus links, wires, cables, light guides, printed circuit board tracks, etc.) and / or other components and subsystems or to other way to facilitate input / output operations. In some embodiments, the I / O Subsystem 214 may form part of a system-on-chip (SoC) and may be used together with one or more of the CPU 210, the Main memory 212 and other components of the network device 106 on a single integrated circuit Chip must be inserted.

[0018] The communication circuit 216 may be implemented as a communication circuit, device, or collection thereof be embodied, capable of communicating over the network 104 between the network device 106 and the source endpoint node 102, another network device 106 and / or the destination endpoint node 108 enable. The communication circuit 216 may be configured to use one or more communication technologies (e.g., B. wired or wireless communications) and associated protocols (e.g. Ethernet, Bluetooth®, Wi-Fi®, WiMAX etc.) to carry out such communication.

[0019] The illustrative communication circuit 216 includes a network interface controller (NIC) 218, which also referred to as a Host Fabric Interface (HFI). The NIC 218 can be used as one or more Expansion boards, daughter cards, network interface cards, control chips, chipsets or other devices embodied by the network device 106 for connecting the source endpoint node 102, the destination endpoint node 108 and / or another network device 106. In some Embodiments, the NIC 218 may be embodied as part of a system-on-chip (SoC) that includes one or more processors, or be contained on a multi-chip package that also contains one or more processors In some embodiments, the NIC 218 may include a local processor (not shown) and / or a local memory (not shown), both of which are local to the NIC 218. In such embodiments, the local processor of the NIC 218 may be capable of performing one or more of the functions of the CPU 210 described herein Additionally or alternatively, in such embodiments, the local memory of the NIC 218 may be multiple components of the network device 106 at board level, socket level, chip level and / or other levels Furthermore, the NIC 218 may include a ring access logic 220 that may be configured as a processor, a microcontroller, a FPGA, an ASIC or other device that provides the NIC 218 with direct access to Receive descriptors and transmit descriptors stored in slots of the shared ring, instead of relying on software threads that are triggered by one or several of the cores 230 of the CPU 210 are executed to independently place these descriptors into separate queues for the NIC 218. The ring access logic 220 allows the NIC 218 to access non-continuously stored receive descriptors and transmit descriptors in the ring, instead of relying on the cores of the CPU 210, which Receive descriptors and transmit descriptors separately into separate queues for the NIC 218, where they Descriptors are stored continuously.

[0020] The network device 106 may additionally include a data storage device 222 that acts as a type of device or devices designed for short-term or long-term storage of data may be configured, such as storage devices and circuits, memory cards, hard disk drives, Solid-state drives or other data storage devices. The data storage device 222 may be a System partition that stores data and firmware code for the network device 106. The Data storage device 222 may also include an operating system partition that contains data files and executable Stores programs for an operating system of the network device 106.

[0021] Additionally, the network device 106 may include a display 224. The display 224 may be any suitable display technology, including, for example, a liquid crystal display (LCD), a Light-emitting diode (LED) display, a cathode ray tube (CRT) display, a plasma display and / or other display that usable in a computing device. The display may include a touch screen sensor that can sense any suitable Touch screen input technology for capturing the tactile selection of information shown on the display used by the user, including, but not limited to, resistive Touch screen sensors, capacitive touch screen sensors, surface acoustic wave (SAW), Touch screen sensors, infrared touch screen sensors, optical imaging touch screen sensors, acoustic touchscreen sensors and / or another type of touchscreen sensor. Additionally or alternatively The network device 106 may include one or more peripheral devices 226. Such peripheral Devices 226 may include any type of peripheral device commonly found in a computing device such as speakers, a mouse, a keyboard and / or other input / output devices, Interface devices and / or other peripheral devices.

[0022] Referring now to Fig. 3, in the illustrative embodiment, each network device 106 establish an environment 300 during operation. The illustrative environment 300 includes a Network communication module 320, a DMA module 330 and a ring management module 340, which is a Ring setup module 350, a descriptor management module 360 ​​and a stage management module 370. Each of the modules, logic and other components of the environment 300 can be implemented as hardware, firmware, software or a combination thereof. As such, in some embodiments, one or more of the modules of the Environment 300 as a circuit or collection of electrical devices (e.g., network communication circuit 320, DMA circuit 330, ring management circuit 340, ring setup circuit 350, descriptor management circuit 360, stage management circuit 370, etc.). It should be clear that in such embodiments, a or more of the network communication circuit 320, DMA circuit 330, ring management circuit 340, Ring device circuit 350, descriptor management circuit 360 or stage management circuit 370 a portion of one or more of the CPU 210, the communication circuit 216, the main memory 212, the I / O subsystem 214 and / or other components of the network device 106. In addition, in some Embodiments, one or more of the illustrative modules form part of another module and / or One or more of the illustrative modules may be independent of each other. Furthermore, in some Embodiments of one or more of the modules of the environment 300 as virtualized hardware components or emulated architecture implemented by the CPU 210 or other components of the network device 106 can be established and maintained.

[0023] In the illustrative environment 300, the network device 106 also includes ring data 302, packet data 304, stage data 306 and NIC queue data 308. The ring data 302 represents a ring stored in memory 212 and contains a set of entries. As discussed in more detail below with reference to Fig. 8, Each entry is assigned a consecutive number (ie a slot number) and contains a pointer to the data of a Package and metadata belonging to the package. The metadata defines properties of the data package, such as the Packet size, an input port number, an output port number and state data that indicates which stages a have finished processing the data packet and whether the data packet is ready to be sent to another device (e.g. Destination endpoint node 108) to be sent. Each entry also contains a receive descriptor, which contains a pointer to the packet data, and a transmit descriptor, which also contains a pointer to the packet data. The packet data 304 is in the illustrative embodiment as the content of the data packets that passes through the various stages received and processed that are assigned to the cores 230. As such, the packet data 304 headers, Contain payload data and / or other information initially included in a data packet, and / or Information added to or modified in the data packet as a result of processing by the stages The stage data 306 in the illustrative embodiment contains information used to manage the Status of the various stages executed by the cores 230 in the network device 106 used As such, the stage data 306 includes a current running number (ie, the index of the current entry in the ring that a particular stage is processing) of each stage and a stage instance identifier that is used to distinguish between separate instances of the same level. The NIC queue data 308 contains a Receive queue that stores a continuous set of receive descriptors from the ring for packets that to be received, and a transmit queue that receives a continuous set of transmit descriptors from the ring for Stores packets that are ready to be sent from the network device. The ring data 302, packet data 304, Stage data 306 and NIC queue data 308 can be used by the various modules and / or sub-modules of the Network device 106. It should be understood that network device 106 may include other components, may contain subcomponents, modules, sub-modules and / or devices that are usually found in a network device which are not shown in Fig. 3 for the sake of clarity of description.

[0024] The network communication module 320, which can be implemented as hardware, firmware, software, virtualized hardware, emulated Architecture and / or a combination thereof, as discussed above, is configured to receive incoming or outgoing network communications (e.g. network traffic, network packets, network streams, etc.) to or from the Network device 106. For this purpose, the network communication module 320 is configured to receive data packets from a computing device (e.g., the source endpoint node 102, another network device 106, the Destination endpoint node 108) to receive and process and to prime data packets and to forward them to another computing device (e.g., the source endpoint node 102, another network device 106, the destination endpoint node 108). Therefore, in some embodiments, at least part of the functionality of the Network communication module 320 by the communication circuit 216 and in the illustrative embodiment by the NIC 218. The DMA module 330, which can be hardware, firmware, software, virtualized hardware, emulated architecture and / or a combination thereof, as discussed above is configured to allow packet data to be transferred using direct memory access (DMA) between the NIC 218 and the memory buffers specified in the pointers in the descriptors located in the slots of the shared ring are copied.

[0025] The ring management module 340, which can be implemented as hardware, firmware, software, virtualized hardware, emulated Architecture and / or a combination thereof, as discussed above, is configured to form the ring in the Memory 212 of the network device 106, assign the cores 230 of the CPU 210 to the stages containing a or several input stages, one or more output stages and various work stages, and a simultaneous To manage the access of the levels to entries in the ring. For this purpose, the ring management module 340 contains illustrative embodiment, the ring setup module 350, the descriptor management module 360 ​​and the Stage management module 370. The ring device module 350 is in the illustrative embodiment configured to allocate a section of memory and create a ring buffer (referred to here simply as a ´´ring´´) in the memory. In the illustrative embodiment, the ring is organized as a series of slots, of each of which can contain an entry containing metadata, a receive descriptor and a send descriptor, such as described above. The slots and, by association, the entries stored in them have consecutive numbers. As described in more detail herein, a process can run like a stage through the entries in the ring by own internal running number and a modulus function for the internal running number based on the size (ie number of slots) of the ring, so that the resulting running number falls in the range from 0 to the Size of the ring minus one. In the illustrative embodiment, the ring setup module 350 configured to build a ring with a size that is a power of two, which requires the use of a masking allows to convert from a running number of a stage to an index (ie slot number) in the ring.

[0026] The descriptor management module 360, which can be implemented as hardware, firmware, software, virtualized Hardware, emulated architecture and / or a combination thereof, as discussed above, is configured to generate receive descriptors and transmit descriptors for use by the NIC 218 To this end, the descriptor management module 360 ​​may include a descriptor copy module 362 and a Update reporting module 364. The descriptor copy module 362 may be configured to generate receive descriptors and transmit descriptors to corresponding queues for the NIC 218. The Update notification module 364 may be configured to provide the NIC 218 with an update that a new Receive descriptor or transmit descriptor has been added to the corresponding queue of the NIC 218, as indicated by Updating a tail register associated with the NIC 218. As described herein, in other Embodiments, the NIC 218 may be configured to directly access the non-continuously stored descriptors in the shared ring, rather than relying on a separate process to copy these descriptors to the queues of the NIC 218. It should be clear that each of the descriptor copy module 362 and the Update reporting module 364 separately as hardware, firmware, software, virtualized hardware, emulated architecture and / or a combination thereof. For example, the descriptor copy module 362 may be embodied as a hardware component, while the update notification module 364 can be implemented as a virtualized hardware components or as any other combination of hardware, firmware, software, virtualized hardware, emulated architecture and / or a combination thereof.

[0027] The stage management module 370, which can be implemented as hardware, firmware, software, virtualized hardware, emulated Architecture and / or a combination thereof, as discussed above, is configured to provide the cores 230 to assign levels to the CPU 210 and / or the NIC 218 and to manage their access to the entries in the ring. the illustrative stage management module an input stage management module 372, a Work stage management module 374 and an output stage management module 376. The input stage management module 372 is configured in the illustrative embodiment to support one or more cores 230 or the NIC 218 of a or multiple input levels and use the assigned component to prime (ie fill) available entries in the ring with receive descriptors, receiving packets with the communication circuit 216, such as the NIC 218, Adding the received packet data to the buffers associated with the receive descriptors for each entry in the ring, and adding or updating metadata for each entry in the ring that indicates that the data is ready to be processed through one or more work stages. Work stage management module 374 is configured in the illustrative embodiment to Assign and / or reassign work stages to identify entries in the ring that are associated with data packets that are ready to be processed by the work stages, and the assigned cores 230 for Execution of worker functions such as compression, decompression, encryption, decryption, firewall services and / or use other functions on the package data and update the metadata to provide a Completion status of each work stage. The output stage management module 376 is in the illustrative embodiment, one or more cores 230 or the NIC 218 of one or more output stages and use the assigned components to iterate through the slots in the ring to To prime (i.e. fill) entries in the ring with send descriptors, to identify entries with metadata that indicate that the linked data packets are ready to be sent, and the received processed packet data is communication circuit 216 (e.g., the NIC 218) using DMA to transfer it to another device such as the destination endpoint node 108.

[0028] It should be clear that each of the input stage management module 372, the work stage management module 374 and the output level management module 376 separately as hardware, firmware, software, virtualized hardware, emulated architecture and / or a combination thereof. For example, the Input level management module 372 may be embodied as a hardware component, while the Work stage management module 374 and the output stage management module 376 as virtualized hardware components or as any other combination of hardware, firmware, software, virtualized hardware, emulated architecture and / or a combination thereof.

[0029] Referring now to Fig. 4, the network device 106 may employ a method 400 for Process packets. The method 400 begins with block 402, in which the network device 106 determines whether packets are to be processed in a ring. In the illustrative embodiment, the Network device 106, whether hardware components (ie cores 230 and / or the NIC 218) for executing various Processing stages (ie one or more input stages, one or more output stages and one or more work stages) are available and determines to process packets in a ring if the components are available. Additionally or alternatively, the network device 106 may, based on configuration settings, a request made by another computing device or by a user (e.g. through a graphical user interface) or other factors determine whether packets are processed in a ring. Regardless of whether the network device 106 determines to process data packets in a ring, the Method 400 continues with block 404 in which the network device 106 defines a ring (ie, a circular buffer) in the Memory 212. In the illustrative embodiment, the network device 106 allocates a buffer with a size that is a power of two. This allows for simple masking to avoid an internal convert the serial number of a stage to an index (ie, slot number) in the ring. The network device 106 creates slots in the buffer. As described above, each slot has a consecutive number (ie, an index or a slot number) and can hold an entry (i.e. a receive descriptor, metadata and a send descriptor) that is associated with a data packet. In block 406, the network device 106 identifies the Packet processing stages. Since entries are not removed from the ring, no reordering is required and ongoing Numbers indicate an order of arrival. The network device 106 can assign the packet processing stages to Based on an assigned function of the network device 106 defined in the configuration settings, a or more applications loaded onto the network device 106, or otherwise. For example, some embodiments of the network device 106 may be configured to implement firewall or malware detection services, while other embodiments may be configured to perform data encryption or compression services. Still other embodiments may be configured to perform a combination of these Services and / or other services. When identifying the stages, the illustrative Network device 106 one or more input stages for performing priming of the slots in the ring with Reception descriptors and managing a reception of packets, one or more work stages, and one or multiple output stages for priming the slots in the ring with transmit descriptors and managing packet transmission, as specified in block 408.

[0030] Once the stages are identified, the method 400 proceeds to block 410, in which the network device 106 Hardware resources are allocated to the stages. The network device 106 can have one or more cores 230 the CPU 210 to the stages as indicated in block 412. The network device 106 assigns the various Assign cores 230 by default if the NIC 218 does not have one or more components, such as the ring access logic 220, to facilitate the input and / or output stages. In such embodiments, the Network device 106 of the NIC 218 all or part of the operations of the input and output stages, such as indicated in block 414. With respect to the working stages, the network device 106 may comprise a plurality of cores 230, such as cores 234, 236 to several instances of the same work stage and / or can assign different cores 230 to different As described in more detail herein, when multiple instances of the same level (e.g. input stage, work stage or output stage), the illustrative network device uses 106 Procedure to prevent two or more instances of the same level from attempting to access the same entry in the ring In embodiments with several different work stages, some work stages can be results of other work stages. For example, a data analysis stage may depend on the completion of a Data decompression level dependent.

[0031] Referring now to Fig. 5, the network device 106, once the hardware resources have been allocated to the stages assigned to the input stage, adds incoming data packets to the ring. The incoming packets are Assigned to entries in slots of the ring that have been primed with receive descriptors by the input stage(s). As described above, each receive descriptor contains a pointer to a memory buffer in main memory 212 where the Packet data should be stored. When storing the packet data in these memory buffers, the Network device 106 transfers the packet data from the NIC 218 to the main memory 212 using DMA. Packet reception process is described in more detail with reference to Fig. 6 and Fig. 7.

[0032] Furthermore, in block 426, the network device 106 processes the data packets transmitted by the entries in the ring The work steps, which in the illustrative embodiment are shown as Software processes or threads executed by one or more of the cores 230 access the packet data that copied by DMA from the NIC 218 into the memory buffers in the main memory 212, as indicated in block 428. In In block 430, the network device 106 marks a fully processed packet as ready to send when the Work stages have finished performing their respective operations on the packet data. When marking a packet as ready to send, the network device 106 can determine the metadata associated with the corresponding entry in the ring to indicate that the packet data is for sending are ready, as indicated in block 432.

[0033] Additionally, in block 434, the network device 106 outputs the processed packets with the one or more Output stages (ie, provides the processed packets to the NIC 218). As described more fully herein with reference to As described in Fig. 8 and Fig. 9, the one or more output stages prime the entries in the ring with Send descriptors, each containing a pointer to the memory buffer containing the packet data for the corresponding Ring entry. As part of an output of the processed packets, the network device 106 copies the packet data from the buffers in main memory 212 to the NIC 218 using DMA, as indicated in block 436. While the Blocks 422 through 434 are shown sequentially in the illustrative embodiment, the stages executed simultaneously, so that the one or more input stages can prime entries in the ring at a rate while packets are received at a different rate and moved to the memory buffers while the work stages process other data packets that are already in the ring, and while the one or more output stages Manage transmission of packets from the network device 106 at other rates. In block 438, the Network device 106, whether to continue with the operation of the stages on the data packets. In the illustrative embodiment, the network device 106 may be configured to operate the stages to continue if an express request to stop is provided, such as a request made by another device, a request from a process or application running on the Network device 106 is running, or a request made by a person through a graphical user interface is entered. If the network device 106 determines to continue, the method 400 returns to block 422, in which the network device 106 again adds one or more incoming packets to the ring with the input stage. Otherwise, the method 400 returns to block 402 to determine whether packets are to be processed in a ring.

[0034] Referring now to Fig. 6, the network device 106 may employ a method 600 for Perform receiving of data packets by one or more input stages. The method 600 corresponds to block 422 of Fig. 5. In the illustrative embodiment, the hardware resources associated with one or more multiple input stages (ie, one or more of the cores 230 and / or the NIC 218), the method 600. The method 600 begins with block 602, in which the network device 106 determines whether data packets to received. In the illustrative embodiment, the network device 106 determines to received if hardware resources have been allocated to one or more input stages and the Network device 106 does not receive a request from another device, process, or application running on the Network device 106 is running, or a user has received, to stop receiving packets. In In response to a determination to receive data packets, the method 600 continues with block 604 in which the Network device 106 primes the ring with receive descriptors. In doing so, as indicated in block 606, the Network device 106 receives descriptors and assigns them to slots in the ring as entries. As part of this process, the network device 106 allocates a memory buffer for packet data as indicated in block 608 and adds a pointer to the memory buffer to a corresponding receive descriptor, as indicated in block 610. The Network device 106 performs blocks 608 and 610 for each receive descriptor associated with a corresponding slot in the Ring is assigned. In embodiments in which the NIC 218 does not include hardware (e.g., the ring access logic 220), To prime the ring directly, the network device 106 further primes the ring using one or more Cores 230 assigned to the one or more input stages, as indicated in block 612. In other Embodiments, as indicated in block 614, the network device 106 may establish the ring using the NIC 218 hardware (ie, the ring access logic 220). In embodiments in which multiple input stages access the ring priming, the network device 106 further coordinates their access to the ring slots to prevent them from to prime the same slot, as indicated in block 616. In the illustrative embodiment, the Input stages use a modulo function in which each instance of the input stage follows a rule that it can only Entry processed when the running number of the instance of the input stage, modulo the number of instances of the input stage, is equal to a stage instance identifier assigned to that instance of the input stage. Furthermore, if a specific ring entry has been primed (ie the receive descriptor has been added to this entry), the corresponding input level also adds metadata to the entry indicating that the entry has been primed and that the Memory buffer associated with the receive descriptor is available for receiving packet data.

[0035] In block 618, the network device 106 identifies available receive descriptors to be assigned to the slots in the ring were, as by identifying entries in the ring with metadata indicating that the memory buffer associated with a descriptor is available to receive packet data. This process can be referred to as polling and may be performed by one or more cores 230 of CPU 210, as indicated in block 620. Alternatively, as indicated in block 622, this polling process may be performed by the NIC 218 as in embodiments in which the NIC 218 includes the ring access logic 220.

[0036] In block 624, the network device 106 determines whether descriptors are available in the ring. If not, the Method 600 returns to block 618, in which the network device 106 again determines available receive descriptors in the ring identified. Otherwise, the method 600 may continue with block 626 of Fig. 7, in which the network device 106 using at least one core 230 assigned to an input stage, the one or more available receive descriptors from the ring to the NIC receive queue (ie, the NIC queue data 308) copied. While the ring and the NIC receive queue can both be stored in main memory 212, The structure of the ring may be different compared to the NIC receive queue. In particular, while the entries, which are stored in the slots of the ring, can contain receive descriptors, metadata and transmit descriptors, that are nested together, the NIC receive queue contains continuous receive descriptors. In Embodiments in which the NIC 218 is not equipped to directly access the receive descriptors in the ring (ie, is not equipped to skip the non-receive descriptor data), the network device 106 copies therefore the receive descriptors from the ring entries to the separate NIC receive queue to perform the sequential, continuous arrangement of the receive descriptors of the NIC 218 for access.

[0037] In block 628, the network device 106 determines whether the NIC 218 has received new packets. In doing so, the NIC 218 may perform this determination directly, as indicated in block 630. Alternatively, a core 230 of the CPU 210, the a software thread, make this determination by querying the NIC 218 as indicated in block 632. In block 634, the network device 106 determines whether new packets have been received. If not, the method returns 600 returns to block 628 where the network device 106 again determines whether the NIC 218 has received new packets Otherwise, the method 600 continues with block 636, in which the network device 106, using DMA copied received packet data from the NIC 218 to the memory buffers that are assigned to the corresponding receive descriptors. This means that the packet data is now available in the memory buffers accessed by the entries in the ring and can be accessed by the work stages for processing. In some Embodiments, the network device 106 updates the metadata for these ring entries to indicate that the Entries are ready for processing by the work stages. In block 638, the network device 106 determines whether it static priming is used or not. In the illustrative embodiment, static priming means that the network device 106 primes the slots of the ring only once and then uses the same descriptors and memory buffers used again and again, instead of continuously regenerating the descriptors and reusing them for subsequent packets. new memory buffers. Whether static priming is used can be determined by a configuration setting stored in memory, a hardware configuration, or other criteria. Regardless of In response to a determination not to use static priming, the method 600 returns to block 604 of Fig. 6 to prime the ring with receive descriptors again. Otherwise, the method 600 returns to block 618 to identify available receive descriptors on the ring.

[0038] Referring now to Fig. 8, the network device 106 may employ a method 800 for Outputting (ie, sending) data packets by one or more output stages. The method 800 corresponds to block 434 of Fig. 5. In the illustrative embodiment, the hardware resources associated with the associated with one or more output stages (ie, one or more of the cores 230 and / or the NIC 218), the method 800. The method 800 begins with block 802 in which the network device 106 determines whether data packets are to be output. In the illustrative embodiment, the network device 106 determines Output data packets if hardware resources are allocated to one or more output stages that Network device 106 does not receive a request from another device, process, or application running on the Network device 106 is running, or has received a user to stop the output of data packets, and one or more entries in the ring have been completely processed by the work stages (such as Metadata specified, which is stored by the work stages in association with each ring entry In response to a determination to output data packets, the method 800 continues to block 804 in which the Network device 106 primes the ring with transmit descriptors. As indicated in block 806, the Network device 106 transmit descriptors and assigns them to slots in the ring as entries. As part of this process, the Network device 106 allocates a memory buffer for packet data, as indicated in block 808, and adds a pointer to the memory buffer to a corresponding transmit descriptor, as indicated in block 810. The network device 106 performs blocks 808 and 810 for each transmit descriptor assigned to a corresponding slot in the ring. In Embodiments in which the NIC 218 does not include hardware (e.g., the ring access logic 220) to directly access the ring prime, the network device 106 primes the ring using one or more cores 230 assigned to the one or assigned to the plurality of output stages, as indicated in block 812. In other embodiments, as indicated in block 814, the network device 106 may establish the ring using the NIC 218 hardware (ie, the Ring access logic 220). In embodiments in which multiple output stages are to prime the ring, Furthermore, the network device 106 coordinates its access to the ring slots to prevent them from attempting to prime the same slot, as indicated in block 816. In the illustrative embodiment, the Output stages use a modulo function in which each instance of the output stage follows a rule that it has a Entry is only processed if the running number of the instance of the output level, modulo the number of instances of the Output stage, is equal to a stage instance identifier assigned to that instance of the output stage. If further a specific ring entry has been primed (i.e. the send descriptor has been added to this entry), the corresponding output level also adds metadata to the entry, indicating that the entry has been primed and the associated packet data is available to be provided to the NIC 218.

[0039] In block 818, the network device 106 identifies available transmit descriptors corresponding to the slots in the ring assigned, as by identifying entries in the ring with metadata indicating that the packet data available to be presented to the NIC 218 for sending. This process can be referred to as polling and may be executed by one or more cores 230 of the CPU 210, as indicated in block 820. Alternatively, as As indicated in block 822, this polling process may be performed by the NIC 218, as in embodiments in which the NIC 218 contains the ring access logic 220.

[0040] In block 824, the network device 106 determines whether transmit descriptors are available in the ring. If not, it returns the method 800 returns to block 818 in which the network device 106 again searches for available transmit descriptors in the ring identified. Otherwise, the method 800 may continue with block 826 of Figure 9, in which the network device 106 using at least one core 230 assigned to an input stage, the one or more available send descriptors from the ring to the NIC send queue (ie, the NIC queue data 308) Similar to the NIC receive queue, in which receive descriptors are continuously copied in order The NIC send queue contains send descriptors that are continuously arranged in sequence Similar to block 626, which is performed by embodiments in which the NIC 218 is not equipped, To access the receive descriptors directly in the ring, block 826 is performed by those embodiments in which the NIC 218 is not equipped to access the transmit descriptors directly in the ring (ie, embodiments in which the NIC 218 does not contain the ring access logic 220).

[0041] In block 828, the network device 106 copies, using DMA, the packet data from the Memory buffers associated with the send descriptors that are available (i.e. those entries with metadata that indicate that the work stages have finished processing the packet data) to NIC 218 for sending to a other device (ie, the destination endpoint node 108). In block 830, the network device 106 may access the NIC 218 query the transmission status to determine when the transmission ended.

[0042] In block 832, the network device 106 determines whether it is using static priming. This determination is similar to the determination made in block 632 of Fig. 7 and is based on similar criteria (ie a configuration setting stored in memory, a hardware configuration, etc.). In response to a Determining that the network device 106 is not using static priming, the method 800 returns to block 804 of Fig. 8, in which the network device 106 reprimes the ring with transmit descriptors. Otherwise, the Method 800 returns to block 818 of Figure 8, in which the network device 106 again obtains available transmit descriptors for packet data that is ready to be sent.

[0043] Referring now to Fig. 10, a process 1000 according to embodiments of the method 600 in which the NIC 218 does not contain the ring access logic 220. As shown one or more priming threads 1010 associated with one or more input stages are one or more cores 230 of the CPU 210. These priming threads 1010 independently fill slot entries of a Rings 1020 with receive descriptors and pointers to buffers in main memory 212 used to store packet data A query thread 1030 associated with an input stage is also executed by one of the cores 230 of the CPU 210. The polling thread 1030 polls the ring 1020 to find available (i.e., free) primed to identify receive descriptors in ring 1020. As described with reference to method 600, a reception descriptor can be generated based on metadata stored in the ring entry by one of the input stages (i.e., one of the priming threads) are identified as available (i.e., free or primed). In other In some embodiments, a receive descriptor may be identified as available based on other criteria. The query Thread 1030 adds the available receive descriptors to the receive queue of NIC 218 (ie, copies the receive descriptors from the ring to the NIC receive queue). Furthermore, the polling thread queries 1030 packets that received by the NIC 218. In response to the NIC 218 receiving a packet, the NIC 218 copies the data of the packet directly to a corresponding memory buffer pointed to by the associated receive descriptor, which, as described above, is stored as part of an entry in a slot of the ring 1020. Furthermore, one or more Query worker threads 1040 (ie work stages) for and identify packet data that is ready for processing and access the packet data locally on Ring 1020 (ie, by accessing the packet data stored in the memory buffer referred to by the entry in ring 1020).

[0044] Referring now to Fig. 11, a process 1100 according to embodiments of the method 600 in which the NIC 218 does not include the ring access logic 220. In the process 1100, one or more Priming threads 1110 independently slot entries of a ring 1120 with receive descriptors and buffer pointers, as above described with reference to Fig. 10. However, in process 1100, the priming threads may be replaced by one or several cores 230 of the CPU 210 or by the NIC 218 itself, depending on whether this priming Function is implemented in the ring access logic 220 of the NIC 218. If not, the priming is performed by one or several of the cores 230 of the CPU 210. The NIC 218 performs a Query process 1130 for querying the ring to identify available primed descriptors in the ring 1120, such as reading the metadata of the entries to identify entries with metadata indicating that the Receive descriptor has been primed and / or that the memory buffer is available to receive packet data. Furthermore, when the NIC 218 receives one or more new packets, the NIC 218 copies the packet data to the Memory buffers identified by the receive descriptors in ring entries. As described above, one or more worker threads (ie work stages) 1140 packet data and identify those that are to be processed ready, and access the packet data locally on Ring 1120 (ie by accessing the packet data stored in the memory buffer referenced by the entry in ring 1120). Given that the NIC 218 has offloaded an input stage functionality from the cores 230 of the CPU 210, the process 1100 can more efficiently than the process 1000 and can free up more of the 230 cores for use by the work stages.

[0045] Referring now to Fig. 12, a process 1200 is shown that incorporates embodiments of the method 800 in which the NIC 218 does not include the ring access logic 220. As shown, one or more Work stages (ie worker threads) 1210 packets as ready to send, as determined by updating the metadata of the Ring entries associated with those packages. Furthermore, one or more priming threads 1220, as shown, associated with one or more output stages, executed by one or more cores 230 of the CPU 210. The priming threads 1220 independently fill slot entries of a ring 1230 with send descriptors and pointers to the Buffers in main memory that contain the processed packet data ready for transmission. A polling thread 1240, which is linked to an output stage, is also executed by one of the cores 230 of the CPU 210. The query Thread 1240 polls the ring to identify available (i.e., free) primed send descriptors in ring 1230. How with reference to the method 800, a transmission descriptor may be generated based on metadata stored in the ring entry by one of the output stages (i.e. one of the priming threads) as available (i.e. free or primed). In other embodiments, a transmit descriptor may be identified based on criteria other than The query thread 1240 adds the available send descriptors to the send queue of the NIC 218 (ie copies the transmit descriptors from ring 1230 to the NIC transmit queue). Furthermore, the Network device 106 forwards the packet data from the memory buffers referenced in ring 1230 to the NIC 218 at Using DMA. The NIC 218 sends the packet data that were copied to it via DMA and the polling thread 1240 queries the NIC 218 for the sending status.

[0046] Referring now to Fig. 13, a process 1300 is shown that corresponds to the embodiments of the method 800 in which the NIC 218 does not include the ring access logic 220. In the process 1300, one or more several work stages (ie worker threads) 1310 packets as ready to send, as above with reference to Fig. 12 described. Furthermore, one or more priming threads 1320 independently fill slot entries of a ring 1330 with Send descriptors and pointers to the memory buffers where the processed packet data is stored. In process 1300 The priming threads 1320 can be initiated by one or more cores 230 of the CPU 210 or by the NIC 218 itself be executed, depending on whether this priming function is implemented in the ring access logic 220 of the NIC 218. If not, priming is performed by one or more of the cores 230 of the CPU 210. The NIC 218 queries Using the ring access logic 220, the ring 1330 is scanned to find available primed descriptors in the ring 1330. identify, such as by reading the metadata of the entries to identify entries with metadata indicating that the transmit descriptor has been primed. NIC 218 also copies the packet data from the memory buffers accessed by the primed transmit descriptors in ring 1330 to the NIC 218 using DMA and sends the Packet data to another device (e.g., the destination endpoint node 108). In addition, the NIC 218 generates a Status update indicating that the one or more packets have been sent. The The memory buffer that held the packet data can be used to store other packet data. By unloading Output stage functions (ie, priming and / or polling) to the NIC 218, the process 1300 may be more efficient than the Process 1200 and more cores 230 of CPU 210 may be available for use by the work stages. EXAMPLES

[0047] Illustrative examples of the technologies disclosed herein are provided below. Embodiment of the technologies may include one or more and any combination of the examples described below contain.

[0048] Example 1 includes a network device for processing packets, the network device comprising one or more processors containing a plurality of cores; a network interface controller (NIC) connected to coupled to the one or more processors; and one or more memory devices on which a A plurality of instructions is stored which, when executed by the one or more processors cause the network device to store a ring in a memory of the one or more storage devices, wherein the ring is defined as a circular buffer and has a plurality of slots for Storing entries that are representative of packets; generating receive descriptors and assigning them to the slots in the Ring, where each receive descriptor contains a pointer to a corresponding memory buffer for storing of packet data; to determine whether the NIC has received one or more packets; and with direct Memory access (DMA) and in response to a determination that the NIC has received one or more packets, Copy packet data of the one or more received packets from the NIC to the memory buffers associated with the Receive descriptors assigned to the slots in the ring.

[0049] Example 2 includes the subject matter of Example 1 and wherein generating and assigning the receive descriptors to the slots in the ring includes generating and assigning the receive descriptors with one or more of the cores.

[0050] Example 3 includes the subject matter of any of Examples 1 and 2 and wherein generating and assigning the Receive descriptors to the slots in the ring. Generating and assigning the receive descriptors with one or several hardware components of the NIC.

[0051] Example 4 includes the subject matter of any of Examples 1-3 and wherein generating and assigning the Receive descriptors to the slots in the ring. Generate and assign the receive descriptors using multiple instances of an input stage running as separate threads.

[0052] Example 5 includes the subject matter of any of Examples 1-4 and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to access the to coordinate multiple instances of the input stage to the slots using a modulo function.

[0053] Example 6 includes the subject matter of any of Examples 1-5 and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to process available receive descriptors in the ring before the packet data is copied from the NIC, and where copying of the packet data from the NIC a copy of packet data from the NIC to the memory buffers associated with the identified available Reception descriptors are linked.

[0054] Example 7 includes the subject matter of any of Examples 1-6 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more of the cores includes.

[0055] Example 8 includes the subject matter of any of Examples 1-7 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more hardware Components of the NIC.

[0056] Example 9 includes the subject matter of any of Examples 1-8 and wherein identifying the available Receive descriptors iterate through each slot in the ring in turn and analyze metadata stored in Linked to each slot, an indication that one or more of the receive descriptors are available are included.

[0057] Example 10 includes the subject matter of any of Examples 1-9 and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to Receive descriptors from the ring to a NIC receive queue before determining whether the NIC is on or has received several packets.

[0058] Example 11 includes the subject matter of any of Examples 1-10 and wherein a determination of whether the NIC is one or has received multiple packets, involves querying the NIC with one or more of the cores.

[0059] Example 12 includes the subject matter of any of Examples 1-11 and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device To generate send descriptors and assign them to the slots in the ring, where each send descriptor contains a pointer to a corresponding memory buffer where packet data to be sent is stored; send descriptors for slots of the Rings associated with packet data marked as ready to send; with DMA packet data from the memory buffers associated with the identified transmit descriptors to the NIC for transmission.

[0060] Example 13 includes the subject matter of any of Examples 1-12 and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more of the cores.

[0061] Example 14 includes the subject matter of any of Examples 1-13 and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more Hardware components of the NIC.

[0062] Example 15 includes the subject matter of any of Examples 1-14, and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to Process packet data with one or more work stages; and metadata associated with the slots associated with associated with the packet data to indicate that the packet data is ready to be sent before the Packet data is copied to the NIC for sending.

[0063] Example 16 includes the subject matter of any of Examples 1-15 and wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to identified send descriptors to a NIC send queue before the packet data from the memory buffers are copied to the NIC.

[0064] Example 17 includes a method for processing packets, comprising establishing, by a Network device, a ring in a memory of the network device, wherein the ring acts as a circular buffer defined and contains a plurality of slots for storing entries representative of packages; generating and assigning, by the network device, receive descriptors to the slots in the ring, each Receive descriptor contains a pointer to a corresponding memory buffer for storing packet data; Determining, by the network device, whether a network interface controller (NIC) of the network device is a or multiple packets; and copying, with direct memory access (DMA) and in response to a Determining that the NIC has received one or more packets of packet data of the one or more received packets from the NIC to the memory buffers associated with the receive descriptors that correspond to the slots assigned in the ring.

[0065] Example 18 includes the subject matter of Example 17 and wherein generating and assigning the Receive descriptors to the slots in the ring. Generating and assigning the receive descriptors with one or multiple cores of a processor of the network device.

[0066] Example 19 includes the subject matter of any of Examples 17 and 18, and wherein generating and assigning the Receive descriptors to the slots in the ring. Generating and assigning the receive descriptors with one or several hardware components of the NIC.

[0067] Example 20 includes the subject matter of any of Examples 17-19, and wherein generating and assigning the Receive descriptors to the slots in the ring. Generate and assign the receive descriptors using multiple instances of an input stage running as separate threads.

[0068] Example 21 includes the subject matter of any of Examples 17-20, and further includes coordinating by the Network device, an access of the multiple instances of the input stage to the slots with a modulo function.

[0069] Example 22 includes the subject matter of any of Examples 17-21, and further including identifying by the Network device, available receive descriptors in the ring before the packet data is copied from the NIC and wherein copying the packet data from the NIC comprises copying the packet data from the NIC to the memory buffers, linked to the identified available reception descriptors.

[0070] Example 23 includes the subject matter of any of Examples 17-22 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more cores of a Processor of the network device.

[0071] Example 24 includes the subject matter of any of Examples 17-23 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more hardware Components of the NIC.

[0072] Example 25 includes the subject matter of any of Examples 17-24 and wherein identifying the available Receive descriptors, iterating through each slot in the ring in turn; and analyzing metadata stored in Linked to each slot, an indication that one or more of the receive descriptors are available are included.

[0073] Example 26 includes the subject matter of any of Examples 17-25, and further including copying by the Network device that sends receive descriptors from the ring to a NIC receive queue before determining whether the NIC has received one or more packets.

[0074] Example 27 includes the subject matter of any of Examples 17-26 and wherein determining whether the NIC is one or has received several packets, querying the NIC with one or more cores of a processor of the network device.

[0075] Example 28 includes the subject matter of any of Examples 17-27, and further including generating and assigning through the network device, from transmit descriptors to the slots in the ring, where each transmit descriptor contains a pointer to contains a corresponding memory buffer where packet data to be sent is stored; an identification by which Network device, of transmit descriptors for slots of the ring associated with packet data that are considered to be for transmitting ready; and copying, with DMA, packet data from the memory buffers identified with the Send descriptors are linked to the NIC for sending.

[0076] Example 29 includes the subject matter of any of Examples 17-28, and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more cores of a processor of the network device.

[0077] Example 30 includes the subject matter of any of Examples 17-29, and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more Hardware components of the NIC.

[0078] Example 31 contains the subject matter of any of Examples 17-30, and further comprising processing by which Network device, the packet data with one or more work stages; and modifying, by the Network device, from metadata associated with the slots associated with the packet data to to indicate that the packet data is ready to be sent before the packet data is copied to the NIC for sending.

[0079] Example 32 includes the subject matter of any of Examples 17-31, and further including copying by the Network device, the identified send descriptors to a NIC send queue before the packet data from the memory buffers are copied to the NIC.

[0080] Example 33 includes a network device comprising one or more processors; and a memory on which which stores a plurality of instructions which, when executed by the one or more processors executed, causing the network device to perform the method of any of Examples 17-32.

[0081] Example 34 includes one or more machine-readable storage media that have a plurality of Include instructions which, when executed, cause a network device to perform the method of one of the Examples 17-32.

[0082] Example 35 includes a network device for processing packets, the network device comprising one or more processors including a plurality of cores; one or more memory devices connected to coupled to the one or more processors; a network interface controller (NIC) coupled to the one or which is coupled to a plurality of processors; a ring management circuit for (i) establishing a ring in a Memory of the one or more memory devices, wherein the ring is defined as a circular buffer and a plurality of slots for storing entries representative of packages, and (ii) generating and assigning of receive descriptors to the slots in the ring, where each receive descriptor contains a pointer to a corresponding memory buffer for storing packet data; a network communication circuit for determining whether the NIC has received one or more packets; and a direct memory access (DMA) circuit for copying, with DMA and in response to a determination that the NIC has received one or more packets, of packet data of the one or multiple received packets from the NIC to the memory buffers associated with the receive descriptors are assigned to the slots in the ring.

[0083] Example 36 includes the subject matter of Example 35 and wherein generating and assigning the Receive descriptors to the slots in the ring. Generating and assigning the receive descriptors with one or several of the cores.

[0084] Example 37 includes the subject matter of any of Examples 35 and 36, and wherein generating and assigning the Receive descriptors to the slots in the ring. Generating and assigning the receive descriptors with one or several hardware components of the NIC.

[0085] Example 38 includes the subject matter of any of Examples 35-37 and wherein generating and assigning the Receive descriptors to the slots in the ring. Generate and assign the receive descriptors using multiple instances of an input stage running as separate threads.

[0086] Example 39 includes the subject matter of any of Examples 35-38, and wherein the ring management circuit further comprises coordinate access of multiple instances of the input stage to the slots with a modulo function.

[0087] Example 40 includes the subject matter of any of Examples 35-39, and wherein the ring management circuit further comprises identify available receive descriptors in the ring before the packet data is copied from the NIC, and where copying the packet data from the NIC includes copying the packet data from the NIC to the memory buffers associated with linked to the identified available reception descriptors.

[0088] Example 41 includes the subject matter of any of Examples 35-40 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more of the cores includes.

[0089] Example 42 includes the subject matter of any of Examples 35-41 and wherein identifying the available Receive descriptors identifying the available receive descriptors with one or more hardware Components of the NIC.

[0090] Example 43 includes the subject matter of any of Examples 35-42 and wherein identifying the available Receive descriptors iterate through each slot in the ring in turn and analyze metadata stored in Linked to each slot, an indication that one or more of the receive descriptors are available are included.

[0091] Example 44 includes the subject matter of any of Examples 35-43, and wherein the ring management circuit further comprises the Receive descriptors from the ring to a NIC receive queue before determining whether the NIC is on or has received several packets.

[0092] Example 45 includes the subject matter of any of Examples 35-44 and wherein a determination of whether the NIC is one or has received multiple packets, involves querying the NIC with one or more of the cores.

[0093] Example 46 includes the subject matter of any of Examples 35-45, and wherein the ring management circuit further comprises Generate send descriptors and assign them to the slots in the ring, where each send descriptor is a pointer to a corresponding memory buffer where packet data to be sent is stored, and send descriptors for slots of the Rings associated with packet data marked as ready to send; and the DMA Circuit further with DMA packet data from the memory buffers, the associated with the identified transmit descriptors to the NIC for sending.

[0094] Example 47 includes the subject matter of any of Examples 35-46 and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more of the cores.

[0095] Example 48 includes the subject matter of any of Examples 35-47 and wherein generating and assigning the Send descriptors to the slots in the ring. Generating and assigning the send descriptors with one or more Hardware components of the NIC.

[0096] Example 49 includes the subject matter of any of Examples 35-48, and wherein the ring management circuit further comprises the to process packet data with one or more work stages; and metadata associated with the slots associated with associated with the packet data to indicate that the packet data is ready to be sent before the Packet data is copied to the NIC for sending.

[0097] Example 50 includes the subject matter of any of Examples 35-497, and wherein the ring management circuit further comprises the identified send descriptors to a NIC send queue before the packet data from the memory buffers are copied to the NIC.

[0098] Example 51 includes a network device for processing packets, the network device comprising Means for establishing a ring in a memory of the network device, the ring being configured as a circular buffer and containing a plurality of slots for storing entries representative of packets; means for Generate and assign receive descriptors to the slots in the ring, where each receive descriptor contains a pointer to a corresponding memory buffer for storing packet data; a Network communication circuitry for determining whether a network interface controller (NIC) of the network device has received one or more packets; and a direct memory access (DMA) circuit for Copy, with DMA and in response to a determination that the NIC has received one or more packets from Packet data of the one or more received packets from the NIC to the memory buffers associated with the Receive descriptors assigned to the slots in the ring.

[0099] Example 52 includes the subject matter of Example 51 and wherein the means for generating and assigning the Receive descriptors to the slots in the ring a means for generating and assigning the receive descriptors with a or more cores of a processor of the network device.

[0100] Example 53 includes the subject matter of any of Examples 51 and 52 and wherein the means for generating and Assigning the receive descriptors to the slots in the ring a means of generating and assigning the Receive descriptors with one or more hardware components of the NIC.

[0101] Example 54 includes the subject matter of any of Examples 51-53 and wherein the means for generating and assigning of the receive descriptors to the slots in the ring a means for generating and assigning the receive descriptors under Use of multiple instances of an input stage running as separate threads.

[0102] Example 55 contains the subject matter of any of Examples 51-54, and further comprising means for coordinating a Access of the multiple instances of the input stage to the slots with a modulo function.

[0103] Example 56 contains the subject matter of any of Examples 51-55, and further comprising means for identifying available receive descriptors in the ring before the packet data is copied from the NIC, and wherein the means for Copying the packet data from the NIC Means for copying the packet data from the NIC to the memory buffers associated with the identified available reception descriptors.

[0104] Example 57 includes the subject matter of any of Examples 51-56 and wherein the means for identifying the available reception descriptors means for identifying the available reception descriptors with one or multiple cores of a processor of the network device.

[0105] Example 58 includes the subject matter of any of Examples 51-57 and wherein the means for identifying the available reception descriptors means for identifying the available reception descriptors with one or several hardware components of the NIC.

[0106] Example 59 includes the subject matter of any of Examples 51-58 and wherein the means for identifying the available receive descriptors, means for iterating sequentially through each slot in the ring; and means for Analyzing metadata stored in association with each slot for an indication that one or more of the reception descriptors are available.

[0107] Example 60 includes the subject matter of any of Examples 51-59, and further including means for copying the Receive descriptors from the ring to a NIC receive queue before determining whether the NIC is on or has received several packets.

[0108] Example 61 includes the subject matter of any of Examples 51-60 and wherein the network communication circuit to determine whether the NIC has received one or more packets, a circuit for querying the NIC with a or more cores of a processor of the network device.

[0109] Example 62 includes the subject matter of any of Examples 51-61, and further including means for generating and Assigning send descriptors to the slots in the ring, where the send descriptor contains a pointer to a corresponding Contains a memory buffer where packet data to be sent is stored; means for identifying send descriptors for Slots of the ring associated with packet data marked as ready to be sent; and wherein the DMA circuit a circuit for copying, with DMA, packet data from the memory buffers identified with the Send descriptors are linked to the NIC for sending.

[0110] Example 63 includes the subject matter of any of Examples 51-62 and wherein the means for generating and assigning the transmit descriptors to the slots in the ring Means for generating and assigning the transmit descriptors with one or multiple cores of a processor of the network device.

[0111] Example 64 includes the subject matter of any of Examples 51-63 and wherein the means for generating and assigning the transmit descriptors to the slots in the ring Means for generating and assigning the transmit descriptors with one or several hardware components of the NIC.

[0112] Example 65 contains the subject matter of any of Examples 51-64, and further comprising means for processing the Packet data having one or more work stages; and means for modifying metadata associated with the slots associated with the packet data to indicate that the packet data is ready to be sent before the Packet data is copied to the NIC for sending.

[0113] Example 66 contains the subject matter of any of Examples 51-65, and further comprising means for copying the identified send descriptors to a NIC send queue before the packet data from the memory buffers to the NIC be copied.

Claims

1. A network device (106) for processing packets, the network device comprising: one or more processors (210) including a plurality of cores (232, 234, ..., 246); a network interface controller (218) NIC coupled to the one or more processors; and one or more memory devices (222) on which a plurality of instructions are stored which, when executed by the one or more processors, causing the network device to: Establishing a ring (1020, 1120) in a memory of the one or more storage devices (404), wherein the Ring is defined as a circular buffer and contains a plurality of slots for storing entries that are used for packets are representative; Generating and assigning receive descriptors to the slots in the ring, (606), each receive descriptor having a Contains a pointer to a corresponding memory buffer for storing packet data; Determining whether the receive descriptors are available in the ring (624); Copying the receive descriptors from the ring to a NIC receive queue, (626), and in response to the Determining that the receive descriptors are available on the ring; Determining whether the NIC has received one or more packets (628); and Copy, with direct memory access DMA (636) and in response to determining that the NIC has one or more packets received, from packet data of the one or more received packets from the NIC to the Memory buffers associated with the receive descriptors in the NIC receive queue that correspond to the slots in the Ring are assigned, (634).

2. Network device according to claim 1, wherein generating and assigning the receive descriptors to the slots in the Ring comprises generating and assigning the receive descriptors with one or more of the cores (612).

3. Network device according to claim 1, wherein generating and assigning the receive descriptors to the slots in the Ring a Generate and assign the receive descriptors with one or more hardware components of the NIC includes, (614).

4. The network device of claim 1, wherein generating and assigning the receive descriptors to the slots in the Ring a Generate and assign the receive descriptors using multiple instances of an input stage which are executed as separate threads (616).

5. The network device of claim 4, wherein the plurality of instructions, when executed by the one or more processors, further causing the network device to block access by the multiple instances of the Input level to coordinate the slots with a modulo function.

6. The network device of claim 1, wherein the plurality of instructions, when executed by the one or more processors are executed, further causing the network device to use available receive descriptors in the ring identify before the packet data is copied from the NIC, and wherein copying the packet data from the NIC is a Copying the packet data from the NIC to the memory buffers that are associated with the identified available Reception descriptors are linked.

7. The network device of claim 6, wherein identifying the available receive descriptors comprises identifying of the available receive descriptors with one or more of the cores.

8. The network device of claim 6, wherein identifying the available receive descriptors comprises identifying of the available receive descriptors with one or more hardware components of the NIC.

9. The network device of claim 6, wherein identifying the available receive descriptors comprises iterating the Sequentially through each slot in the ring and analyzing metadata stored in association with each slot, to an indication that one or more of the reception descriptors are available.

10. The network device of claim 1, wherein determining whether the NIC has received one or more packets comprises a Querying the NIC with one or more of the cores.

11. A network device according to claim 1, wherein the plurality of instructions, when executed by the one or more multiple processors, further causing the network device to: Generate and assign send descriptors to the slots in the ring, where each send descriptor contains a pointer to a contains the corresponding memory buffer where packet data to be sent is stored; Identify transmit descriptors for slots of the ring associated with packet data that is ready to be transmitted are marked; Copying, with DMA, packet data from the memory buffers associated with the identified transmit descriptors, to the NIC to send.

12. A method (400, 600) for processing packets, comprising: Establishing, by a network device (106), a ring (1020, 1120) in a memory of the network device, (400), wherein the ring is defined as a circular buffer and has a plurality of slots for storing entries contains information representative of packages; Generating and assigning, by the network device, receive descriptors to the slots in the ring, (606), wherein each receive descriptor contains a pointer to a corresponding memory buffer for storing packet data; Determining, by the network device, whether the receive descriptors are available in the ring (624); Copying, by the network device, the receive descriptors from the ring to a Network interface control receive queue of the network device, (626), and in response to a Determination, by the network device, that the receive descriptors are available in the ring, (624) by the network device; Determining, by the network device, whether a network interface controller NIC of the network device is one or has received several packets, (628); and Copy, with direct memory access DMA (636) and in response to determining that the NIC has one or more received packets, (634), from packet data of the one or more received packets from the NIC to the Memory buffers associated with the receive descriptors in the NIC receive queue that correspond to the slots in the Ring are assigned.

13. The method of claim 12, wherein generating and assigning the receive descriptors to the slots in the ring comprises Generating and assigning the receive descriptors with one or more cores of a processor of the Network device comprises (612).

14. The method of claim 12, wherein generating and assigning the receive descriptors to the slots in the ring comprises Generating and assigning the receive descriptors with one or more hardware components of the NIC, (614).

15. The method of claim 12, wherein generating and assigning the receive descriptors to the slots in the ring comprises Generate and assign the receive descriptors using multiple instances of an input stage executing as separate threads (616).

16. The method of claim 15, further comprising coordinating, by the network device, access of the multiple instances of the input stage to the slots with a modulo function.

17. The method of claim 12, further comprising identifying, by the network device, available Receive descriptors in the ring before the packet data is copied from the NIC, and where copying the packet data from the NIC involves copying the packet data from the NIC to the memory buffers associated with the identified available reception descriptors.

18. The method of claim 17, wherein identifying the available receive descriptors comprises identifying the available receive descriptors with one or more cores of a processor of the network device.

19. The method of claim 17, wherein identifying the available receive descriptors comprises identifying the available receive descriptors with one or more hardware components of the NIC.

20. The method of claim 17, wherein identifying the available receive descriptors comprises: Iterate through each slot in the ring in turn; and Analyzing metadata stored in association with each slot for an indication that one or more the reception descriptors are available.

21. The method of claim 12, wherein determining whether the NIC has received one or more packets comprises querying the NIC comprises one or more cores of a processor of the network device.

22. A network device comprising: one or more processors; and a memory on which a plurality of instructions are stored which, when executed by the one or more several processors, causing the network device to carry out the method according to one of the claims 12-21.

23. One or more machine-readable storage media having a plurality of instructions stored thereon which, as a result of their execution, result in a network device implementing the method according to one of the Claims 12-21.

Citation Information

Patent Citations

  • Technologies for scalable packet reception and transmission

    US10341264B2

  • Transmit completion event batching

    US20060174251A1

  • Context switching with offload processors

    WO2014113063A1