NETWORK INTERFACE DEVICE

Information

  • Patent Application
  • 20210258284
  • Publication Number
    20210258284
  • Date Filed
    April 30, 2021
    3 years ago
  • Date Published
    August 19, 2021
    3 years ago
Abstract
A network interface device having a hardware module comprising a plurality of processing units. Each of the plurality of processing units is associated with its own at least one predefined operation. At a compile time, the hardware module is configured by arranging at least some of the plurality of processing units to perform their respective at least one operation with respect to a data packet in a certain order so as to perform a function with respect to that data packet. A compiler is provide to assign different processing stages to each processing unit. A controller is provided to switch between different processing circuitry on the fly so that one processing circuitry may be used whilst another is being compiled.
Description
FIELD

This application relates to network interface devices for performing a function with respect to data packets.


BACKGROUND

Network interface devices are known and are typically used to provide an interface between a computing device and a network. The network interface device can be configured to process data which is received from the network and/or process data which is to be put on the network.


SUMMARY

According to a first aspect, there is provided a network interface device for interfacing a host device to a network, the network interface device comprising: a first interface, the first interface being configured to receive a plurality of data packets; a configurable hardware module comprising a plurality of processing units, each processing unit being associated with a predefined type of operation executable in a single step, wherein at least some of said plurality of processing units are associated with different predefined types of operation, wherein the hardware module is configurable to interconnect at least some of said plurality of said processing units to provide a first data processing pipeline for processing one or more of said plurality of data packets to perform a first function with respect to said one or more of said plurality of data packets.


In some embodiments, the first function comprises a filtering function. In some embodiments, the function comprises at least one of a tunnelling, encapsulation, and routing function. In some embodiments, the first function comprises an extended Berkley packet filter function.


In some embodiments, the first function comprises a distributed denial of service scrubbing operation.


In some embodiments, the first function comprises a firewall operation.


In some embodiments, the first interface is configured to receive the first data packet from the network.


In some embodiments, the first interface is configured to receive the first data packet from the host device.


In some embodiments, two or more of the at least some of the plurality of processing units are configured to perform their associated at least one predefined operation in parallel.


In some embodiments, two or more of the at least some of the plurality of processing units are configured to perform their associated predefined type of operation according to a common clock signal of the hardware module.


In some embodiments, each of two or more of the at least some of the plurality of processing units is configured to perform its associated predefined type of operation within a predefined length of time defined by a clock signal.


In some embodiments, two or more of the at least some of the plurality of processing units are configured to: access the first data packet within a time period of the predefined length of time; and in response to the end of the predefined length of time, transfer results of the respective at least one operation to a next processing unit.


In some embodiments, the results comprise at least one or more of: at least value from the one or more of the plurality of data packets; updates to map state; and metadata.


In some embodiments, each of the plurality of processing units comprises an application specific integrated circuit configured to perform the at least one operation associated with the respective processing unit.


In some embodiments, each of the processing units comprises a field programmable gate array. In some embodiments, each of the processing units comprises any other type of soft logic.


In some embodiments, at least one of the of the plurality of processing units comprises a digital circuit and a memory storing state related to processing carried out by the digital circuit, wherein the digital circuit is configured to, in communication with the memory, perform the predefined type of operation associated with the respective processing unit.


In some embodiments, the network interface device comprises a memory accessible to two or more of the plurality of processing units, wherein the memory is configured to store state associated with a first data packet, wherein during performance of the first function by the hardware module, two or more of the plurality of processing units are configured to access and modify the state.


In some embodiments, a first of the at least some of the plurality of processing units is configured to stall during access of a value of the state by a second of the plurality of processing units.


In some embodiments, one or more of the plurality of processing units are individually configurable to, based on their associated predefined type of operation, perform an operation specific to a respective pipeline.


In some embodiments, the hardware module is configured to receive an instruction, and in response to said instruction, at least one of: interconnect at least some of said plurality of said processing units to provide a data processing pipeline for processing one or more of said plurality of data packets; cause one or more of said plurality of processing units to perform their associated predefined type of operation with respect to said one or more data packets; add one or more of said plurality of processing units into a data processing pipeline; and remove one or more of said plurality of processing units from a data processing pipeline.


In some embodiments, the predefined operation comprises at least one of: loading at least one value of the first data packet from a memory; storing at least one value of a data packet in a memory; and performing a look up into a look up table to determine an action to be carried out with respect to a data packet.


In some embodiments, the hardware module is configured to receive an instruction, wherein the hardware module is configurable to, in response to said instruction, interconnect at least some of said plurality of said processing units to provide a data processing pipeline for processing one or more of said plurality of data packets, wherein the instruction comprises a data packet sent through the third processing pipeline.


In some embodiments, one or more the at least some of the plurality of processing units are configurable to, in response to said instruction, perform a selected operation of their associated predefined type of operation with respect to said one or more of the plurality of data packets.


In some embodiments, the plurality of components comprises a second of the plurality of components configured to provide the first function in circuitry different to the hardware module, wherein the network interface device comprises at least one controller configured to cause data packets passing through the processing pipeline to be processed by one of: the first of the plurality of components and the second of the plurality of components.


In some embodiments, the network interface device comprises at least one controller configured to issue an instruction to cause the hardware module to begin performing the first function with respect to data packets, wherein the instruction is configured to cause the first of the plurality of components to be inserted into the processing pipeline.


In some embodiments, the network interface device comprises at least one controller configured to issue an instruction to cause the hardware module to begin performing the first function with respect to data packets, wherein the instruction comprises a control message sent through the processing pipeline and configured to cause the first of the plurality of components to be activated.


In some embodiments, for one or more of the at least some of the plurality of processing units, the associated at least one operation comprises at least one of: loading at least one value of the first data packet from a memory of the network interface device; storing at least one value of the first data packet in a memory of the network interface device; and performing a look up into a look up table to determine an action to be carried out with respect to the first data packet.


In some embodiments, one or more of the at least some of the plurality of processing units is configured to pass at least one result of its associated at least one predefined operation to a next processing unit in the first processing pipeline, the next processing unit being configured to perform a next predefined operation in dependence upon the at least one result.


In some embodiments, each of the different predefined types of operation is defined by a different template.


In some embodiments, wherein the types of predefined operation comprise at least one of: accessing a data packet; accessing a lookup table stored in a memory of the hardware module; performing logic operations on data loaded from a data packet; and performing logic operations on data loaded from the lookup table.


In some embodiments, the hardware module comprises routing hardware, wherein the hardware module is configurable to interconnect at least some of said plurality of said processing units to provide the first data processing pipeline by configuring the routing hardware to route data packets between the plurality of processing units in a particular order defined by the first data processing pipeline.


In some embodiments, the hardware module is configurable to interconnect at least some of said plurality of said processing units to provide a second data processing pipeline for processing one or more of said plurality of data packets to perform a second function different to the first function.


In some embodiments, the hardware module is configurable to interconnect at least some of said plurality of said processing units to provide a second data processing pipeline after interconnecting at least some of the plurality of said processing units to provide the first data processing pipeline.


In some embodiments, the network interface device comprises further circuitry separate to the hardware module and configured to perform the first function for one or more of said plurality of data packets.


In some embodiments, the further circuitry comprises at least one of: a field programmable gate array; and a plurality of central processing units.


In some embodiments, the network interface device comprises at least one controller, wherein the further circuitry is configured to perform the first function with respect to data packets during a compilation process for the first function to be performed in the hardware module, wherein the at least one controller is configured to, in response to completion of the compilation process, control the hardware module to begin performing the first function with respect to data packets.


In some embodiments, the further circuitry comprises a plurality of central processing units.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to be performed in the hardware module is complete, control the further circuitry to cease performing the first function with respect to data packets.


In some embodiments, the network interface device comprises at least one controller, wherein the hardware module is configured to perform the first function with respect to data packets during a compilation process for the first function to be performed in the further circuitry, wherein the at least one controller is configured to determine that the compilation process for the first function to be performed in the further circuitry is complete and, in response to said determination, control the further circuitry to begin performing the first function with respect to data packets.


In some embodiments, the further circuitry comprises a field programmable gate array.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to performed in the further circuitry is complete, control the hardware module to cease performing the first function with respect to data packets.


In some embodiments, the network interface device comprises at least one controller configured to perform a compilation process to provide the first function to be performed in the hardware module.


In some embodiments, the compilation process comprises providing instructions to provide a control plane interface in the hardware module that responds to control messages.


According to a second aspect, there is provided a data processing system comprising the network interface device according to the first aspect and the host device and, wherein the data processing system comprises at least one controller configured to perform a compilation process to provide the first function to be performed in the hardware module.


In some embodiments, the at least one controller is provided by one or more of: the network interface device; and the host device.


In some embodiments, the compilation process is performed in response to a determination by the at least one controller that a computer program expressing the first function is safe for execution in kernel mode of the host device.


In some embodiments, the at least one controller is configured to perform the compilation process by assigning each of the at least some of the plurality of processing units to perform in a particular order of the first data processing pipeline, at least one operation from a plurality of operations expressed by a sequence of computer code instructions, wherein the plurality of operations provides the first function with respect to the one or more of the plurality of data packets.


In some embodiments, the at least one controller is configured to: prior to completion of the compilation process, send a first instruction to cause a further circuitry of the network interface device to perform the first function with respect to data packets; and send a second instruction to cause the hardware module to, following completion of the compilation process, begin performing the first function with respect to data packets.


According to a third aspect, there is provided a method for implementation in a network interface device, the method comprising: receiving, at a first interface, a plurality of data packets; and configuring a hardware module to interconnect at least some of a plurality of processing units of the hardware module so as to provide a first data processing pipeline for processing one or more of said plurality of data packets to perform a first function with respect to said one or more of said plurality of data packets, wherein each processing unit is associated with a predefined type of operation executable in a single step, wherein at least some of said plurality of processing units are associated with different predefined types of operation.


According to a fourth aspect, there is provided a non-transitory computer readable medium comprising program instructions for causing a network interface device to perform a method comprising: receiving, at a first interface, a plurality of data packets; and configuring a hardware module to interconnect at least some of a plurality of processing units of the hardware module so as to provide a first data processing pipeline for processing one or more of said plurality of data packets to perform a first function with respect to said one or more of said plurality of data packets, wherein each processing unit is associated with a predefined type of operation executable in a single step, wherein at least some of said plurality of processing units are associated with different predefined types of operation.


According to a fifth aspect, there is provided a processing unit configured to: perform at least one predefined operation with respect to a first data packet received at a network interface device; be connected to a first further processing unit configured to perform a first further at least one predefined operation with respect to the first data packet; be connected to a second further processing unit configured to perform a second further at least one predefined operation with respect to the first data packet; receive from the first further processing unit, results of the first further at least one predefined operation; perform the at least one predefined operation in dependence upon the results of the first further at least one predefined operation; send results of the at least one predefined operation to the second further processing unit for processing in the second further at least one predefined operation.


In some embodiments, the processing unit is configured to receive a clock signal for timing the at least one predefined operation, wherein the processing unit is configured to perform the at least one predefined operation in at least one cycle of the clock signal.


In some embodiments, the processing unit is configured to perform the at least one predefined operation in a single cycle of the clock signal.


In some embodiments, the at least one predefined operation, the first further at least one predefined operation, and the second further at least one predefined operation form part of a function performed with respect to a first data packet received at the network interface device.


In some embodiments, the first data packet is received from a host device, wherein the network interface device is configured to interface the host device to a network.


In some embodiments, the first data packet is received from a network, wherein the network interface device is configured to interface a host device to the network.


In some embodiments, the function is a filtering function.


In some embodiments, the filtering function is an extended Berkley packet filter function.


In some embodiments, the processing unit comprises an application specific integrated circuit configured to perform the at least one predefined operation.


In some embodiments, the processing unit comprises: a digital circuit configured to perform the at least one predefined operation; and a memory storing state related to the at least one predefined operation carried.


In some embodiments, the processing unit configured to access a memory accessible to the first further processing unit and the second further processing unit, wherein the memory is configured to store state associated with the first data packet, wherein the at least one predefined operation comprises modifying the state stored in the memory.


In some embodiments, the processing unit is configured during a first clock cycle to read a value of said state from the memory and provide said value to the second further processing unit for modification by the second further processing unit, wherein the processing unit is configured during a second clock cycle following the first clock cycle to stall.


In some embodiments, the at least one predefined operation comprises at least one of: loading the first data packet from a memory of the network interface device; storing the first data packet in a memory of the network interface device; and performing a look up into a look up table to determine an action to be carried out with respect to the first data packet.


According to a sixth aspect, there is provided a method implemented in a processing unit, the method comprising: performing at least one predefined operation with respect to a first data packet received at a network interface device; connecting to a first further processing unit configured to perform a first further at least one predefined operation with respect to the first data packet; connecting to a second further processing unit configured to perform a second further at least one predefined operation with respect to the first data packet; receiving from the first further processing unit, results of the first further at least one predefined operation; performing the at least one predefined operation in dependence upon the results of the first further at least one predefined operation; and sending results of the at least one predefined operation to the second further processing unit for processing in the second further at least one predefined operation.


According to a seventh aspect, there is provided a computer readable non-transitory storage device storing instructions that, when executed by a processing unit, cause the processing unit to perform a method comprising: performing at least one predefined operation with respect to a first data packet received at a network interface device; connecting to a first further processing unit configured to perform a first further at least one predefined operation with respect to the first data packet; connecting to a second further processing unit configured to perform a second further at least one predefined operation with respect to the first data packet; receiving from the first further processing unit, results of the first further at least one predefined operation; performing the at least one predefined operation in dependence upon the results of the first further at least one predefined operation; and sending results of the at least one predefined operation to the second further processing unit for processing in the second further at least one predefined operation.


According to an eighth aspect, there is provided a network interface device for interfacing a host device to a network, the network interface device comprising: at least one controller; a first interface, the first interface being configured to receive data packets; first circuity configured to perform a first function with respect to data packets received at the first interface; and second circuity, wherein the first circuitry is configured to perform the first function with respect to data packets received at the first interface during a compilation process for the first function to be performed in the second circuitry, wherein the at least one controller is configured to determine that the compilation process for the first function to performed in the second circuitry is complete and, in response to said determination, control the second circuitry to begin performing the first function with respect to data packets received at the first interface.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to performed in the second circuitry is complete, control the first circuitry to cease performing the first function with respect to data packets received at the first interface.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to performed in the second circuitry is complete: begin performing the first function with respect to data packets of a first data flow received at the first interface; and control the first circuitry to cease performing the first function with respect to data packets of the first data flow.


In some embodiments, the first circuitry comprises at least one central processing unit, wherein each of the at least one central processing unit is configured to perform the first function with respect to at least one data packet received at the first interface.


In some embodiments, the second circuitry comprises a field programmable gate array configured to begin performing the first function with respect to data packets received at the first interface.


In some embodiments, the second circuitry comprises a hardware module comprising a plurality of processing units, each processing unit being associated with at least one predefined operation, wherein the first interface is configured to receive a first data packet, wherein the hardware module is configured to, following the compilation process for the first function to performed in the second circuitry, cause at least some of the plurality of processing units to perform their associated at least one predefined operation in a particular order so as to perform a first function with respect to the first data packet.


In some embodiments, the first circuitry comprises a hardware module comprising a plurality of processing units, each processing unit being associated with at least one predefined operation, wherein the first interface is configured to receive a first data packet, wherein the hardware module is configured to, during the compilation process for the first function to be performed in the second circuitry, cause at least some of the plurality of processing units to perform their associated at least one predefined operation in a particular order so as to perform a first function with respect to the first data packet.


In some embodiments, the at least one controller is configured to, perform the compilation process for compiling the first function to be performed by the second circuitry.


In some embodiments, the at least one controller is configured to: prior to completion of the compilation process, instruct the first circuitry to perform the first function with respect to data packets received at the first interface.


In some embodiments, the compilation process for compiling the first function to be performed by the second circuitry is performed by the host device, wherein the at least one controller is configured to determine that the compilation process has been completed in response to receiving an indication of the completion of the compilation process from the host device.


In some embodiments, comprising: a processing pipeline for processing data packets received at the first interface, wherein the processing pipeline comprises a plurality of components each configured to perform one of a plurality of functions with respect to data packets received at the first interface, wherein a first of the plurality of components is configured to provide the first function when provided by the first circuitry, wherein a second of the plurality of components is configured to provide the first function when provided by the second at least one processing unit.


In some embodiments, the at least one controller is configured to control the second circuitry to begin performing the first function with respect to data packets received at the first interface by inserting the second of the plurality of components into the processing pipeline.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to performed in the second circuitry is complete, control the first circuitry to cease performing the first function with respect to data packets received at the first interface by removing the first of the plurality of components from the processing pipeline.


In some embodiments, the at least one controller is configured to control the second circuitry to begin performing the first function with respect to data packets received at the first interface by sending a control message through the processing pipeline to activate the second of the plurality of components.


In some embodiments, the at least one controller is configured to, in response to said determination that the compilation process for the first function to performed in the second circuitry is complete, control the first circuitry to cease performing the first function with respect to data packets received at the first interface by sending a control message through the processing pipeline to deactivate the second of the plurality of components.


In some embodiments, the first of the plurality of components is configured to provide the first function with respect to data packets a first data flow passing through the processing pipeline, wherein the second of the plurality of components is configured to provide the first function with respect to data packets of a second data flow passing through the processing pipeline.


In some embodiments, the first function comprises filtering data packets.


In some embodiments, the first interface is configured to receive the data packets from the network.


In some embodiments, the first interface is configured to receive the data packets from the host device.


In some embodiments, a compilation time of the first function for the second circuitry is greater than a compilation time of the first function for the first circuitry.


According to a ninth aspect, there is provided a method comprising: receiving data packets at a first interface of the network interface device; performing in first circuitry of the network interface device, a first function with respect to data packets received at the first interface; and wherein the first circuitry is configured to perform the first function with respect to data packets received at the first interface during a compilation process for the first function to be performed in the second circuitry, the method comprising: determining that the compilation process for the first function to performed in the second circuitry is complete; and in response to said determination, controlling second circuitry of the network interface device to begin performing the first function with respect to data packets received at the first interface.


According to a tenth aspect, there is provided a non-transitory computer readable medium comprising program instructions for causing a data processing system to perform a method comprising: receiving data packets at a first interface of the network interface device; performing in first circuitry of the network interface device, a first function with respect to data packets received at the first interface, wherein the first circuitry is configured to perform the first function with respect to data packets received at the first interface during a compilation process for the first function to be performed in the second circuitry, the method comprising: determining that the compilation process for the first function to performed in the second circuitry is complete; and in response to said determination, controlling second circuitry of the network interface device to begin performing the first function with respect to data packets received at the first interface.


According to a eleventh aspect, there is provided a non-transitory computer readable medium comprising program instructions for causing a data processing system to perform the following: performing a compilation process to compile a first function to be performed by a second circuitry of a network interface device; prior to completion of the compilation process, sending a first instruction to cause a first circuitry of the network interface device to perform the first function with respect to data packets received at a first interface of the network interface device; and sending a second instruction to cause the second circuitry to, following completion of the compilation process, begin performing the first function with respect to data packets received at the first interface.


In some embodiments, the non-transitory computer readable medium comprises program instructions for causing a data processing system to perform a further compilation process to compile the first function to be performed by the first circuitry, wherein the time taken for the compilation process is longer than the time taken for the further compilation process.


In some embodiments, the data processing system comprises a host device, wherein the network interface device is configured to interface the host device with a network.


In some embodiments, the data comprising system comprises the network interface device, wherein the network interface device is configured to interface a host device with a network.


In some embodiments, the data processing system comprises a host device and the network interface device, wherein the network interface device is configured to interface the host device with a network.


In some embodiments, the first function comprises filtering data packets received at the first interface from a network.


In some embodiments, the non-transitory computer readable medium comprises comprising program instructions for causing the data processing system to perform the following: sending a third instruction to cause the first circuitry to, following completion of the compilation process, cease performing the function with respect to data packets received at the first interface.


In some embodiments, the non-transitory computer readable medium comprises program instructions for causing the data processing system to perform the following: sending an instruction to cause the second circuitry to perform the first function with respect to data packets of a first data flow; and sending an instruction to cause the first circuitry to cease performing the first function with respect to data packets of the first data flow.


In some embodiments, the first circuitry comprises at least one central processing unit, wherein prior to completion of the second compilation process, each of the at least one central processing units is configured to perform the first function with respect to at least one data packet received at the first interface.


In some embodiments, the second circuity comprises a field programmable gate array configured to begin performing the first function with respect to data packets received at the first interface.


In some embodiments, the second circuity comprises a hardware module comprising a plurality of processing units, each processing unit being associated with at least one predefined operation, wherein the data packets received at the first interface comprise a first data packet, wherein the hardware module is configured to, following completion of the second compilation process, perform the first function with respect to the first data packet by each processing unit at least some of the plurality of processing units performing its respective at least one operation with respect to the first data packet.


In some embodiments, the first circuitry comprises a hardware module comprising a plurality of processing units configured to provide the first function with respect to a data packet, each processing unit being associated with at least one predefined operation. wherein the data packets received at the first interface comprise a first data packet, wherein the hardware module is configured to, prior to completion of the second compilation process, perform the first function with respect to the first data packet by each processing unit of at least some of the plurality of processing units performing its respective at least one operation with respect to the first data packet.


In some embodiments, the compilation process comprises assigning each of a plurality of processing units of the second circuitry to perform, in a particular order, at least one operation associated with one of a plurality of processing stages in a sequence of computer code instructions.


In some embodiments, the first function provided by the first circuitry is provided as a component of a processing pipeline for processing data packets received at the first interface, wherein the first function provided by the second circuitry is provided as a component of the processing pipeline.


In some embodiments, the first instruction comprises an instruction configured to cause the first of the plurality of components to be inserted into the processing pipeline.


In some embodiments, the second instruction comprises an instruction configured to cause the second of the plurality of components to be inserted into the processing pipeline.


In some embodiments, the non-transitory computer readable medium comprises comprising program instructions for causing the data processing system to perform the following: sending a third instruction to cause the first circuitry to, following completion of the compilation process, cease performing the first function with respect to data packets received at the first interface, wherein the third instruction comprises an instruction configured to cause the first of the plurality of components to be removed from the processing pipeline.


In some embodiments, the first instruction comprises a control message to be sent through the processing pipeline to activate the second of the plurality of components.


In some embodiments, the second instruction comprises a control message to be sent through the processing pipeline to activate the second of the plurality of components.


In some embodiments, the non-transitory computer readable medium comprises program instructions for causing the data processing system to perform the following: sending a third instruction to cause the first circuitry to, following completion of the compilation process, cease performing the function with respect to data packets received at the first interface, wherein the third instruction comprises a control message through the processing pipeline to deactivate the first of the plurality of components.


According to a twelfth aspect, there is provided a data processing system comprising at least one processor and at least one memory including computer program code, wherein the at least one memory and the computer program code are configured, with the at least one processor, to cause the data processing system to: perform a compilation process to compile a function to be performed by a second circuitry of a network interface device; prior to completion of the compilation process, instructing a first circuitry of the network interface device to perform the function with respect to data packets received at a first interface of a network interface device; and instructing the second at least one processing unit to, following completion of the second compilation process, begin performing the function with respect to data packets received at the first interface.


According to an thirteenth aspect, there is provided a method for implementation in a data processing system, the method comprising: performing a compilation process to compile a function to be performed by a second circuitry of a network interface device; prior to completion of the compilation process, sending a first instruction to cause a first circuitry of the network interface device to perform the function with respect to data packets received at a first interface of the network interface device; and sending a second instruction to cause the second circuitry to, following completion of the compilation process, begin performing the function with respect to data packets received at the first interface.


According to a fourteenth aspect, there is provided a non-transitory computer readable medium comprising program instructions for causing a data processing system to assign each of a plurality of processing units to perform, in a particular order, at least one operation associated with one of a plurality of processing stages in a sequence of computer code instructions, wherein the plurality of processing stages provides a first function with respect to a first data packet received at a first interface of a network interface device, wherein each of the plurality of processing units is configured to perform one of a plurality of types of processing, wherein at least some of the plurality of processing units are configured to perform different types of processing, wherein for each of the plurality of processing units, the assigning is performed in dependence upon determining that the processing unit is configured to perform a type of processing suitable for performing the respective at least one operation.


In some embodiments, each of the types of processing is defined by one of a plurality of templates.


In some embodiments, the types of processing include at least one of: accessing a data packet received at the network interface device; accessing a lookup table stored in a memory of the hardware module; performing logic operations on data loaded from the data packet; and performing logic operations on data loaded from the look table.


In some embodiments, two or more of the at least some of the plurality of processing units are configured to perform their associated at least one operation according to a common clock signal of the hardware module.


In some embodiments, the assigning comprises assigning each of two or more of the at least some of the plurality of processing units to perform its associated at least one operation within a predefined length of time defined by a clock signal.


In some embodiments, the assigning comprises assigning two or more of the at least some of the plurality of processing units to access the first data packet within a time period of the predefined length of time.


In some embodiments, the assigning comprises assigning each of the two or more of the at least some of the plurality of processing units to, in response to the end of a time period of the predefined length of time, transfer results of the respective at least one operation to a next processing unit.


In some embodiments, the non-transitory computer readable medium comprises program instructions for causing the data processing system to perform the following: assigning at least some of the plurality of stages to occupy a single clock cycle.


In some embodiments, the non-transitory computer readable medium comprises program instructions for causing the data processing system to assign two or more of the plurality of processing units to execute their assigned at least one operation to be executed in parallel.


In some embodiments, the network interface device comprises a hardware module comprising the plurality of processing units.


In some embodiments, the non-transitory computer readable medium comprises computer program instructions for causing the data processing system to perform the following: performing a compilation process comprising the assigning; prior to completion of the compilation process, sending a first instruction to cause a circuitry of the network interface device to perform the first function with respect to data packets received at the first interface; and sending a second instruction to cause the plurality of processing units to, following completion of the compilation process, begin performing the first function with respect to data packets received at the first interface.


In some embodiments, the non-transitory computer readable medium comprises, for one or more of the at least some of the plurality of processing units, the assigned at least one operation comprises at least one of: loading at least one value of the first data packet from a memory of the network interface device; storing at least one value of the first data packet in a memory of the network interface device; and performing a look up into a look up table to determine an action to be carried out with respect to the first data packet.


In some embodiments, the non-transitory computer readable medium comprises computer program instructions for causing the data processing system to issue an instruction to configure routing hardware of the network interface device to route the first data packet between the plurality of processing units in the particular order so as to perform the first function with respect to the first data packet.


In some embodiments, the first function provided by the plurality of processing units is provided as a component of a processing pipeline for processing data packets received at the first interface.


In some embodiments, the non-transitory computer readable medium comprises computer program instructions for causing the plurality of processing units to begin performing the first function with respect to data packets received at the first interface by causing the data processing system to issue an instruction to cause the component to be inserted into the processing pipeline.


In some embodiments, the non-transitory computer readable medium comprises computer program instructions for causing the plurality of processing units to begin performing the first function with respect to data packets received at the first interface by causing the data processing system to issue an instruction to cause the component to be activated in the processing pipeline.


In some embodiments, the data processing system comprises a host device, wherein the network interface device is configured to interface the host device with a network.


In some embodiments, the data processing system comprises the network interface device.


In some embodiments, the data processing system comprises: the network interface device; and a host device, wherein the network interface device is configured to interface the host device with a network.


According to a fifteenth aspect, there is provided a data processing system comprising at least one processor and at least one memory comprising computer program code, wherein the at least one memory and the computer program code are configured, with the at least one processor, to cause the data processing system to assign each of a plurality of processing units to perform, in a particular order, at least one operation associated with one of a plurality of processing stages in a sequence of computer code instructions, wherein the plurality of processing stages provides a first function with respect to a first data packet received at a first interface of a network interface device, wherein each of the plurality of processing units is configured to perform one of a plurality of types of processing, wherein at least some of the plurality of processing units are configured to perform different types of processing, wherein for each of the plurality of processing units, the assigning is performed in dependence upon determining that the processing unit is configured to perform a type of processing suitable for performing the respective at least one operation.


According to a sixteenth aspect, there is provided a method comprising assigning each of a plurality of processing units to perform, in a particular order, at least one operation associated with one of a plurality of processing stages in a sequence of computer code instructions, wherein the plurality of processing stages provides a first function with respect to a first data packet received at a first interface of a network interface device, wherein each of the plurality of processing units is configured to perform one of a plurality of types of processing, wherein at least some of the plurality of processing units are configured to perform different types of processing, wherein for each of the plurality of processing units, the assigning is performed in dependence upon determining that the processing unit is configured to perform a type of processing suitable for performing the respective at least one operation.


The processing units of the hardware module have been described as executing their type of operation in a single step. However, the skilled person would recognise that this feature is a preferred feature only and it not essential or indispensable for the function of the invention.





BRIEF DESCRIPTION OF FIGURES

Some embodiments will now be described by way of example only with reference to the accompanying figures in which:



FIG. 1 shows a schematic view of a data processing system coupled to a network;



FIG. 2 shows a schematic view of a data processing system comprising a filtering operation application configured to run in user mode on a host computing device;



FIG. 3 shows a schematic view of a data processing system comprising a filtering operation configured to run in kernel mode on a host computing device;



FIG. 4 shows a schematic view of a network interface device comprising a plurality of CPUs for performing a function with respect to data packets;



FIG. 5 shows a schematic view of a network interface device comprising a field programmable gate array running an application for performing a function with respect to data packets;



FIG. 6 shows a schematic view of a network interface device comprising a hardware module for performing a function with respect to data packets;



FIG. 7 shows a schematic view of a network interface device comprising a field programmable gate array and at least one processing unit for performing a function with respect to data packets;



FIG. 8 illustrates a method implemented in a network interface device according to some embodiments;



FIG. 9 illustrates a method implemented in a network interface device according to some embodiments;



FIG. 10 illustrates an example of processing a data packet by a series of programs;



FIG. 11 illustrates an example of processing a data packet by a plurality of processing units;



FIG. 12 illustrates an example of processing a data packet by a plurality of processing units;



FIG. 13 illustrates an example of a pipeline of processing stages for processing a data packet;



FIG. 14 illustrates an example of a slice architecture having a plurality of pluggable components;



FIG. 15 illustrates an example representation of the arrangement and order of processing of plurality of processing units; and



FIG. 16 illustrates an example method of compiling the function;



FIG. 17 illustrates an example of a stateful processing unit; and



FIG. 18 illustrates an example of a stateless processing unit.





DETAILED DESCRIPTION

The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art.


The general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.


When data is to be transferred between two data processing systems over a data channel, such as a network, each of the data processing systems has a suitable network interface to allow it to communicate across the channel. Often the network is based on Ethernet technology. Data processing systems that are to communicate over a network are equipped with network interfaces that are capable of supporting the physical and logical requirements of the network protocol. The physical hardware component of network interfaces are referred to as network interface devices or network interface cards (NICs).


Most computer systems include an operating system (OS) through which user level applications communicate with the network. A portion of the operating system, known as the kernel, includes a protocol stack for translating commands and data between the applications and a device driver specific to the network interface device. The device driver may directly control the network interface device. By providing these functions in the operating system kernel, the complexities of and differences among network interface device can be hidden from the user level application. The network hardware and other system resources (such as memory) may be safely shared by many applications and the system can be secured against faulty or malicious applications.


A typical data processing system 100 for carrying out transmission across a network is shown in FIG. 1. The data processing system 100 comprises a host computing device 101 coupled to a network interface device 102 that is arranged to interface the host to network 103. The host computing device 101 includes an operating system 104 supporting one or more user level applications 105, The host computing device 101 may also include a network protocol stack (not shown). For example, the protocol stack may be a component of the application, a library with which the application is linked, or be provided by the operating system. In some embodiments, more than one protocol stack may be provided.


The network protocol stack may be a Transmission Control Protocol (TCP) stack. The application 105 can send and receive TCP/IP messages by opening a socket and reading and writing data to and from the socket, and the operating system 104 causes the messages to be transported across the network. For example, the application can invoke a system call (syscall) for transmission of data through the socket and then via the operating system 104 to the network 103. This interface for transmitting messages may be known as the message passing interface.


Instead of implementing the stack in the host 101, some systems offload the protocol stack to the network interface device 102. For example, in the case that the stack is a TCP stack, the network interface device 102 may comprise a TCP Offload Engine (TOE) for performing the TCP protocol processing. By performing the protocol processing in the network interface device 102 instead of in the host computing device 101, the demand on the host system's 101 processor/s may be reduced. Data to be transmitting over the network, may be sent by an application 105 via a TOE-enabled virtual interface driver, by-passing the kernel TCP/IP stack in part or entirely. Data sent along this fast path therefore need only be formatted to meet the requirements of the TOE driver.


The host computing device 101 may comprise one or more processors and one or more memories. In some embodiments, the host computing device 101 and the network interface device 102 may communicate via a bus, for example a peripheral component interconnect express (PCIe bus).


During operation of the data processing system, data to be transmitted onto the network may be transferred from the host computing device 101 to the network interface device 102 for transmission. In one example, data packets may be transferred from the host to the network interface device directly by the host processor. The host may provide data to one or more buffers 106 located on the network interface device 102. The network interface device 102 may then prepare the data packets and transmit them over the network 103.


Alternatively, the data may be written to a buffer 107 in the host system 101. The data may then be retrieved from the buffer 107 by the network interface device and transmitted over the network 103.


In both of these cases, data is temporarily stored in one or more buffers prior to transmission over the network. Data sent over the network could be returned to the host (in a lookback).


When data packets are sent and received from over a network 103, there are many processing tasks that can be expressed as operations on a data packet either on a data packet to be transmitted over the network or on a data packet received from over the network. For example, filtering processes may be carried out on received data packets so as to protect the host system 101 from distributed denial of service (DDOS) filtering. Such filtering processes may be carried out by a simple pack examination or an extended Berkley packet filter (eBPF). As another example, encapsulation and forwarding may be carried out for data packets to be transmitted over the network 103. These processes may consume many CPU cycles and be burdensome for the conventional OS architecture.


Reference is made to FIG. 2, which illustrates one way in which a filtering operation or other packet processing operation may be implemented in a host system 220. The processes performed by the host system 220 are shown as being performed either in user space or kernel space. A receive path for delivering data packets received from a network at the network interface device 210 to a terminating application 250 is present in kernel space. This receive path comprises a driver 235, a protocol stack 240, and a socket 245. The filtering operation 230 is implemented in user space. The incoming packets that are provided by the network interface device 210 to the host system 220 bypass the kernel (where protocol processing takes place) and are provided directly to the filtering operation 230.


The filtering operation 230 is provided with a virtual interface (which may be an ether fabric virtual interface (EFVI) or data plane development kit (DPDK) or any other suitable interface) for exchanging the data packets with other elements in the host system 220. The filtering operation 230 may perform DDOS scrubbing and/or other forms of filtering. A DDOS scrubbing process may execute on all packets which are easily recognised as DDOS candidates—for example, a sample packet, a copy of a packet, and packets which have not yet been categorised. The packets not delivered to the filtering operation 230 may be passed from the network interface to the driver 235 directly. The operation 230 may provide an extended Berkeley packet filter (eBPF) for performing the filtering. If the received packets pass the filtering provided by operation 230, the operation 230 is configured to re-inject the packets into the receive path in the kernel for processing received packets. Specifically, the packets are provided to the driver 235 or stack 240. The packets are then protocol processed by the protocol stack 240. The packets are then passed to the socket 245 associated with the terminating application 250. The terminating application 250 issues a recv() call to retrieve the data packets from a buffer of the associated socket.


There are, however, several issues with this approach. Firstly, the filtering operation 230 runs on the host CPU. In order to run the filtering 230, the host CPU must process the data packets at the rate at which they are received from the network. In cases, where the rate at which data is sent and received from the network is high, this can constitute a large drain on the processing resources of the host CPU. A high data flow rate to the filtering operation 230 may result in heavy consumption of other limited resources—such as I/O bandwidth and internal memory/cache bandwidth.


In the order to perform the re-injection of the data packets into the kernel, it is necessary to provide the filtering operation 230 with a privileged API for performing the re-injection. The re-injection process may be cumbersome requiring attention to packet ordering. In order to perform the re-injection, the operation 230 may in many cases require a dedicated CPU core.


The steps of providing the data to the operation and re-injecting require the data to be copied into and out of memory. This copying is a resource burden on the system.


Similar problems may occur when providing other types of operations other than filtering on data to be sent/received from over the network.


Some operations (such as DPDK type operations) may require the forwarding of processed packets back onto the network.


Reference is made to FIG. 3, which illustrates another approach. Like elements are referred to with like reference numerals. In this example, an additional layer, known as the express data path (XDP) 310 is inserted into the transmit and receive path in the kernel. An extension to XPD 310 allows insertion into the transmit path. XDP helpers allow packets to be transmitted (as a result of a receive operation). The XDP 310 is inserted at the driver level of the operating system and allows for programs to be executed at this level so as to perform operations on the data packets received from the network prior to them being protocol processed by stack 240. The XDP 310 also allows for programs to be executed at this level so as to perform operations on data packets to be sent over the network. eBPF programs and other programs can, therefore, operate in the transmit and receive paths.


As it illustrated in FIG. 3, the filtering operation 320 may be inserted from user space into the XDP to form a program 330 that is part of the XDP 310. The operation 320 is inserted using the XDP control plane that is to be executed on the data receive path to provide a program 330 which performs the filtering operations (e.g. DDOS scrubbing) for packets on the receive path. Such a program 330 may be an eBPF program.


The program 330 is shown inserted into the kernel between the driver 235 and the protocol stack 240. However, in other examples, the program 330 may be inserted at other points in the receive path in the kernel. The program 330 may be part of a separate control path that receives data packets. The program 330 may be provided by an application by providing extensions to an application programming interface (API) of the socket 245 for that application.


This program 330 may additionally or alternatively perform one or more operations on data being sent over the transmit path. The XDP 310 then invokes the driver's 235 transmit function to send data over the network via the network interface device 210. The program 330 in this case may provide a load balancing or routing operation with respect to data packets to be sent over the network. The program 330 may provide a segment re-encapsulation and forwarding operation with respect to data packets to be sent over the network


The program 330 may be used for firewalling and virtual switching or other operations not requiring protocol termination or application processing.


One advantage of the use of the XDP 310 in this way, is that the program 330 can directly access the memory buffers handled by the driver without intermediate copies.


In order to insert the program 330 for operation in the kernel in this way, it is necessary to ensure that the program 330 is safe. If an unsafe program is inserted into the kernel, this presents certain risks, such as: infinite loops that could crash the kernel; buffer overflows, uninitialised variables, compiler errors, performance issues caused by large programs.


In order to ensure that the program 330 is safe prior to insertion into the XDP 310 in this way, a verifier may run on the host system 220 to verify the safety of the program 330. The verifier may be configured to ensure that no loops exists. Backward jump operations may be permitted provided they do not cause loops. The verifier may be configured to ensure that the program 330 has no more than a predefined number (e.g. 4000) instructions. The verifier may perform checks on the validity of register usage by traversing through data paths of the program 330. If there are too many possible paths, the program 330 will be rejected as being unsafe to run in kernel mode. For example if there are more than 1000 branches, the program 330 may be rejected.


It would be appreciated by the skilled person that XDP is one example by which a safe program 330 may be installed in the kernel, and that there are other ways in which this could be accomplished.


The approach discussed above with respect to FIG. 3 may be as efficient as the approach discussed above with respect to FIG. 2 if, for example, the operation can be expressed in a safe (or sandboxed) language required for executing code in the kernel. The eBPF language can be executed efficiently on an x86 processor and JIT (Just in Time) compilation techniques enable eBPF programs to be compiled to native machine code. The language is designed to be safe, e.g. state is limited to map only constructs which are shared data structures (such as a hash table). There is limited looping allowed, instead one eBPF program is allowed to tail-call another. The state space is constrained.


However, in some implementations, with this approach there may be a large drain on the resources (e.g. I/O bandwidth and internal memory/cache bandwidth, Host CPU) of the host system 220. The operations on the data packets are still being performed by the Host CPU, which is required to perform such operations at the rate at which the data is being sent/received.


Another proposal is to perform the above discussed operations in the network interface device instead of in the host system. Doing so may free up the CPU cycles used by the host CPU when executing the operations in addition to the I/O bandwidth, memory and cache bandwidth consumed. Moving execution of the processing operation from the host to hardware of the network interface device may present some challenges.


One proposal to implement the processing in the network hardware is to provide in the network interface device a network processing unit (NPU) comprising a plurality of CPUs, which are specialised for packet processing and/or manipulation operations.


Reference is made to FIG. 4, which illustrates an example of a network interface device 400 comprising an array 410 of central processing units (CPUs), e.g. CPU 420. The CPUs are configured to perform functions, such as filtering data packets sent and received from the network. Each CPU of the array 410 of CPUs may be an NPU. Although not shown in FIG. 4, the CPUs may additionally or alternatively be configured to perform operations, such as load-balancing on data packets received from the host for transmission over the network. These CPUs are specialised for such packet processing/manipulation operations. The CPUs execute an instruction set which is optimised for such packet processing/manipulation operations.


The network interface device 400 additionally comprises memory (not shown) that is shared amongst and accessible to the array 410 of CPUs.


The network interface device 400 comprises a network medium access control (MAC) layer 430 for interfacing the network interface device 400 with the network. The MAC layer 430 is configured to receive data packets from over the network and send data packets over the network.


The operations on packets received at the network interface device 400 are parallelised over the CPUs. As shown, when a data flow is received at the MAC layer 430, it is passed to a spread function 440, which is configured to extract data packets from a flow and distribute them over a plurality of CPUs in the NPU 410 for the CPUs to perform processing, e.g. filtering, of these data packets. The spread function 440 may parse the received data packets so as to identify the data flows to which they belong. The spread function 440 generates for each packet, an indication of the respective packet's position in the data flow to which it belongs. The indications may, for example, be tags. The spread function 440 adds the respective indication to each packet's associated metadata. The associated metadata for each data packet may be appended to the data packet. The associated metadata could be passed to the spread function 440 as side-band control information. The indication is added in dependence upon the flow to which the data packet belongs, such that the order of data packets for any particular flow may be reconstructed.


After programming by the plurality of CPUs 410, the data packets are then passed to a re-order function 450, which re-orders the packets of the data flow into their correct order before passing them to the host interface layer 460. The re-order function 450 may re-order the data packets within a flow by comparing the indications (e.g. tags) within the data packets of the flow to reconstruct the order of the data packets. The re-ordered data packets then traverse the host interface 460 and are delivered to the host system 220.


Although FIG. 4 illustrates the array 410 of CPUs operating only on data packets received from the network, similar principles (including spreading and re-ordering) may be performed on data packets received from the host for transmission over the network, with the array 410 of CPUs performing functions (e.g. load balancing) on these data packets received from the host.


The program that is executed by the CPUs may be a compiled or transcoded version of the program that would execute on the host CPU in the example described above with respect to FIG. 3. In other words, the instruction set that would execute on a host CPU to perform the operations is translated for execution on each CPU the array of specialised CPUs in the network interface 400.


In order to achieve the parallelisation over the CPUs, multiple instances of the programs are compiled and executed on multiple CPUs in parallel. Each instance of the program may be responsible for processing a different set of data packets received at the network interface device. However, each individual data packet is processed by a single CPU when providing the function of the program with respect to that data packet. The overall effect of the execution of the parallel programs may be the same as the execution of a single program (e.g. program 330) on the host CPU.


One of the specialised CPUs may process data packets at an order of 50 million packets per second. This operating speed may be lower than the operating speed of the host CPU. Therefore, parallelisation may be used to achieve the same performance as would be achieved by executing an equivalent program on the host CPU. In order to perform the parallelisation, the data packets are spread over the CPUs and then re-ordered after processing by the CPUs. The requirement to process data packets of each flow in order along with the re-ordering step 450 may introduce bottlenecks, increase memory resource overheads and may limit the available throughput of the device. This requirement and the re-ordering step 450 may increase the jitter of the device, since the processing throughput may fluctuate depending on the contents of the network traffic and the degree to which the parallelism can be applied.


One advantage of the use of such specialised CPUs may be the short compile time. For example, it may be possible to compile a filtering application to run on such a CPU in less than 1 second.


There may be issues with the use of an array of CPUs when this approach is scaled to higher link speeds. Host network interfaces may be required to reach Terabit/s speeds in the near future. When scaling up such an array 410 of CPUs to these higher speeds, the amount of power required can become problematic.


Another proposal is to include in the network interface device, a field programmable gate array (FPGA) and to use the FPGA to perform the operations on data packets received from the network.


Reference is made to FIG. 5, which illustrates an example of the use, in a network interface device 500, of an FPGA 510 having an FPGA application 515 for performing operations on data packets received at the network interface device 500. Like elements as those in FIG. 4 are referred to with like reference numerals.


Although FIG. 5 illustrates the FPGA application 515 operating only on data packets received from the network, such an FPGA application 515 may be used to perform functions (e.g. load balancing and/or a firewall function) on these data packets received from the host for transmission over the network or back to the host or another network interface on the system.


The FPGA application 515 may be provided by compiling a program written in a common system-level language, such as C or C++ or scala to run on an FPGA 510.


That FPGA 510 may have network interface functionality and FPGA functionality. The FPGA functionality may provide an FPGA application 515, which may programmed into the FPGA 510 according to the needs of the network interface device user. The FPGA application 515 may, for example, provide filtering of the messages on the receive path from the network 230 to the host. The FPGA application 515 may provide a firewall.


The FPGA 510 may be programmable to provide the FPGA application 515. Some of the network interface device functionality may be implemented as “hard” logic within the FPGA 510. For example, the hard logic may be application specific integrated circuit (ASIC) gates. The FPGA application 515 may be implemented as “soft” logic. The soft logic may be provided by programming the FPGA LUTs (look up tables). The hard logic may be capable of being clocked at a higher rate as compared to the soft logic.


The network interface device 500 comprises a host interface 505 configured to send and receive data with the host. The network interface device 520 comprises a network medium access control (MAC) interface 520 configured to send and receive data with the network.


When a data packet is received from the network at the MAC interface 520, the data packet is passed to the FPGA application 515, which is configured to perform a function, such as filtering, with respect to the data packet. The data packet (if it passes any filtering) is then passed to the host interface 505 from where it is passed to the host. Alternatively, the data packet FPGA application 515 may determine to drop or re-transmit the data packet.


One issue with this approach of using an FPGA to perform a function with respect to data packets is the relatively long compile time required. The FPGA is composed of many logic elements (e.g. logic cells) which individually represent a primitive logic operation, such as AND, OR, NOT, etc. These logic elements are arranged into a matrix with a programmable interconnect. In order to provide a function, these logic cells may need to operate together to implement the circuit definition and synchronous clock timing constraints. Placing each logic cell and routing between cells may algorithmically be a difficult challenge. When compiling on an FPGA having lower levels of utilisation, the compile time may be less than ten minutes. However, as the FPGA device becomes more utilised by various applications, the challenge of place and route may grow such that the time to compile a given function onto the FPGA increases. As such, adding additional logic to an FPGA, which already has most of its routing resources consumed, may take hours of compilation time.


One approach is to design hardware using specific processing primitives, such as parse, match and action primitives. These may be used to construct a processing pipeline where all packets undergo each of the three processes. Firstly, a packet is parsed to construct a metadata representation of the protocol headers. Secondly, the packet is flexibly matched against rules held in tables. Finally, when a match is found the packet is actioned in dependence upon the entry from the table selected in the match operation.


In order to implement functions using the parse/match/action model, the P4 programming language (or a similar language) may be used. The P4 programming language is target independent, meaning that a program written in P4 can be compiled to run in different types of hardware such as CPUs, FPGAs, ASICs, NPUs, etc. Each different type of target is provided with its own compiler that maps the P4 source code into the appropriate target switch model.


P4 may be used to provide a programming model which allows a high-level program to express packet processing operations for a packet processing pipeline. This approach works well for operations which naturally express themselves in a declarative style. In the P4 language, the programmer expresses the parsing, matching, and action stages as operations to be performed for the received data packets. These operations are gathered together for dedicated hardware to perform efficiently. However, this declarative style may not be appropriate for expressing programs of an imperative natures, such as eBPF programs.


In a network interface device, a sequence of eBPF programs may be required to execute serially. In this case, a chain of eBPF programs are generated, one calling another. Each program can modify state and the output is as if the entire chain of programs has executed serially. It may be challenging for a compiler to gather all the parsing, matching and actioning steps. However, even in the case that the chain of eBPF programs has already been installed, it might be necessary to install, remove, or modify the chain, which may present further challenges.


To provide an example of such a program requiring repeat execution, reference is made to FIG. 10, which illustrates an example of a sequence of programs e1, e2, e3, that are configured to process a data packet. Each of the programs may be an eBPF program, for example. Each of the programs is configured to parse the receive data packet, perform look up into table 1010 to determine an action in matching entry in the table 1010, and then perform the action with respect to the data packet. The action may comprise modifying the packet. Each of the eBPF programs may also perform an action in dependent upon local and shared state. The data packet P0 is initially processed by eBPF program e1, before being passed, modified, to the next program e2 in the pipeline. The output of the sequence of programs, is the output of the final program in the pipeline, i.e. e3.


Combining the effect of each of n such programs into a single P4 program may be complex for a compiler. Additionally, certain programming models (such as XDP) may require programs to be dynamically inserted and removed at any point in the sequence of programs quickly in response to changing circumstances.


According to some embodiments of the application, there is provided a network interface device comprising a plurality of processing units. Each processing unit is configured to perform at least one predefined operation in hardware. Each processing unit comprises a memory storing its own local state. Each processing unit comprises a digital circuit modifying this state.


The digital circuit may be an application specific integrated circuit. Each processing unit is configured to run a program comprising configurable parameters so as to perform the respective plurality of operations. Each processing unit may be an atom. An atom is defined by the specific programing and routing of a pre-defined template. This defines its specific operational behaviour and logical place in the flow provided by the connected plurality of processing units. Where the term ‘atom’ is used in the specification, this may be understood to refer to a data processing unit that is configured to execute its operations in a single step. In other words, the atom executes its operations as an atomic operation.


During compilation, at least some of the plurality of processing units are arranged to perform operations such that a function is performed with respect to a data packet received at the network interface device by the at least some of the plurality of processing units. Each of the at least some of the plurality of processing units is configured to perform its respective at least one predefined operation so as to perform the function with respect to a data packet. In other words, the operations which the connected processing units are configured to perform are performed with respect to a received data packet. The operations are performed sequentially by the at least some of the plurality of processing units. Collectively, the performance of each of the plurality of operations provides a function, e.g. filtering, with respect to the received packet.


By arranging each of the atoms to execute their respective at least one predefined operation so as to perform the function, the compilation time may be reduced as compared to the FPGA application example described above with respect to FIG. 5. Furthermore, by performing the function using processing units specifically dedicated to performing particular operations in hardware, the speed at which the function can be performed may be improved with respect to using a CPU executing software in the network interface device to perform the function for each data packet as discussed above with respect to FIG. 4.


Reference is made to FIG. 6, which illustrates an example of a network interface device 600 according to embodiments of the application. The network interface device comprises a hardware module 610 configured to perform the processing of data packets received at an interface of the network interface device 600. Although, FIG. 6 illustrates the hardware module 610 performing a function (e.g. filtering) for data packets on the receive path, the hardware module 610 may also be used for performing a function (e.g. load balancing or a firewall) for data packets on the transmit path that are received from the host.


The network interface device 600 comprises a host interface 620 for sending and receiving data packets with the host and a network MAC interface 630 for sending and receiving data packets with the network.


The network interface device 600 comprises a hardware module 610 comprising a plurality of processing units 640a, 640b, 640c, 640d. Each of the processing units may be an atom processing unit. The term atom is used in the description to refer to processing units. Each of the processing units is configured to perform at least one operation in hardware. Each of the processing units comprises a digital circuit 645 configured to perform the at least one operation. The digital circuit 645 may be an application specific integrated circuit. Each of the processing units additionally comprises a memory 650 storing state information. The digital circuit 645 updates the state information when executing the respective plurality of operations. In addition to the local memory, each of the processing units has access to a shared memory 660, which may also store state information accessible to each of the plurality of processing units.


The state information in the shared memory 660 and/or the state information in the memory 650 of the processing units may include at least one of: metadata which is passed between processing units, temporary variables, the contents of the data packets, the contents of one or more shared maps.


Together, the plurality of processing units are capable of providing a function to be performed with respect to data packets received at the network interface device 600. The compiler outputs instructions to configure the hardware module 610 to perform a function with respect to incoming data packets by arranging at least some of the plurality of processing units to perform their respective at least one predefined operation with respect to each incoming data packet. This may be achieved by chaining (i.e. connecting) together the at least some of the processing units 640a, 640b, 640c, 640d so that each of the connected processing units will perform their respective at least one operation with respect to each incoming data packet. Each of the processing units performs their respective at least one operation in a particular order so as to perform the function. The order may be such that two or more of the processing units execute in parallel with each other, i.e. at the same time. For example, one processing unit may read from a data packet during a time period (defined by a periodic signal (e.g. clock signal) of the hardware module 610) in which a second processing unit also reads from a different location in the same data packet.


In some embodiments, the data packet passes through each stage represented by the processing units in a sequence. In this case, each processing unit completes its processing before passing the data packet to the next processing unit for performing its processing.


In the example shown in FIG. 6, processing units 640a, 640b, and 640d are connected together at compile time, such that each of them performs their respective at least one operation so as to perform a function, e.g. filtering, with respect to the received data packet. The processing units 640a, 640b, 640d form a pipeline for processing the data packet. The data packet may move along this pipeline in stages, each having an equal time period. The time period may be defined according to a period signal or beat. The time period may be defined by a clock signal. Several periods of the clock may define one time period for each stage of the pipeline. The data packet moves along one stage in the pipeline at the end of each occurrence of the repeating time period. The time period may be a fixed interval. Alternatively, each time period for a stage in the pipeline may take a variable amount of time. A signal indicating the next stage in the pipeline may be generated when the previous processing stage has finished an operation, which may take a variable amount of time. A stall may be introduced at any stage in the pipeline by delaying the signal for some pre-determined amount of time


Each of the processing units 640a, 640b, 640d may be configured to access shared memory 660 as part of their respective at least one operation. Each of the processing units 640a, 640b, 640d may be configured to pass metadata between one another as part of their respective at least one operation. Each of the processing units 640a, 640b, 640d may be configured to access the data packet received from the network as part of their respective at least one operation.


In this example, the processing unit 640c is not used to perform processing of received data packets so as to provide the function, but is omitted from the pipeline.


A data packet received at the network MAC layer 630 may be passed to the hardware module 610 for processing. Although not shown in FIG. 6, the processing performed by the hardware module 610 may be part of a larger processing pipeline providing additional functions with respect to the data packet other than the function provided by the hardware module 610. This is illustrated with respect to FIG. 14, and will be explained in more detail below.


The first processing unit 640a is configured to perform a first at least one operation with respect to the data packet. This first at least one operation may comprise at least one of: reading from the data packet, reading and writing to shared state in memory 660, and/or performing a look up into a table to determine an action. The first processing unit 640a is then configured to produce results from its at least one operation. The results may be in the form of metadata. The results may comprise a modification to the data packet. The results may comprise a modification to shared state in memory 660. The second processing unit 640b is configured to perform its at least one operation with respect to the first data packet in dependence upon the results from the operation carried out by the first processing unit 640a. The second processing unit 640b produce results from its at least one operation and passes the results to a third processing unit 640d that is configured to perform its at least one operation with respect to the first data packet. Together the first 640a, second 640b, and third 640d processing units are configured to provide a function with respect to a data packet. The data packet may then be passed to the host interface 620, from where it is passed to the host system.


Therefore, it may be seen that the connected processing units form a pipeline for processing a data packet received at the network interface device. This pipeline may provide the processing of an eBPF program. The pipeline may provide the processing of a plurality of eBPF programs. The pipeline may provide the processing of a plurality of modules which execute in a sequence.


The connecting together of processing units in the hardware module 610 may be performed by programming a routing function of a pre-synthesised interconnection fabric of the hardware module 610. This interconnection fabric provides connections between the various processing units of the hardware module 610. The interconnection fabric is programmed according to the topology supported by the fabric. A possible example topology is discussed below with reference to FIG. 15.


The hardware module 610 supports at least one bus interface. The at least one bus interface receives data packets at the hardware module 610 (e.g. from the host or network). The at least one bus interface outputs data packets from the hardware module 610 (e.g. to the host or network). The at least one bus interface receives control messages at the hardware module 610. The control messages may be for configuring the hardware module 610.


The example shown in FIG. 6 has the advantage of a reduced compile time with respect to the FPGA application 515 shown in FIG. 5. The hardware module 610 of FIG. 6 may require less than 10 seconds to compile a filtering function, for example. The example shown in FIG. 6 has the advantage improved processing speed with respect to the example of an array of CPUs shown in FIG. 4.


An application may be complied for execution in such a hardware module 610 by mapping a generic program (or multiple programs) to a pre-synthesised data path. The compiler builds the data-path by linking an arbitrary number of processing stage instances, where each instance is built from one of the pre-synthesised processing stage atoms.


Each of the atoms is built from a circuit. Each circuit may be defined using an RTL (register transfer language) or high level language. Each circuit is synthesised using a compiler or tool chain. The atoms may be synthesised into hard-logic and so be available as a hard (ASIC) resource in a hardware module of the network interface device. The atoms may be synthesised into soft-logic. The atoms in soft-logic may be provided with constraints which allocate and maintain the place and route information of the synthesised logic on the physical device. An atom may be designed with configurable parameters that specifies an atom's behaviour. Each parameter may be a variable, or even a sequence of operations (a micro-program), which may specify at least one operation to be performed by a processing unit during a clock cycle of the processing pipeline. The logic implementing the atoms may be synchronously or asynchronously clocked.


The processing pipeline of atoms itself may be configured to operate according to a periodic signal. In this case, each the data packet and metadata moves one stage along the pipeline in response to each occurrence of the signal. The processing pipeline may operate in an asynchronous manner. In this case, back pressure at higher levels in the pipeline will cause each downstream stage to start processing only when data from an upstream stage has been presented to it.


When compiling a function to be executed by a plurality of such atoms, a sequence of computer code instructions is separated into a plurality of operations, each of which is mapped to a single atom. Each operation may represent a single line of disassembled instruction in the computer code instruction. Each operation is assigned to one of the atoms to be carried out by one of the atoms. There may be one atom per expression in the computer code instructions. Each atom is associated with a type of operation, and is selected to carry out at least one operation in the computer code instructions based on its associated type of operation. For example, an atom may be preconfigured to perform a load operation from a data packet. Therefore, such an atom is assigned to carry out an instruction representing a load operation from a data packet in the computer code.


One atom may be selected per line in the computer code instructions. Therefore, when implementing a function in a hardware module containing such atoms, there may be 100 s of such atoms, each performing their respective operations so as to perform the function with respect to that data packet.


Each atom may be constructed according to one of a set of processing stage templates that determine its associated type of operation/s. The compilation process is configured to generate instructions to control each atom to perform a specific at least one operation based on its associated type. For example, if an atom is preconfigured to perform packet access operations, the compilation process may assign to that atom, an operation to load certain information (e.g. the packet's source ID) from the header of the packet. The compilation process is configured to send instructions to the hardware module, in which the atoms are configured to perform the operations assigned to them by the compilation process.


The processing stage templates that specify an atom's behaviour are logic stage templates (e.g. providing operations over registers, scratch pad memory, and stack, as well as branches) packet access state templates (e.g. providing packet data loads and/or packet data stores), and map access stage templates (e.g. map lookup algorithms, map table sizes).


A packet access stage can comprise at least one of: reading a sequence of bytes from the data packet; replacing one sequence of bytes with a different sequence of bytes in the data packet; inserting bytes into a data packet; and deleting bytes in the data packet.


A map access stage can be used to access different types of map (e.g. a lookup table), including direct indexed array and associative array. A map access stage may comprise at least one of: reading a value from a location; writing a value to a location; replacing a value at a location in the map with a different value. A map access stage may comprise a compare operation in which a value is read from a location in the map and compared with a different value. If the value read from the location is less than the different value, then a first action (e.g. do nothing, exchange the value at the location for the different value, or add the values together) may be performed. Otherwise, a second action (e.g. do nothing, exchange or add a value) may be performed. In either case, the value read from the location may be provided to the next processing stage.


Each map access stage may be implemented in a stateful processing unit. Reference is made to FIG. 17, which illustrates an example of the circuitry 1700 that may be included in an atom configured to perform processing of a map access stage. The circuitry 1700 may include a hash function 1710 configured to perform a hash of input values that are used as an input to a lookup table. The circuitry 1700 includes a memory 1720 configured to store state associated with the atom's operations. The circuitry 1700 includes an arithmetic logic unit 1730 configured to perform an operation.


A logic stage may perform computations on the values provided by the preceding stages. The processing units configured to implement a logic stage may be stateless processing units. Each stateless processing unit can perform a simple arithmetic operation. Each processing unit may perform, for example, an 8-bit operation.


Each logic stage may be implemented in a stateless processing unit. Reference is made to FIG. 18, which illustrates an example of circuitry 1800 that may be included in an atom configured to perform processing of a logic stage. The circuitry 1800 comprises an array of arithmetic logic unit (ALUs) and multiplexers. The ALUs and multiplexors are arranged in layer, with the outputs of one layer of processing by the ALUs being used by the multiplexors to provide the inputs to the next layer of ALUs.


A pipeline of stages implemented in the hardware module may comprise a first packet access stage (pkt0), followed by a first logic stage (logic0), followed by a first map access stage (map0), followed by a second logic stage (logic1), followed by a second packet access stage (pkt1), and so on. It may, therefore, take the following form: pkt0->logic0->map0->logic1->pkt1


In some examples, Stage pkt1 extracts the required information from the packet Stage pkt0 passes this information to stage logic0. Stage logic0 determines whether the packet is a valid IP packet. In some case logic0 forms the map request and sends the map request to map0, which carries out the map operation. Stage map0 may perform an update to the look up table. Stage logic1 then collects the result from map operation and decides whether to drop the packet as a result.


In some cases, the map request is disabled to cover the case where a map operation should not be performed for this packet. In the case where the map operation is not performed, logic0 indicates to logic1 whether or not the packet should be dropped in dependence upon whether or not the packet is a valid IP packet. In some examples, the look up table contains 256 entries where each entry is an 8-bit value.


This example described includes only five stages. However, as noted many more may be used. Furthermore, operations need not all be carried out in sequence, but some operations with respect to the same data packet may be carried out simultaneously by different processing units.


The hardware module 610 shown in FIG. 6 illustrates a single pipeline of atoms for performing a function with respect to data packets. However, a hardware module 610 may comprise a plurality of pipelines for processing data packets. Each of the plurality of pipelines may perform a different function with respect to data packets. The hardware module 610 is configurable to interconnect a first set atoms of the hardware module 610 to form a first data processing pipeline. The hardware module 610 is also configurable to interconnect a second set of atoms of the hardware module 610 to form a second data processing pipeline.


In order to compile a function to be implemented in the hardware module comprising the plurality of processing units, a series of steps starting from a sequence of computer code may be carried out. The compiler, which may run on a processor on the host device or on the network interface device, has access to the disassembled sequence of computer code.


Firstly, the compiler is configured to split the sequence of computer code instructions into separate stages. Each stage may comprise operations according to one of the processing stage templates described above. For example, one stage may provide a read from the data packet. One stage may provide an update of map data. Another stage may make a pass drop decision. The compiler assigns each of the plurality of operations expressed by the code to one of the plurality of stages.


Secondly, the compiler is configured to assign each of the processing stages determined from the code to be performed by a different processing unit. This means that each of the respective at least one operation of a processing stage is carried out by a different processing stage. The output of the compiler can then be used to cause the processing units to perform the operations of each stage in a particular order so as to perform the function.


The output of the compiler comprises generated instructions which are used to cause the processing units of the hardware module to carry out the operations associated with each processing stage.


The output of the compiler may also be used to generate logic in the hardware module that responds to control messages for configuring the hardware module 610. Such control messages are described in more detail below with respect to FIG. 14.


The compilation process for compiling a function to be executed on the network interface device 600 may be performed in response to determining that the process for providing the function is safe for execution in the kernel of the host device. The determination of the safety of the program may be carried out by a suitable verifier as described above with respect to FIG. 3. Once the process has been determined to be safe for execution in the kernel, the process may be compiled for execution in the network interface device.


Reference is made to FIG. 15, which illustrates a representation of at least some of the plurality of processing units that perform their respective at least one operation in order to perform the function with respect to a data packet. Such a representation may be generated by the compiler and used to configure the hardware module to perform the function. The representation indicates the order in which the operations may be carried out and how some of the processing units perform their operations in parallel.


The representation 1500 is in the form of a table having rows and columns. Some of the entries of the table show atoms, e.g. atom 1510a, configured to perform their respective operation. The row to which a processing unit belongs indicates the timing of the operation performed by that processing unit with respect to a particular data packet. Each row may correspond to a single time period represented by one or more cycles of a clock signal. Processing units belonging to the same row, perform their operations in parallel.


Inputs to the logic stage are provided in row 0 and computation flows forward into the later rows. By default an atom receives the result from the processing by the atom in the same columns as itself but in the previous row. For example, atom 1510b receives results from the processing by atom 1510a, and performs its own processing on dependence upon these results.


When using local routing resources, atoms may also access outputs from atoms in the previous row for which the column number differs by no more than two. For example, the atom 1510d may receive the results from the processing performed by atom 1510c.


When using global routing resources, atoms may also access outputs from atoms in the previous two rows and in any column. This may be performed using global routing resources. For example, the atom 1510f may receive the results from the processing performed by atom 1510e.


These constraints as to routing between atoms are given as an example and other constraints may be applied. Applying, more restrictive restraints may make routing of information between atoms easier. Applying, less restrictive restraints may make scheduling easier. If the number of atoms of a given type (e.g. map, logic or packet access) is exhausted or the routing between atoms cannot be made, then the compilation of the function into the hardware module will fail.


The particular constraints are determined by the topology supported by the interconnection fabric supported by the hardware module. The interconnection fabric is programed to cause the atoms of the hardware module to execute their operations in a particular order and provide data between each other within the constraints. FIG. 15 shows one particular example of how the interconnection fabric may be so programmed.


A place and route algorithm is used during synthesis of an FPGA application 515 onto an FPGA (as illustrated in FIG. 5). However, in this case, the solution space is constrained and so the algorithm has a short bounded execution time.


There exists a trade-off between processing speed or efficiency and compile time. According to embodiments of the application, it may be desirable to initially compile and run a program on at least one processing unit (which may be a CPU or an atom as described above with respect to FIG. 6) for providing a function with respect to received data packets. The at least one processing unit may then run and perform the function with respect to received data packets during a first time period. During operation of the network interface device, a second at least one processing unit (which may be an FPGA application or a template type of processing unit as described above with respect to FIG. 6) may be configured to perform the function with respect to data packets. The function can then be migrated from the first at least one processing unit to the second at least one processing unit, such that the second at least one processing unit then performs the function for subsequently received data packets at the network interface device. The slower compilation time of the second at least one processing unit, therefore, does not prevent the network interface device from performing the function with respect to data packets before the function has been compiled for the second at least one processing unit, since the first at least one processing unit can be compiled faster and can be used for performing the function with respect to data packets whilst the function is compiled for the second at least one processing unit. Since the second at least one processing unit typically has a faster processing time, migrating to the second at least one processing unit when it is compiled allows faster processing of the data packets received at the network interface device.


According to embodiments of the application compilation processes may be configured to run on at least one processor of the data processing system, wherein the at least one processor is configured to send instructions for the first at least one processing unit and the second at least one processing unit to perform the at least one function with respect to a data packet at appropriate times. The at least one processor may comprise a host CPU. The at least one processor may comprise a control processor on the network interface device. The at least one processor may comprise a combination of one or more processors on the host system and one or more processors on the network interface device.


Accordingly the at least one processor is configured to perform a first compilation process to compile a function to be performed by a first at least one processing unit of a network interface device. The at least one processing unit is also configured perform a second compilation process to compile the function to be performed by a second at least one processing unit of the network interface device. Prior to completion of the second compilation process, the at least one processing unit instructs the first at least one processing unit to perform the function with respect to data packets received from a network. Subsequently, following the completion of the second compilation process the at least one processing unit instructs the second at least one processing unit to begin performing the function with respect to data packets received from the network.


Performing these steps enables the network interface device to perform the function using the first at least one processing unit (which may have a shorter compile time but slower and/or less efficient processing) whilst waiting for the second compilation process to complete. When the second compilation process is complete, the network interface device may then perform the function using the second at least one processing unit (which may have a longer compile time but faster and/or more efficient processing) in addition to or instead of the first at least one processing unit.


Reference is made to FIG. 7, which illustrates an example network interface device 700 in accordance with embodiments of the application. Like reference elements to those shown in the previous Figures are indicated with like reference numerals.


The network interface device comprises a first at least one processing unit 710. The first at least one processing unit 710 may comprise the hardware module 610 shown in FIG. 6, which comprises a plurality of processing units. The first at least one processing unit 710 may comprise one or more CPUs, such as shown in FIG. 4.


The function is compiled to run on the first at least one processing unit 710 such that, during a first time period, the function is performed by the first at least one processing unit 710 with respect to data packets received from the network. The first at least one processing unit 710 is, prior to completion of the second compilation process for the second at least one processing unit, instructed by the at least one processor to perform the function with respect to data packets received from the network.


The network interface device comprises a second at least one processing unit 720. The second at least one processing unit 720 may comprise an FPGA having an FPGA application (such as is illustrated in FIG. 5) or may comprise the hardware module 610 shown in FIG. 6, which comprises a plurality of processing units.


During the first time period, the second compilation process is carried out to compile the function for running on the second at least one processing unit. That is, the network interface device is configured to compile the FPGA application 515 on the fly.


Subsequent to the first time period (i.e. subsequent to the completion of the second compilation process), the second at least one processing unit 720 is configured to begin performing the function with respect to the data packets received from the network.


Subsequent to the first time period, the first at least one processing unit 710 may cease performing the function with respect to the data packets received from the network. In some embodiments, the first at least one processing unit 710 may, in part, cease performing the function with respect to the data packets. For example, if the first at least one processing unit comprises a plurality of CPUs, subsequent to the first time period, one or more of the CPUs may cease performing the processing with respect to the data packets received from the network, with the remaining CPUs of the plurality of CPUs continuing to perform the processing.


The first at least one processing unit 710 may be configured to perform the function with respect to data packets of a first data flow. When the second compilation process is completed, the second at least one processing unit 720 may begin to perform the function with respect to the data packets of the first data flow. When the second compilation process is complete, the first at least one processing unit may cease performing the function with respect to the data packets of the first data flow.


Different combinations are possible for the first at least one processing unit and the second at least one processing unit. For example, in some embodiments the first at least one processing unit 710 comprises a plurality of CPUs (as illustrated in FIG. 4) whilst the second at least one processing unit 720 comprises a hardware module having a plurality of processing units (as illustrated in FIG. 6). In some embodiments, the first at least one processing unit 710 comprises a plurality of CPUs (as illustrated in FIG. 4) whilst the second at least one processing unit 720 comprises an FPGA (as illustrated in FIG. 5). In some embodiments, the first at least one processing unit 710 comprises a hardware module having a plurality of processing units (as illustrated in FIG. 6) whilst the second at least one processing unit 720 comprises an FPGA (as illustrated in FIG. 5).


Reference is made to FIG. 11, which illustrates how the connected plurality of processing units 640a, 640b, 640d may perform its respective at least one operations with respect to a data packet. Each of the processing units is configured to perform its respective at least one operation with respect to a received data packet.


The at least one operation of each processing unit may represent a logic stage in the function (e.g. a function of an eBPF program). The at least one operation of each processing unit may be expressible by an instruction that is executed by the processing unit. The instruction may determine the behaviour of an atom.



FIG. 11 illustrates how the packet (P0) progresses along the processing stages implemented by each processing unit.


Each processing unit performs processing with respect to the packet in a particular order specified by the compiler. The order may be such that some of the processing units are configured to perform their processing in parallel. This processing may comprises accessing at least part of the packet held in a memory. Additionally or alternatively, this processing may comprises performing a look up into a look up table to determine an action to be carried out for the packet. Additionally or alternatively, this processing may comprises modifying state 1110


The processing units exchange Metadata M0, M1, M2, M3 with one another. The first processing unit 640a is configured to perform its respective at least one predefined operation and generate metadata M1 in response. The first processing unit 640a is configured to pass the metadata M1 to the second processing unit 640b.


At least some of the processing units perform their respective at least one operation in dependence upon at least one of: the content of the data packet, its own stored state, the global shared state, and metadata (e.g. M0, M1, M2, M3) associated with the data packet. Some of the processing units may be stateless.


Each of the processing units may perform its associated type of operation for the data packet (P0) during at least one clock cycle. In some embodiments, each of the processing units may perform its associated type of operation during a single clock cycle. Each of the processing units may be individual clocked for performing their operations. This clocking may be an addition to the clocking of the processing pipeline of processing units.


Examining the operation of the second processing unit 640b in more detail, the second processing unit 640b is configured to be connected to the first processing unit 640a configured to perform a first at least one predefined operation with respect to the first data packet. The second processing unit 640b is configured to receive from the first further processing unit, results of the first at least one predefined operation. The second processing unit 640b is configured to perform a second at least one predefined operation in dependence upon the results of the first at least one predefined operation. The second processing unit 640b is configured to be connected to the third processing unit 640d configured to perform a third at least one predefined operation with respect to the first data packet. The second processing unit 640b is configured to send results of the second at least one predefined operation to the third processing unit 640d for processing in the third at least one predefined operation.


The processing units may similarly operate in order so as to provide the function with respect to each of a plurality of data packets.


Embodiments of the application are such that multiple packets may be simultaneously be pipelined if the function permits.


Reference is made to FIG. 12, which illustrates the pipelining of data packets. As shown, different packets may be processed at the same time by different processing units. A first processing unit 640a is executing its respective at least one operation at a first time (t0) with respect to a third data packet (P2). A second processing unit 640b is executing its respective at least one operation at the first time (t0) with respect to a second data packet (P1). A third processing unit 640d is executing its respective at least one operation at the first time (t0) with respect to a first data packet (P0).


After the respective at least operations have been executed by each of the processing units, each of the packets moves along one stage in the sequence. For example, at a subsequent second time (t1), the first processing unit 640a is executing its respective at least one operation at a first time (t0) with respect to a fourth data packet (P3). The second processing unit 640b is executing its respective at least one operation at the first time (t0) with respect to the third data packet (P2). The third processing unit 640d is executing its respective at least one operation at the first time (t0) with respect to the first data packet (P1).


So long as there are no pipeline hazards, such a pipeline operating on a fixed clock may have a constant bandwidth. This may reduce jitter in the system.


In order to avoid hazards (such as conflicts when accessing shared state) when executing instructions, each of the processing units may be configured to execute a no operation (i.e. the processing unit stalls) instruction when necessary.


In some embodiments, operations (such as simple arithmetic, increment, add/subtract constant values, shift, add/subtract values from a data packet or from metadata) require one clock cycle to be executed by a processing unit. This can mean that values in shared state that are required by one processing unit have not yet been updated by another processing unit. Out of date values in the shared state 1110 may therefore be read by the processing unit requiring them. Hazards may therefore occur when reading and writing values to shared state. On the other hand, operations on intermediate values may be passed along as metadata without hazards occurring.


An example of a hazard when reading and writing to share state 1110 that may be avoided can be given in the context of an increment operation. Such an increment operation may be an operation to increment a packet counter in shared state 1110. In one implementation of an increment operation, during a first time slot of the pipeline, the second processing unit 640b is configured to read the value of a counter from shared state 1110, and provide the output of this read operation (e.g. as metadata M2) to the third processing unit 640d. The third processing unit 640d is configured to receive the value of the counter from the second processing unit 640b. During a second time slot, the third processing unit 640d increments this value and writes the new incremented value to the shared state 1110.


A problem may occur when executing such an increment operation, which is that if, during the second time slot, the second processing unit 640b attempts to access the counter stored in shared state 1110, the second processing unit 640b may read the previous value of the counter before the counter value in shared state 1110 is updated by the third processing unit 640d.


Therefore, in order to address this problem, the second processing unit 640b may be stalled during the second time slot (through the execution by the second processing unit 640b of a no operation instruction or a pipeline bubble). A stall may be understood to be a delay in the execution of the next instruction. This delay may be implemented by execution of a “no operation” instruction instead of the next instruction. The second processing unit 640b then reads the counter value from shared state 1110 during a following third time slot. During the third time slot, the counter in shared state 1110 has been updated, and so it is ensured that the second processing unit 640b reads the updated value.


In some embodiments, the respective atoms are configured to read from the state, update the state and write the updated state during a single pipeline time slot. In this case, the stalling of the processing units described above may not be used. However, stalling the processing units may reduce the cost of the memory interface required.


In some embodiments, in order to avoid hazards, the processing units in the pipeline may wait until other processing units in the pipeline have finished their processing before performing their own operations.


As noted, the compiler builds the data-path by linking an arbitrary number of processing stage instances, where each instance is built from one of a predefined number (three in the example given) of pre-synthesised processing stage templates. The processing stage templates are logic stage templates (e.g. providing arithmetic operations over registers, scratch pad memory, and metadata), packet access state templates (e.g. providing packet data loads and/or packet data stores), and map access stage templates (e.g. map lookup algorithms, map table sizes).


Each processing stage instance may be implemented by a single one of the processing units. That is each processing stage comprises the respective at least one operation carried out by a processing unit.



FIG. 13 illustrates an example of a how the processing stages may be connected together in a pipeline 1300 to process a received data packet. A shown in FIG. 13, a first data packet is received at and stored in a FIFO 1305. One or more calling arguments are received at a first logic stage 1310. The calling arguments may comprise a program selector which identifies the function to be executed for a received data packet. The calling arguments may comprise an indication of a packet length of the received data packet. The first logic stage 1310 is configured to process the calling arguments and provide an output to the first packet access stage 1315


The first packet access stage 1315 loads data from the first packet at the network tap 1320. The first packet access stage 1315 may also write data to the first packet in dependence upon the output of the first logic stage 1310. The first packet access stage 1315 may write data to the front of the first data packet. The first packet access stage 1315 may overwrite data in the data packet.


The loaded data and any other metadata and/or arguments are then provided to the second logic stage 1325, which performs processing with respect to the first data packet and provides output arguments to the first map access stage 1330. The first map access stage 1330 uses the output from the second logic stage 1325 to perform a look up into a lookup table to determine an action to be performed with respect to the first data packet. The output is then passed to a third logic stage 1335, which processes this output and passes the result to a second packet access stage 1340.


The second packet access stage 1340 may read data from the first data packet and/or write data to the first data packet in dependence upon the output of the third logic stage 1335. The results of the second packet access stage 1340 are then passed to a fourth logic stage 1345 that is configured to perform processing with respect to the inputs it receives.


The pipeline may comprise a plurality of packet access stages, logic stages, and map access stages. A final logic stage 1350 configured to output the return arguments. The return arguments may comprise a pointer identifying the start of a data packet. The return arguments may comprise an indication of an action to be performed with respect to a data packet. The indication of the action may indicate whether or not the packet is to be dropped. The indication of the action may indicate whether or not the packet is to be forwarded to the host system. The network interface device may comprise at least one processing unit configured to drop the respective data packet in response to an indication that the packet is to be dropped.


The pipeline 1300 may additionally include one or more bypass FIFOs 1355a, 1355b, 1355c. The bypass FIFOs may be used to pass processing data, e.g. data from the first data packet around the map access stages and/or packet access stages. In some embodiments, the map access stages and/or packet access stages do not require data from the first data packet in order to perform their respective at least one operation. The map access stages and/or packet access stages may perform their respective at least one operation in dependence upon the input arguments.


Reference is made to FIG. 8, which illustrates a method 800 performed by a network interface device 600, 700 according to embodiments of the application.


At S810, a function a hardware module of the network interface device is arranged to perform a function. The hardware module comprises a plurality of processing units, each configured to perform a type of operation in hardware with respect to a data packet. S810 comprises arranging at least some of the plurality of processing units to perform their respective predefined type of operation in a particular order so as to provide a function with respect to each received data packet. Arranging the hardware module as such comprises connecting at least some of the plurality of processing units such that received data packets undergo processing by each of the pluralities of operations of the at least some of the plurality of processing units. The connecting may be achieved by configuring routing hardware of the hardware module to route the data packets and associated metadata between the processing units.


At S820, a first data packet is received from the network at a first interface of the network interface device.


At S830, the first data packet is processed by each of the at least some processing units that were connected during the compilation process in S810. Each of the at least some processing units performs with respect to the at least one data packet the type of operation that it is preconfigured to perform. Hence, the function is performed with respect to the first data packet.


At S840, the processed first data packet is transferred onwards to its destination. This may comprise sending the data packet too the host. This may comprise sending the data packet over the network.


Reference is made to FIG. 9, which illustrates a method 900 that may be performed in a network interface device 700 according to embodiments of the application.


At S910, the first at least one processing unit (i.e. the first circuitry) of the network interface device is configured to receive and process data packets received from over the network. This processing comprises performing the function with respect to the data packets. The processing is performed during a first time period.


At S920, a second compilation process is performed during the first time period so as to compile the function for performance on a second at least one processing unit (i.e. the second circuitry).


At S930, it is determined whether or not the second compilation process is complete If not, the method returns back to S910 and S920, wherein the first at least one processing unit continues to perform the processing with respect to the data packets received from the network and the second compilation process continues.


At S940, in response to determining that the second compilation is complete, the first at least one processing unit ceases performing the function with respect to the received data packets. In some embodiments, the first at least one processing unit may cease to perform the function only with regard to certain data flows. The second at least one processing unit may then perform the function (at S950) with regard to those certain data flows instead.


At S950, when the second compilation process is complete, the second at least one processing unit is configured to begin performing the function with respect to data packets received from the network.


Reference is made to FIG. 16, which illustrates a method 1600 according to embodiments of the application. The method 1600 could be performed in a network interface device or a host device.


At S1610, a compilation process is performed so as to compile a function to be performed by the first at least one processing unit.


As S1620, a compilation process is performed so as to compile the function to be performed by the second at least one processing unit. This process comprises assigning each of a plurality of processing units of the second at least one processing unit to perform at least one operation associated with a stage of a plurality of stages for processing a data packet so as to provide the first function. Each of the plurality of processing units is configured to a type of processing and the assigning is performed in dependence upon determining that the processing unit is configured to perform a type of processing suitable for performing the respective at least one operation. In other words, the processing units are selected according to their template.


At 1630, prior to completion of the compilation process in S1620, an instruction is sent to cause the first at least one processing unit to perform the function. This instruction may be sent before the compilation process in S1620 begins.


At S1640, following completion of the compilation process in S1620, an instruction is sent to the second circuitry to cause the second circuitry to perform the function with respect to data packets. This instruction may include compiled instructions produced at S1620.


The function according to embodiments of the application may be provided as a pluggable component of a processing slice in the network interface. Reference is made to FIG. 14, which illustrates an example of how a slice 1425 may be used in the network interface device 600. The slice 1425 may be referred to as a processing pipeline.


The network interface device 600 includes a transmit queue 1405 for receiving and storing data packets from the host that are to be processed by the slice 1425 and then transmitted over the network. The network interface device 600 includes a receive queue 1410 for storing data packets received from the network 1410 that are to be processed by the slice 1425 and then delivered to the host. The network interface device 600 includes a receive queue 1415 for storing data packets received from the network that have been processed by the slice 1425 and are for delivery to the host. The network interface device 600 includes a transmit queue for storing data packets received from the host that have been processed by the slice 1425 and are for delivery to the network.


The slice 1425 of the network interface device 600 comprises a plurality of processing functions for processing data packets on the receive path and the transmit path. The slice 1425 may comprise a protocol stack configured to perform protocol processing of data packets on the receive path and the transmit path. In some embodiments, there may be a plurality of slices in the network interface device 600. At least one of the plurality of slices may be configured to process receive data packets received from the network. At least one of the plurality of slices may be configured to process transmit data packets for transmission over the network. The slices may be implemented by hardware processing apparatus, such as at least one FPGA and/or at least one ASIC.


Accelerator components 1430a, 1430b, 1430c, 1430d may be inserted at different stages in the slice as shown. The accelerator components each provide a function with respect to a data packet traversing the slice. The accelerator components may be inserted or removed on the fly, i.e. during operation of the network interface device. The accelerator components are, therefore, pluggable components. The accelerator components are logic regions, which are allocated for the slice 1425. Each of them supports a streaming packet interface allowing packets traversing the slice to be streamed in and out of the component.


For example, one type of accelerator component may be configured to provide encryption of data packets on the receive or transmit path. Another type of accelerator component may be configured to provide decryption of data packet on the receive or transmit path.


The function discussed above that is provided by executing operations performed by a plurality of connected processing units (as discussed above with reference to FIG. 6) may be provided by an accelerator component. Similarly, the function provided by an array of network processing CPUs (as discussed above with reference to FIG. 4) and/or an FPGA application (as discussed above with reference to FIG. 5) may be provided by an accelerator component.


As described, during operation of the network interface device, the processing performed by a first at least one processing unit (such as a plurality of connected processing units) may be migrated from a second at least one processing unit. To implement this migration, a component for processing by the first at least one processing unit in the slice's 1425 components may be replaced by a component for processing by the second at least one processing unit.


The network interface device may comprise a control processor configured to insert and remove the components from the slice 1425. During the first time period discussed above, a component from performing the function by a first at least one processing unit may be present in the slice 1425. The control processor may be configured to, subsequent to the first time period: remove the pluggable component providing the function by the first at least one processing unit from the slice 1425 and insert the pluggable component providing the function by the second at least one processing unit into the slice 1425.


In addition to or instead of inserting and removing the components from the slice, the control processor may load programs into the component and issue control-plane commands to control the flow of frames into the components. In this case, it may be that the components are caused to operate or not operate without being inserted or removed from the pipeline.


In some embodiments, the control plane or configuration information is carried over the data path, rather than requiring separate control buses. In some embodiments, requests to update the configuration of data path components are encoded as messages which are carried over the same buses as network packets. Thus the data path may carry two types of packets: network packets and control packets.


Control packets are formed by the control processor, and injected into the slice 1425 using the same mechanism that is used to send or receive data packets using a slice 1425. This same mechanism may be a transmit queue or receive queue. Control packets may be distinguished from network packets in any suitable way. In some embodiments, the different types of packets may be distinguished by a bit or bits in a metadata word.


In some embodiments, the control packets contain a routing field in the metadata word that determines the path that the control packet takes through the slice 1425. A control packet may carry a sequence of control commands. Each control command may targets one or more components of the slice 1425. The respective data path component is identified by a component ID field. Each control command encodes a request for the respective identified component. The request may be to make changes to the configuration of that component. The request may control whether or not the component is activated, i.e. whether or not the component performs its function with respect to data packets traversing the slice.


Therefore in some embodiments, the control processor of the network interface device 600 is configured to send a message to cause one of the components of the slice to start performing the function with respect to data packets received at the network interface device. This message is a control plane message that is sent through the pluggable components and which causes the atomic switch over of frames into the component for performing the function. This component then executes on all received data packets traversing the slice until it is switched out. The control processor is configured to send a message to cause another of the components of the slice to cause this component to cease performing the function with the respect to data packets received at the network interface device 600.


In order to switch components into and out of the data slice 1425, sockets may be present at various points in the ingress and egress data path. The control processor may plumb additional logic into and out of the slice 1425. This additional logic may take the form of FIFOs placed between the components.


The control processor may send control plane message through the slice 1425 to configured components of the slice 1425. The configuration may determine the function performed by component of the slice 1425. For example, a control message sent through the slice 1425 may cause the hardware module to be configured to perform a function with respect to data packets. Such a control message may cause the atoms of the hardware module to be interconnected into a pipeline of the hardware module so as to provide a certain function. Such a control message may cause the individual atoms of the hardware module to be configured so as to select an operation to be performed by the individually selected atoms. Since each atom is pre-configured to perform a type of operation, the selecting of the operation for each atom is made in dependence upon the type of operation that each atom is pre-configured to perform. The applicant hereby discloses in isolation each individual feature described herein and any combination of two or more such features, to the extent that such features or combinations are capable of being carried out based on the present specification as a whole in the light of the common general knowledge of a person skilled in the art, irrespective of whether such features or combinations of features solve any problems disclosed herein, and without limitation to the scope of the claims. The applicant indicates that aspects of the present invention may consist of any such individual feature or combination of features. In view of the foregoing description it will be evident to a person skilled in the art that various modifications may be made within the scope of the invention.

Claims
  • 1. A network interface device configured to provide an interface between a host device and a network to communicate data between the host device and the network, the network interface device comprising: a plurality of circuits, each of the plurality of circuits comprising a digital circuit configured to perform a respective operation; androuting hardware to, in response to execution of an instruction, connect at least some circuits of the plurality of circuits in a sequence to form an interconnected circuit that performs a function on data processed with the interconnected circuit of the network interface device, the interconnected circuit configured to perform the function on the data at least in part by each digital circuit of the at least some circuits performing its respective operation in the sequence.
  • 2. The network interface device of claim 1, wherein the routing hardware is configured to connect the at least some circuits of the plurality of circuits in response to execution of an instruction that indicates the at least some circuits of the plurality of circuits.
  • 3. The network interface device of claim 1, wherein the respective operation that each digital circuit is configured to perform comprises an atomic operation.
  • 4. The network interface device of claim 1, wherein the respective operation that each digital circuit is configured to perform comprises an arithmetic operation.
  • 5. The network interface device of claim 1, wherein each circuit of the plurality of circuits comprises memory storing instructions that, when executed by a digital circuit of the circuit, cause the digital circuit to perform the respective operation.
  • 6. The network interface device of claim 1, further comprising shared memory, wherein digital circuits of at least two of the plurality of circuits are configured to access the shared memory.
  • 7. The network interface device of claim 1, wherein a digital circuit of at least one of the plurality of circuits comprises arithmetic logic unit (ALU).
  • 8. The network interface device of claim 1, wherein the routing hardware is configured to connect the at least some circuits of the plurality of circuits in response to instructions generated by a compiler.
  • 9. The network interface device of claim 8, wherein the network interface device further comprises a processor configured to execute the instructions.
  • 10. The network interface device of claim 1, at least one of the plurality of circuits comprises an application specific integrated circuit (ASIC).
  • 11. The network interface device of claim 1, wherein the respective operation that each digital circuit is configured to perform is executable in a single clock cycle.
  • 12. The network interface device of claim 1, wherein the digital circuit of each of the at least some circuits is configured to perform its respective operation to carry out an instruction in a set of code.
  • 13. An apparatus comprising: a host device; anda network interface device configured to provide an interface between the host device and the network to communicate data between the host device and the network, the network interface device comprising: a plurality of circuits, each of the plurality of circuits comprising a digital circuit configured to perform a respective operation; androuting hardware to, in response to execution of an instruction, connect at least some circuits of the plurality of circuits in a sequence to form an interconnected circuit that performs a function on data processed with the interconnected circuit of the network interface device, the interconnected circuit configured to perform the function on the data at least in part by each digital circuit of the at least some circuits performing its respective operation in the sequence.
  • 14. The apparatus of claim 13, wherein the routing hardware is configured to connect the at least some circuits of the plurality of circuits in response to execution of an instruction that indicates the at least some circuits of the plurality of circuits.
  • 15. The apparatus of claim 13, wherein the respective operation that each digital circuit is configured to perform comprises an atomic operation.
  • 16. The apparatus of claim 13, wherein each circuit of the plurality of circuits comprises memory storing instructions that, when executed by a digital circuit of the circuit, cause the digital circuit to perform the respective operation.
  • 17. The apparatus of claim 13, further comprising shared memory, wherein digital circuits of at least two of the plurality of circuits are configured to access the shared memory.
  • 18. The apparatus of claim 13, wherein a digital circuit of at least one of the plurality of circuits comprises arithmetic logic unit (ALU).
  • 19. The apparatus of claim 13, wherein the digital circuit of each of the at least some circuits is configured to perform its respective operation to carry out an instruction in a set of code.
  • 20. A method performed in a network interface device that provides an interface between a network and a host device, the network interface device comprising a plurality of circuits, each of the plurality of circuits comprising a digital circuit configured to perform a respective operation, the method comprising: in response to execution of an instruction, connecting at least some circuits of the plurality of circuits in a sequence to form an interconnected circuit that performs a function on data processed with the interconnected circuit of the network interface device, the interconnected circuit configured to perform the function on the data at least in part by each digital circuit of the at least some circuits performing its respective operation in the sequence.
RELATED APPLICATIONS

This Application claims the benefit under 35 U.S.C. § 120 as a continuation of U.S. application Ser. No. 16/180,883, filed Nov. 5, 2018, entitled “NETWORK INTERFACE DEVICE,” the entire contents of which are incorporated herein by reference.

Continuations (1)
Number Date Country
Parent 16180883 Nov 2018 US
Child 17246310 US